I need to unpack a .bin file. The code used to make the file packed the data like so:
x = '' x = x + struct.pack('q', random.randint(0, MAX_NUM)) x = x + struct.pack('q', random.randint(0, MAX_NUM))
When I do a f.read(16), where 16 is the size of the data I want to read at a time, and print it out I get:
I understand that the 'q' means that the data being packed in a long long, and I have tried to use the
struct.unpack() to try to unpack the data, but I can't seem to get the correct syntax on how to unpack it.
So how would I go about unpacking this information?