I have a binary file and I would like to get the first,second and third field of the line The first field is with offset zero (ofcourse) which has a size of 2 bytes and its format is binary integer format. The second field is offset 2 and size of 2 bytes with binary integer. The third field has offset of 4 with 2 bytes with binary integer data. I was wondering what is the easiest way to do this? I am getting confused on how to use unpack. also, lets assume one of these fields is ASCII -- Offset 15, size 1 --, how could I see this string? Any thoughts? TIA
In reply to unpack offset question by magawake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |