欢迎来到淘码网(TMA.CN)

哎呀

价格: ¥ 9 积分可抵¥ 9

最后更新: 2019-12-25 19:38:18

演示地址:

解答费: 免费

分类
参数1
参数1
参数1
参数1
参数1
参数1
大小
1 MB
发货方式
自动发货
下载方式
远程下载
1
1
1
备注说明

所属分类其他
开发工具:Visual C++
文件大小:3KB
下载次数:14
上传日期:2017-08-02 10:36:01
说明:  设计一个哈夫曼编码、译码系统。对一个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.cpp
哎呀

0 (0%)

好评

0 (0%)

中评

0 (0%)

差评

  • 会员中心
  • 浏览记录
  • 我的订单
  • 我的收藏
  • 在线客服

    点击这里给我发消息 点击这里给我发消息

    官方微信

    仅处理投诉、举报及平台使用问题;
    商品问题请咨询商家客服!

  • 意见反馈
  • 返回顶部
浏览记录