Implemented merging huffman trees