文件名称:HuffmanTree

介绍说明--下载内容均来自于网络,请自行研究使用

哈夫曼编/译码器

利用哈夫曼编码进行信道通信可以大大提高信道利用率,缩短信息传输时间,降低传输成本。但是,这要求在发送端通过一个编码系统系统对待传数据预先编码,在接收端将传来的数据进行译码(复原)。对于双工信道(即可以双向传输信息的信道),每端都需要一个完整的编/译码系统。试为这样的信息收发站写一个哈夫曼码的编/译码系统。

要求:一个完整的系统应具有以下功能:

(1)初始化(Initialization)。从终端读入字符集大小n,以及n个字符和权值,

建立哈夫曼树,并将它存于文件hfmTree中。

(2)编码(Encoding)。利用已建好的哈夫曼树(如不在内存,则从文件hfmTree中读

入)对文件ToBeTrans中的正文进行编码,然后将结果存入文件CodeFile中。

(3)译码(Decoding)。利用已建好的哈夫曼树将文件CodeFile中的代码进行译码,结果存入文件TextFile中。- Huffman encoder/decoder

The use of Huffman coding channel communication can greatly improve the channel utilization, time-to-information transmission, and reduce transmission costs. However, this requires the sending end through a coding system pre-treatment data encoding, decoding at the receiving end of the data (recovery). For duplex channel (ie two-way transmission channel), each side needs a complete encoder/decoder system. Write a Huffman encoder/decoder system test for such information transceiver station.

Requirements: a complete system should have the following features:

(1) initialization (Initialization). Read from the terminal character set size n, and n characters and weights,

      Create a Huffman tree, and save it in a file hfmTree.

(2) encoding (encoding). Huffman tree has been built (if not in memory, read from the file hfmTree

      Into) the file ToBeTrans the text encoding, and the result is stored in the file CodeFile.

(3) decoding
(系统自动生成,下载前可以参看下载内容)

下载文件列表





HuffmanTree

...........\CodeFile.txt

...........\Debug

...........\.....\huffman.obj

...........\.....\HuffmanTree.exe

...........\.....\HuffmanTree.ilk

...........\.....\HuffmanTree.opt

...........\.....\HuffmanTree.pch

...........\.....\HuffmanTree.pdb

...........\.....\vc60.idb

...........\.....\vc60.pdb

...........\hfmTree.txt

...........\hfmTree1111.txt

...........\huffman.cpp

...........\huffman.h

...........\HuffmanTree.dsp

...........\HuffmanTree.dsw

...........\HuffmanTree.ncb

...........\HuffmanTree.opt

...........\HuffmanTree.plg

...........\TextFile.txt

...........\ToBeTrans.txt

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org