A method to create C Structures in python, that converts python data into raw bytes.

Boilerplate

struct.pack(">HBH", 20, 0x4, 12)

Format Types

Format CodeData TypeSize (bytes)
bSigned char1
BUnsigned char1
hSigned short2
HUnsigned short2
iSigned int4
IUnsigned int4
fFloat4
dDouble8