摘要 |
A method for 5-bit chunk encoding of bit serial data by a data processor handling data in 8-bit byte segments, the method comprising the steps of: setting a bit shift counter (bsc) to zero; receiving data from the bit serial data to be stored into 8-bit bytes, such that at least two 8-bit bytes are available, the bit serial data stored in the 8-bit bytes from the most-significant bit to least significant bit; shifting left the data in the first byte, by the value of the bsc; encoding the data contained in the first two bytes in two 5-bit chunks; incrementing the bsc by an increment of 2, and if the bsc is then equal to 8, resetting it to zero; offsetting the data to the next whole byte boundary of the 8-bit byte data, dropping already processed bytes; and so long as there is data, repeating the steps of receiving, shifting, incrementing, and offsetting.
|