Huffman Tree Encoder