霍夫曼算法 在Golang中的实现 用法 仅提供字词: user@pc:~/Huffman algorithm $ go build user@pc:~/Huffman algorithm $ ./huffman-algorithm -w hello Code for h is 110 Code for e is 111 Code for l is 0 Code for o is 10 提供带有单词的文件: user@pc:~/Huffman algorithm $ go build user@pc:~/Huffman algorithm $ ./huffman-algorithm -f very-long-word.txt Code for V is 100100001 Code for i is 000 Code for t is 1000 Code for a is 110