Tibs Tibs
tibs
A sleek Python library for binary data

GitHub PyPI - License Pepy Total Downloads PyPI - Downloads

User Manual#

tibs is a Python library for creating, manipulating and interpreting binary data. It’s designed to be light-weight and easy to use, and is written in Rust for efficiency.

The two most important classes available in the tibs module are:

  • Tibs — An immutable sequence of bits (‘tibs’ is ‘bits’ rearranged).

  • Mutibs — A mutable sequence of bits (‘mutibs’ is a mutable tibs).

These classes efficiently hold arbitrary length binary data; they can be constructed from bytes, ints, floats, binary and hex strings, random data, and bools. They can then be sliced, spliced, searched, replaced, rotated, reversed, byte-swapped, set, unset, appended, extended, indexed, counted, concatenated, chunked, and joined back together, before being interpreted as bytes, ints, floats, binary and hex strings, and bools.

Getting started#

To install use

pip install tibs

There are pre-built wheels for most configurations - if there are issues then please let me know. Tibs works with Python 3.8 and later.

The rest of this manual will talk about all the major features of the library, but will not be exhaustive - see the API docs for every method and parameter.