- Open_Source_Web_Development_with_LAMP 开放源码技术为构建动态的商业及数据驱动的Web应用程序提供了一种低成本的解决方案
- PIC16F628-Frequency-counter 用16f628制造的频率计
- Modeling-and-simulation 光伏发电系统最大功率点跟踪算法研究及实现
- WRITE-A-PROGRAM-FOR-POWERLAW-TRANSFORM POWERLAW ON IMAGE PIXEL
- guimun 采用加权网络中节点强度和权重都是幂率分布的模型
- winzip.1.1.0_src 使用指定密码将给定文件或文件夹压缩成指定的输出ZIP文件;使用给定密码解压指定压缩文件到指定目录
文件名称:哎呀
介绍说明--下载内容来自于网络,使用问题请自行百度
设计一个哈夫曼编码、译码系统。对一个ASCII编码的文本文件中的字符进行哈夫曼编码,生成编码文件;反过来,可将编码文件译码还原为一个文本文件。
(1)从文件中读入任意一篇英文短文(文件为ASCII编码,扩展名为txt);
(2)统计并输出不同字符在文章中出现的频率(空格、换行、标点等也按字符处理);
(3)根据字符频率构造哈夫曼树,并给出每个字符的哈夫曼编码;
(4)图形化输出哈夫曼树、哈夫曼编码;
(5)将文本文件利用哈夫曼树进行编码,存储成压缩文件(编码文件后缀名.huf)
(6)用哈夫曼编码来存储文件,并和输入文本文件大小进行比较,计算文件压缩率;
(7)进行译码,将huf文件译码为ASCII编码的txt文件,与原txt文件进行比较。(Design a Huffman coding and decoding system. Encoding the characters in an ascii - encoded text file, generating the encoding file; In turn, the encoded file decoding can be restored to a text file.
( 1 ) read any English short passage from the file ( the file is ascii and the extension is txt );
( 2 ) statistics and output the frequency of different characters in the article ( space, line breaks, punctuation, etc. also by character );
( 3 ) Huffman tree is constructed according to the character frequency, and Huffman coding of each character is given.
( 4 ) graphic output Huffman tree, Huffman coding;
( 5 ) the text file is encoded using Huffman tree and stored as compressed file ( encoded file suffix. huf )
( 6 ) the Huffman coding is used to store the file, and compared with the input text file size, the compression ratio of the file is calculated.
( 7 ) decode, decode the huf file into ascii - encoded txt file, and compare it with the original txt file.)
(1)从文件中读入任意一篇英文短文(文件为ASCII编码,扩展名为txt);
(2)统计并输出不同字符在文章中出现的频率(空格、换行、标点等也按字符处理);
(3)根据字符频率构造哈夫曼树,并给出每个字符的哈夫曼编码;
(4)图形化输出哈夫曼树、哈夫曼编码;
(5)将文本文件利用哈夫曼树进行编码,存储成压缩文件(编码文件后缀名.huf)
(6)用哈夫曼编码来存储文件,并和输入文本文件大小进行比较,计算文件压缩率;
(7)进行译码,将huf文件译码为ASCII编码的txt文件,与原txt文件进行比较。(Design a Huffman coding and decoding system. Encoding the characters in an ascii - encoded text file, generating the encoding file; In turn, the encoded file decoding can be restored to a text file.
( 1 ) read any English short passage from the file ( the file is ascii and the extension is txt );
( 2 ) statistics and output the frequency of different characters in the article ( space, line breaks, punctuation, etc. also by character );
( 3 ) Huffman tree is constructed according to the character frequency, and Huffman coding of each character is given.
( 4 ) graphic output Huffman tree, Huffman coding;
( 5 ) the text file is encoded using Huffman tree and stored as compressed file ( encoded file suffix. huf )
( 6 ) the Huffman coding is used to store the file, and compared with the input text file size, the compression ratio of the file is calculated.
( 7 ) decode, decode the huf file into ascii - encoded txt file, and compare it with the original txt file.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
哎呀\未命名1.cpp
哎呀
哎呀
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.