Adding Huffman encoding code