登录
首页 » Visual C++ » huffman

huffman

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

  • Maopao
    分别用C语言和汇编语言实现冒泡排序,有汇编语言实现时的流程图,通过比较运行的时间,体现汇编的高效(This is a best program which can help you learn huibain is more better.)
    2014-05-07 18:31:54下载
    积分: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
  • xl2000user
    单片机汇编程序,来自xll200user,可以供初学者使用(MCU assembler)
    2010-11-04 21:14:16下载
    积分:1
  • liezhuyuan
    计算方法高斯列主元消去法C程序 保证好用(Method of calculating Gaussian elimination pivot column C program to ensure easy to use)
    2009-10-14 22:03:35下载
    积分: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
  • 7canshu
    说明:  利用4个公共点解WGS84转北京54的7参数(The use of public four-point solution to WGS84 parameters Beijing 54 7)
    2008-11-18 12:59:44下载
    积分:1
  • jiansheyinhan
    一个银行的提款程序。提款机的程序编译,提款机如何操作!(A bank ATM procedures. Teller machines to compile the program, how to operate teller machine!)
    2008-06-26 13:06:32下载
    积分:1
  • asmmodel
    易语言汇编模块源码 献给新手学习. 支持所有汇编代码(Easy assembly language source module dedicated to novice learning. Support for all assembly code)
    2010-02-17 07:52:44下载
    积分:1
  • keyboard
    实现的模拟键盘代码,模拟ps2协议,可以与计算机相连实现键盘的功能,在keil c下开发的。-89s51 achieved through keyboard simulation code, simulation ps2 agreement with the computer keyboard connected to the functions of the c Keil under development(Realize analog keyboard code, analog ps2 agreement, can realize the computer connected to the keyboard functions in keil c developed.-89s51 achieved through keyboard simulation code, simulation ps2 agreement with the computer keyboard connected to the functions of the c Keil under development)
    2007-11-06 13:15:35下载
    积分:1
  • muZHUCE
    奇迹内部注册小工具,绝对实用以绝版~!!!!!!!!!!(Miracle of internal register gadget is absolutely practical in order to print ~!)
    2009-09-05 16:02:54下载
    积分:1
  • 696516资源总数
  • 106457会员总数
  • 15今日下载