I have a binary file that I want to read and parse. It uses a special format, and I have a text document that describes the standard.
Lets say I read the contents of the file into a byte buffer. Now I need to parse it, x number of bits at a time.
So I need for example first read 7 bits, and assign it to a variable, and then read the next 3 bits and assign to another variable, and then read 26 bits and assign them into a variable.
The standard specifies the datatypes, so for example the 7 bits i read should be cast to a int and so on.
Any tips on how i can do this the best way?
Thanks in advance