Huffman preprocessing