# # # # # import struct def read_bool(buf): return buf.read(1)[0] == 1 def read_number(buf): return struct.unpack("