Constructs a huffman tree to compress and decompress strings of text.