import struct print(struct.calcsize("bI")) print(struct.unpack(">bI", b"\x80\0\0\x01\0"))