Encodes and decodes files using the Huffman algorithm