Huffman encode