- class BitStream(__auto: BitsType | int | None, length: int | None = None, offset: int | None = None, pos: int = 0, **kwargs)¶
ConstBitStreamclasses are base classes for
BitStreamand so all of their methods are also available for
BitStreamobjects. The initialiser is the same as for
BitStreamis a mutable container of bits with methods and properties that allow it to be parsed as a stream of bits. There are no additional methods or properties in this class - see its base classes (
ConstBitStream) for details.
The bit position is modifed by methods that read bits, as described in
pos, but for the mutable
BitStream it is also modified by other methods:
If a methods extends the bitstring (
poswill move to the end of the bitstring.
If a method otherwise changes the length of the bitstring (
posbecomes invalid and will be reset to