huffman: weight and chars