Learning how to encode and decode files using a Huffman tree