Anybody know how to do this??
I'm reading a binary file and getting the byte values out using the array module - works beautifully. Most of the data in these files is interpreted as unsigned char, but a few chunks are unsigned longs. I can get the 4 bytes that go into the unsigned, but I don't know how to squach them together into one unsigned long. In C I'd use a union I guess.
Any ideas?
I'm reading a binary file and getting the byte values out using the array module - works beautifully. Most of the data in these files is interpreted as unsigned char, but a few chunks are unsigned longs. I can get the 4 bytes that go into the unsigned, but I don't know how to squach them together into one unsigned long. In C I'd use a union I guess.
Any ideas?