bpack.enums module

Enumeration types for the bpack package.

class bpack.enums.EBaseUnits(value)[source]

Bases: Enum

Base units used to specify size and offset parameters in descriptors.

BITS = 'bits'
BYTES = 'bytes'
class bpack.enums.EBitOrder(value)[source]

Bases: Enum

Enumeration for bit order.

LSB = '<'
MSB = '>'
class bpack.enums.EByteOrder(value)[source]

Bases: Enum

Enumeration for byte order (endianess).


the EByteOrder.DEFAULT is equivalent to EByteOrder.NATIVE for binary structures having EBaseUnits.BYTE base units, and EByteOrder.BE for binary structures having EBaseUnits.BIT base units.

classmethod get_native()[source]

Return the native byte order.

BE = '>'
LE = '<'
NATIVE = '='