L
Lance
I have an array of bytes that I need to convert into an
array of Integers. But, the number of bits per value in
the Byte array is not necessarily divisible by 8 (although
it will never exceed 32).
For example, lets say I have a an array of bytes
(byteValues) that represents a string of 7 bit values. In
this case, the first value would be stored in the first 7
bits of byteValues(0), the second value would be stored in
the last bit of byteValues(0) and the first 6 bits of
byteValues(1), etc.
So, I need a method that will copy bits from byteValues to
an Integer and allows me to specify the offset (in bits)
and the number of bits to copy. I thought there was a
method that would do this type of thing, but now I can't
find it.
Thanks for any help!
Lance
array of Integers. But, the number of bits per value in
the Byte array is not necessarily divisible by 8 (although
it will never exceed 32).
For example, lets say I have a an array of bytes
(byteValues) that represents a string of 7 bit values. In
this case, the first value would be stored in the first 7
bits of byteValues(0), the second value would be stored in
the last bit of byteValues(0) and the first 6 bits of
byteValues(1), etc.
So, I need a method that will copy bits from byteValues to
an Integer and allows me to specify the offset (in bits)
and the number of bits to copy. I thought there was a
method that would do this type of thing, but now I can't
find it.
Thanks for any help!
Lance