P
pip
Hi all,
I am trying to extract some data from a binary file using unpack. All
is well where I have to extract simple data types such as shorts,
strings and ints but then I reach this in the docs I am using:
Here is the way a date is represented:
MSB LSB
__________________________________________________________
| year | Month | Day | Time |
| 12 bits | 4 bits | 5 bits | 11 bits |
|__________|____________|___________|____________________|
I have played with the hex string operator in unpack with little
joy. I also had a go at it with vec() but got nowhere.
Could someone please point me in the right direction for extracting
this data please?
Thanks,
pip
P.S if it makes a difference I am pulling the file from an x86 based
system and parsing it on an x86 system.
I am trying to extract some data from a binary file using unpack. All
is well where I have to extract simple data types such as shorts,
strings and ints but then I reach this in the docs I am using:
Here is the way a date is represented:
MSB LSB
__________________________________________________________
| year | Month | Day | Time |
| 12 bits | 4 bits | 5 bits | 11 bits |
|__________|____________|___________|____________________|
I have played with the hex string operator in unpack with little
joy. I also had a go at it with vec() but got nowhere.
Could someone please point me in the right direction for extracting
this data please?
Thanks,
pip
P.S if it makes a difference I am pulling the file from an x86 based
system and parsing it on an x86 system.