哈夫曼树

所属分类:数据结构
开发工具:C/C++
文件大小:1KB
下载次数:1
上传日期:2019-11-23 15:14:08
上 传 者JY2098
说明:  实现一个 哈夫曼编 码系统,系统包括以下功能: (1) 字符信息统计 读取待编码的源 文件 SourceFile.txt ,统计出现的字符及其频率 。 (2) 建立哈夫曼树 :根据统计结果建立 哈夫曼树 。 (3) 建立哈夫曼码表:利用得到的哈夫曼树,将各字符对应的编码表保存在文件建立哈夫曼码表:利用得到的哈夫曼树,将各字符对应的编码表保存在文件Code.txtCode.txt中。 (4) 对源文件进行编码:根据哈夫曼码表,将对源文件进行编码:根据哈夫曼码表,将SourceFile.txtSourceFile.txt中的字符转换成相应的中的字符转换成相应的编码编码文件文件ResultFile.txtResultFile.txt。
(Achieve one Huffman coding system, including the following functions: (1) Character information statistics reads the source file sourcefile.txt to be encoded, and counts the characters and their frequency. (2) Establish Huffman tree: establish Huffman tree according to the statistical results. (3) establish Huffman code table: save the corresponding code table of each character in the file by using the Huffman tree obtained; save the corresponding code table of each character in the file code.txtcode.txt by using the Huffman tree obtained. (4) encoding the source file: encoding the source file according to the Huffman code table: converting the characters in sourcefile.txtsourcefile.txt to the corresponding characters in the corresponding encoding file resultfile.txtresultfile.txt according to the Huffman code table.)

文件列表:
ResultFile.txt (216, 2019-11-23)
哈夫曼树.cpp (2320, 2019-11-23)
SourceFile.txt (109, 2016-11-04)

近期下载者

相关文件


收藏者