class documentation

Converter for data sections best interpreted as integers

Integers are always little-endian, unsigned, and at most two bytes.

Class Method get Converts bytes -> int
Class Method set Converts int -> bytes
@classmethod
def get(cls, data: bytes, **kwargs) -> _T: (source)

Converts bytes -> int

Parameters
data:bytesThe raw bytes to convert
**kwargsUndocumented
Returns
_TThe little-endian integer given by data
@classmethod
def set(cls, value: _T, *, length: int = None, **kwargs) -> bytes: (source)

Converts int -> bytes

Parameters
value:_TThe value to convert
length:intThe length of the data section
**kwargsUndocumented
Returns
bytesThe little-endian representation of value