Description
Data dumps print out bytes without regard to the bit offset. So if some bits have already been consumed, the dumps might include those already consumed bits.
Ideally we would like to be bit sensitive. A possible solution would be to track if the first byte of the left over data, already had consumed bytes i.e ended mid-byte, and only display those non consumed bits. That is, if the data ended at bit 5, and bit order is mostSignificantBitFirst, then this picture would look like xxxxx000 (where the 0's are the actual left over data bits in that first byte of the left over data.) If bitOrder is leastSignificantBitFirst the picture would look like 000xxxxx.
inStream.fillByteArray takes the bit offset into accound and can be utilized.