add Huffman encoding