Hi,
I'm trying to implement a mux / demux in C. The basic idea is, given an input buffer of char[], i want to be able to read the required number of bits and place them in the destination buffer and then read the next number of bits and place them in the next destination buffer, etc...
eg
given a char[]
take first 3 bits and put into buffer a
take next 4 bits and put into buffer b
take next 5 bits and put into buffer c
take next 3 bits and put into buffer a
take next 4 bits and put into buffer b
.... etc
and for the demux i would like to be able to reverse the process, so that i can recreate the char[].
Anyone have any ideas??? I've thought about bit shifting and stuff but you can only shift bits in a byte and can't shift an entire array right??
Thanks for your help.



LinkBack URL
About LinkBacks



