class documentation

Converter for data sections best interpreted as boolean flags

The data section is expected to have length one.

Class Method get Converts bytes -> bool, where any nonzero value is truthy
Class Method set Converts bool -> bytes, where b'\x80' is truthy and b'\x00' is falsy
@classmethod
def get(cls, data: bytes, **kwargs) -> _T: (source)

Converts bytes -> bool, where any nonzero value is truthy

Parameters
data:bytesThe raw bytes to convert
**kwargsUndocumented
Returns
_TWhether data is nonzero
@classmethod
def set(cls, value: _T, **kwargs) -> bytes: (source)

Converts bool -> bytes, where b'\x80' is truthy and b'\x00' is falsy

Parameters
value:_TThe value to convert
**kwargsUndocumented
Returns
bytesb'\x80' if value is truthy else b'\x00'