Create Huffman tree code