static huffman coding from bytes to bit strings and back