登录
首页 » Visual C++ » huffman

huffman

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

  • tioashima
    说明:  在基于脉冲的UWB系统中,采用瑞克接收机合并多径信号能量并进行相干检测,信道估计问题即估计多径信号的到达时间和幅度。在基于OFDM的UWB系统中,接收机根据信道频域响应对每个子信道进行频域均衡后进行相干检测,信道估计问题即估计信道频域响应。(Pulse-based UWB systems, rake receivers using the combined multipath signal energy and coherent detection, channel estimation problem that is estimated multipath signal arrival time and amplitude. OFDM-based UWB system, the receiver under the channel frequency response of each subchannel to frequency domain equalization after coherent detection, channel estimation problem that is estimated channel frequency response.)
    2008-09-22 16:51:03下载
    积分: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
  • asmmodel
    易语言汇编模块源码 献给新手学习. 支持所有汇编代码(Easy assembly language source module dedicated to novice learning. Support for all assembly code)
    2010-02-17 07:52:44下载
    积分:1
  • sine
    生成正弦函数表,然后保存在文件中,汇编程序通过读取文件,查表生成正弦信号。(Generating the sine function table, and then stored in a file, assembler by reading the file, look-up table generated sinusoidal signal.)
    2011-05-06 14:47:59下载
    积分: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
  • 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
  • LiarbryManagentSystem
    图书管理系统,分管理者和读者不同权限,可实现对书籍的管理,读者的管理等(Library management system, sub-managers and readers with different permissions)
    2012-05-09 22:06:26下载
    积分:1
  • CompressCurve
    说明:  光栏法的基本思想是(图1):定义一个扇形区域,通过判断曲线上的点在扇形外还是在扇形内,确定保留还是舍去。(The basic idea of ​ ​ light field is (Figure 1): definition of a fan-shaped region, by determining the point on the curve outside the sector or sector, to identify the retained or discarded.)
    2021-01-13 09:38:48下载
    积分:1
  • GDIWindMill
    通过各种的输入的实现不同的功能,里面包括了好多种通过输入实现功能的程序(By implementing a variety of different input functions, which include a good variety of functions by entering the program)
    2014-05-13 16:23:09下载
    积分:1
  • tetview-win
    用C++编写的可视化小软件,目的是为了更好的观察生成的非结构化网格!(Written in C++, a small software visualization, designed to better observe the formation of the unstructured grid!)
    2010-08-29 22:54:13下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载