def read(cls, byte_object):
a = cls()
a.body_length = len(byte_object) - ctypes.sizeof(Command)
ctypes.memmove(ctypes.addressof(a), bytes(byte_object),
min(len(byte_object), ctypes.sizeof(cls)))
return a