added the huffman tree generation with encoding and decoding