登录
首页 » Visual C++ » huffman

huffman

于 2010-03-09 发布 文件大小:7KB
0 398
下载积分: 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 个回复

  • HackerDisassemblingUncovered
    黑客反汇编大解密,一本介绍反汇编知识的好书,例子深入浅出,适合有一定汇编基础的人员(Hacker disassembly Uncovered, a book about disassembling, easy to understand examples for someone who knows some assembling)
    2010-05-10 09:54:04下载
    积分:1
  • 444
    光立方制作的源代码,可以直接输入进行编程,减少菜鸟编程实践 (Light cube made of the source code, you can directly enter the program, reducing the rookie programming practice)
    2013-10-16 14:44:27下载
    积分:1
  • SQL_yujvzhongshezhiduogezifuchuanjianshuotiaojian
    该程序是用VC++编写的程序,是关于SQL语句中设置多个字符串检索条件方面的,成品语句,可以独立运行,参考价值较高。(The program is VC++ Preparation procedures on the SQL statement string to set up a number of search terms, finished statement, can run independently, a high reference value.)
    2008-05-06 00:18:14下载
    积分:1
  • Clx
    此为笔者整理的大学C语言常考程序题,供大家参考学习(C language)
    2017-05-05 13:34:19下载
    积分:1
  • C-Technique
    C语言是一种计算机程序设计语言,它既具有高级语言的特点,又具有汇编语言的特点。它的功能性非常强大,目前是各高校的一门必修课。并且市场上许多软件也是基于C语言的平台而产生的,所以C语言在大学中的教学也称得上是"不遗余力"。但是近些年很多的学生普遍反映C语言晦涩难懂,不容易学透,非常努力的学最后却得不能心满意足,课程过后一无所获,甚至一个小小的程序都写不出来,于是针对这些情况就做出一些初步的分析,并且从C语言编程技巧上提出相关的改善对策。 (C language is a computer programming language, both with advanced language features, but also has characteristics of assembly language. Its function is very powerful, is now a required course in colleges and universities. And also a lot of software on the market based on the C language, platform and produce, so C language teaching at the university is also described as a "spare no effort." But in recent years, a lot of students generally reflect the C language obscure, not easy to learn thoroughly, very hard to learn, but finally could not have satisfied the course after nothing, even a small program that can not write, so for these situations to to make some preliminary analysis, and from the C programming language skills relevant improvement measures put forward.)
    2013-10-08 20:40:35下载
    积分:1
  • 鬼影ddos群集源码
    鬼影DDOS集群发包源码,分为客户端和服务端完整源码(Ghost DDOS cluster source code, divided into client and server complete source code)
    2017-11-21 14:43:42下载
    积分:1
  • 2
    说明:  形参只是形式参数,并不参与实际运算,但是形参在同一个函数里要相同,实参是实际参数,参与实际的运算, 有几个形参就对应有几个实参,形参在自定义函数里,实参在主函数里 (Formals only formal parameter is not involved in the actual operation, but parameter in a function to be the same, the argument is the actual parameters involved in the actual operation, several shape parameters corresponding to several arguments, parameter in Custom function, the argument in the main function)
    2012-10-01 22:42:31下载
    积分:1
  • DIACHARGER
    铅酸蓄电池的大电流放电回路的控制,有自关断放电回路的功能的。(Control of the lead-acid batteries, high-current discharge circuit, since the shutdown function of the discharge circuit.)
    2012-02-21 23:08:36下载
    积分:1
  • 847457336
    VB汇编指令操作类(CALL注入)源程序,有需要的就下载吧。(VB class assembly instruction (CALL injection) source, there is a need to download it.)
    2013-08-17 01:06:08下载
    积分:1
  • fanhuibian
    黑客反汇编解密书籍,pdf版本,想要学习逆向的可以看一看。(Hacker disassembly decryption books, pdf version, want to learn the reverse can look.)
    2014-01-09 09:59:32下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载