implementation of Huffman Compression algorithm