bpack.enums module

Enumeration types for the bpack package.

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

Bases: enum.Enum

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

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

Bases: enum.Enum

Enumeration for bit order.

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

Bases: enum.Enum

Enumeration for byte order (endianess).

Note

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]
BE = '>'
DEFAULT = ''
LE = '<'
NATIVE = '='