登录
首页 » Visual C++ » huffman

huffman

于 2010-03-09 发布 文件大小:7KB
0 217
下载积分: 1 下载次数: 119

代码说明:

  哈夫曼编码进行信息通讯可以大大提高信道利用率,缩短信息传输时间,降低传输成本。但是,这要求在发送端通过一个编码系统对待传数据预先编码;在接收端将传来的数据进行译码(复原)。对于双工信道(即可以双向传输信息的信道),每端都需要一个完整的编/译码系统,试为这样的信息收发站写一个哈夫曼编译码系统。 一个完整的系统应具有以下功能: (1) (1) I: 初始化。从终端读入字符集大小 n ,及 n 个字符和 n 个权值,建立哈夫曼树,并将其存于文件hfmtree中。 (2) C: 编码。利用已建好的哈夫曼树(如不在内存,则从文件hfmtree中读入),对文件tobetrans中的正文进行编码,然后将结果存入文件codefile中。 (3) D: 译码。利用已建好的哈夫曼树将文件codefile中的代码进行译码,结果存入文件textfile中。 (4) P: 打印代码文件。将文件codefi1e以紧凑格式显示在终端上,每行50个代码。同时将此字符形式的编码文件写入文件codeprint中。 (5) T:打印哈夫曼树。将已在内存中的哈夫曼树以直观的方式(树或凹凸表形式)显示在屏幕上,同时将此字符形式的哈夫曼树写入文件treeprint中。 (利用哈夫曼编码进行信息通讯可以大大提高信道利用率,缩短信息传输时间,降低传输成本。但是,这要求在发送端通过一个编码系统对待传数据预先编码;在接收端将传来的数据进行译码(复原)。对于双工信道(即可以双向传输信息的信道),每端都需要一个完整的编/译码系统,试为这样的信息收发站写一个哈夫曼编译码系统。 一个完整的系统应具有以下功能: (1) (1) I: 初始化。从终端读入字符集大小 n ,及 n 个字符和 n 个权值,建立哈夫曼树,并将其存于文件hfmtree中。 (2) C: 编码。利用已建好的哈夫曼树(如不在内存,则从文件hfmtree中读入),对文件tobetrans中的正文进行编码,然后将结果存入文件codefile中。 (3) D: 译码。利用已建好的哈夫曼树将文件codefile中的代码进行译码,结果存入文件textfile中。 (4) P: 打印代码文件。将文件codefi1e以紧凑格式显示在终端上,每行50个代码。同时将此字符形式的编码文件写入文件codeprint中。 (5) T:打印哈夫曼树。将已在内存中的哈夫曼树以直观的方式(树或凹凸表形式)显示在屏幕上,同时将此字符形式的哈夫曼树写入文件treeprint中。 )

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论


0 个回复

  • 847457336
    VB汇编指令操作类(CALL注入)源程序,有需要的就下载吧。(VB class assembly instruction (CALL injection) source, there is a need to download it.)
    2013-08-17 01:06:08下载
    积分:1
  • muZHUCE
    奇迹内部注册小工具,绝对实用以绝版~!!!!!!!!!!(Miracle of internal register gadget is absolutely practical in order to print ~!)
    2009-09-05 16:02:54下载
    积分:1
  • 2011021118235664
    汇编源码学习学习包含内容说明详细功能资料(HUI BIAN)
    2011-11-25 11:10:16下载
    积分:1
  • AN1004
    This article covers the so-called "min-cost flow" problem, which has many applications for both TopCoder competitors and professional programmers. The article is targeted to readers who are not familiar with the subject, with a focus more on providing a general understanding of the ideas involved rather than heavy theory or technical details for a more in-depth look at this topic, check out the references at the end of this article, in particular [1].
    2009-11-30 10:18:10下载
    积分:1
  • dyb
    说明:  数子电压表源程序(汇编)1602显示,按键控制报警上下限量程为9~15V 采样用2:1分压(The number of sub-source voltage meter (compilation) 1602 shows that the police up and down buttons control the process for a limited sample with 9 ~ 15V pressure 2:1)
    2009-08-09 22:23:58下载
    积分:1
  • The-maximum-number-of-five
    求五位数各位数字的平方和为100的最大的五位数(Seeking five digits of the square and 100, the largest number of five)
    2012-10-14 16:23:01下载
    积分:1
  • 12864LCD_lib
    说明:  12864液晶的标准测试程序,含底层函数可直接调用(12864 LCD standard testing procedures, including the underlying function can be directly called)
    2009-08-16 23:42:33下载
    积分:1
  • seek-for-saddle-point
    找出一个m*n数组的鞍点。若找到了鞍点则输出鞍点的行号和列号,若数组不存在,则输出鞍点不存在(seek for saddle point)
    2014-04-01 23:22:47下载
    积分:1
  • tushuguanli
    VB+SQL的图书管理程序,上传一个有用的东西,绝对用得上的(VB+ SQL library management procedures, to upload a useful thing, is absolutely useful for)
    2009-05-08 18:09:46下载
    积分:1
  • liushuideng
    真正的流水灯:(1)第1,3,5,7个灯半亮,其余的全亮。 (2)第1个亮1/8,第2个亮2/8,第3个亮3/8,第4个亮4/8,第5个亮5/8,第6个亮6/8,第7个亮7/8,第8个全亮。 (3)来点小难的,所有的灯逐渐从暗到全亮,再由全亮到暗。 (4)最难的:8个灯从第一个开始依次渐亮,直到最后一个。再从最后一个起渐暗,直到第一个。如此循环往复。这才是真正的流水灯。 (The real light of the water: (1), paragraphs 1, 3, 5, 7 semi-bright lights, the rest of the bright. (2) a bright 1/8, 2 bright 2/8, 3 bright 3/8, 4 bright 4/8, 5 bright 5/8, 6 bright 6/8 7 bright 7/8, 8 full-bright. (3) to a little difficult, all the lights gradually from dark to full brightness, and then from full bright to dark. (4) the hardest: 8 light from the first start in turn gradually brighter, until the last one. From the last one from the dark, until the first. So on ad infinitum. This is true of light water.)
    2012-05-19 12:03:12下载
    积分:1
  • 696518资源总数
  • 105096会员总数
  • 12今日下载