《哈夫曼编码与译码(附源码).pdf》由会员分享,可在线阅读,更多相关《哈夫曼编码与译码(附源码).pdf(23页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、建立 Huffman 树进行编码和译码的设计郝萌 1100300423 哈尔滨工业大学计算机科学与技术学院 1003104 班摘要:建立一个简易的系统,对于给定的一篇英文文章,统计字符出现的概率,并根据概率建立Huffman 树,利用 Huffman 编码对文章进行编码和译码。掌握 Huffman 树的建立与应用,并进一步熟练掌握程序的设计流程。关键词:Huffman 树Huffman 编码 文章译码文件压缩解压缩1.引言:给定一篇文章,统计字符出现的概率,根据概率建立哈夫曼树,并进行哈夫曼编码,进而可以利用哈夫曼编码对文章进行编码与译码和文件压缩、解压缩等操作。2.程序设计流程(1)文字表述
2、开始进入功能选择界面,包含五种操作:1.读取文章并对字符编码,2.哈夫曼编码信息,3.文章编码,4.文章译码,5.文件压缩,6.文件解压缩,7.退出程序。操作1:给定一篇文章,统计字符出现的概率,并根据概率建立Huffman 树,并利用Huffman 树对字符进行Huffman 编码。操作 2:显示 Huffman 编码信息,包括字符,字符出现的概率,Huffman 编码。操作 3:对文章进行译码,显示译码信息,并保存。操作4:对文章进行译码,显示并保存。操作5:对文件进行压缩,每 7 位二进制序列对应一个ASCII 码。操作 6:对文件进行解压缩。(2)流程图程序开始程序主界面读取文章并对字
3、符编码哈夫曼编码信息文章编码文章译码退出程序显示文章编码保存文章编码返回上一界面显示文章编码的译码保存文章编码的译码程序结束文件压缩文件解压缩文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
4、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
5、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
6、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
7、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
8、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
9、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8(3)程序数据要求及功能实现主界面1.读取文件并对字符进行编码2.哈夫曼编码信息文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
10、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
11、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
12、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
13、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
14、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
15、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
16、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q83.文件编码文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编
17、码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E
18、6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编
19、码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E
20、6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编
21、码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E
22、6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8(1)显示文件编码(2)保存文件编码4.文件译码文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH
23、1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q
24、8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH
25、1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q
26、8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH
27、1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q
28、8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH
29、1X7E6A3Z7 ZX3K1I5P8Q8(1)显示文章编码的译码(2)保存文章编码的译码5.文件压缩文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
30、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
31、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
32、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
33、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I
34、4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7
35、ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q86.文件解压缩附:程序源代码/*File:HUFFMANFUNCTION.h*Author:Administrator*Created on 2011 年 12 月 19 日,下午 6:19*/#ifndef HUFFMANFUNCTION_H#define
36、 HUFFMANFUNCTION_H 文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文
37、档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X
38、7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文
39、档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X
40、7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文
41、档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X
42、7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8#include#include#include#include#define max1 150#define max2 50#define max3 256 using namespace std;class Htnote public:char name;/字符名double weight;/权重int lchild
43、;/左孩子int rchild;/右孩子int parent;/父亲Htnote()weight=0;lchild=-1;parent=-1;rchild=-1;class Name public:int num;/字符出现的次数char pname;/字符名double lweight;/权值Name()num=0;lweight=0;class GetName public:char namefmax2;int n;/字符的种类int sum;/字符的总数Name lettermax1;/存储字符信息的类的数组文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8
44、文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1
45、X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8
46、文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1
47、X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8
48、文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1
49、X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8
50、文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8文档编码:CX1I4J4U4V7 HH1X7E6A3Z7 ZX3K1I5P8Q8GetName()sum=0;n=0;void GetWeight()/得到字符的权值 for(int i=0;i n;i+)letteri.lweight=(double)letteri.num/sum;/出现的次数除总数得到权值 int ReadLetter()ifstream input;cout 请输入文件名:namef;input.open(namef);/打开文件if(input.fail()cout 该文件不存在!endl