How can I read 3 bytes as an integer?
Does struct module provide something like that?
I can read in 3 bytes and add an extra \\x00 and then interpret it as a 4-b
Another option is to just do the bit shifting yourself.
Big Endian:
ba = # 3 byte bytearray v = ba[0] << 16 | ba[1] << 8 | ba[2]
Little Endian
ba = # 3 byte bytearray v = ba[2] << 16 | ba[1] << 8 | ba[0]