I work with some data, it is represented as a sequence of bits,
number(378) of which isn't divisible by 8.
What are possible ways to work with such sequence?
I need to store it, process it, append one sequence to the other.
Options I considered:
- round up to the nearest number % 8 == 0, and use array of chars of that size.
- use
bitfield
, as far as I know memory alignment forbitfield
is implementation defined.
Update:
Properties of bit sequences I am working with:
it is a codeWord that is produced from the given word using Reed-Solomon encoding algorithm.
Hence to work with bits as independent values is of no real use for me, my main concern is how to store codeWords and to append a new codeWord to the existing ones, as in order to reduce effect of burst errors I create interleaving matrix