Sorry again, it is a typo. Should be inData[ 2 ] as you said.Why did you write:
You said you had 12 bit integers in your file, so I assumed that the file is binary. Now you are seeming to say that the file is actually a text file, since it has newlines in it. If it is a text file, then how can it contain 12-bit integers? And what is an "item" - a 12 bit integer or something else?And why are you reading 3 elements at time? In my file I have rows of 64 items. Each row is separated by new line character
What EXACTLY is the format of these files? Text, binary, what? If it is binary, then is it 12-bit integers, packed 2 integers to every 3 bytes (which it would be if the format is 12 bits - 12 bits - 12 bits, like you said - every three 8-bit bytes holds two 12-bit numbers), or is it something else? The code I wrote takes every 3 bytes and unpacks them into two integers, 1 1/2 bytes (12 bits) into one, 1 1/2 bytes into the next.
If it is a text file, then copy and paste a few lines into your reply so we can see what it looks like.
Bookmarks