def decode_byte(buf, offset): return LE_INT8.unpack_from(buf, offset)[0]
def decode_boolean(buf, offset): return LE_INT8.unpack_from(buf, offset)[0] == 1
def encode_byte(buf, offset, value): LE_INT8.pack_into(buf, offset, value)
def encode_boolean(buf, offset, value): if value: LE_INT8.pack_into(buf, offset, 1) else: LE_INT8.pack_into(buf, offset, 0)