Huffman encoding and decoding in scheme