huffman

所属分类:数据结构
开发工具:Visual C++
文件大小:4KB
下载次数:20
上传日期:2008-05-08 10:07:12
上 传 者gaocong0588
说明:  Huffman编码是最优变长码,请设计一个Huffma编码程序,实现以下功能: (1)接收原始数据:从终端读入字符集大小n,以及n个字符和权值,建立Huffman 树,并将它文件hfmtree.dat中。 (2)编码:利用已建立的哈夫曼树,对文件中的正文进行编码,将结果存入文件codefile.dat中。 (3)译码:利用已建立号的哈夫曼树将sodefile.dat中的代码进行译码,结果存入文件textfile.dat中。 (4)打印编码规:即字符与编码之间的一一对应关系。 (5)打印Huffman树,将已存入内存中的哈夫曼树以直观的方式显示在终端上。
(Huffman coding is optimal variable-length code, the design of a Huffma coding process, realize the following functions: (1) to receive the raw data: Reading from the terminal into the character set size n, and n characters, and the right values, the establishment of Huffman tree, and It documents in hfmtree.dat. (2) Coding: Using the Huffman tree has been established to document the body encode the results into a document in codefile.dat. (3) Decoding: The number has been established Huffman tree will sodefile.dat decoding of code, resulting in a document deposited in textfile.dat. (4) Print coding rules: that is, characters with one-to-one relationship between the encoding. (5) Print Huffman tree will have been deposited in the Huffman tree in memory intuitive way to show that in the terminal.)

文件列表:
huffman.txt (12114, 2008-05-08)

近期下载者

相关文件


收藏者