c++ huffman encoder