Java implementation of the Huffman Encoding algorithm