1)I:初始化(Initialization)。从终端读入电文,写到tobetrans文件中,统计电文的字符集合和对应的权值集合,建立哈夫曼树,并将哈夫曼树存于文件hfmtree中。 (2)C:编码(Coding )。利用已建好的哈夫曼树(如不在内存,则从文件hfmtree中读入),对文件tobetrans中的正文进行编码,然后将结果存入文件codefile中。 (3)D:译码(Decoding)。利用已建好的哈夫曼树将文件codefile中的代码进行译码,结果存入文件textfile中。 (4)P:印代码文件(Print)。将文件codefile以紧凑格式显示在终端上,每行50个代码。同时将此字符形式的编码文件写入文件codeprint中。 (5)T:印哈夫曼树(Tree printing)。将已在内存中的哈夫曼树以直观的方式(树或凹入表形式)显示在终端上,同时将此字符形式的哈夫曼树写入文件treeprint中。 用户界面要求设计为“菜单”方式。 修改你的系统,实现对你的系统的源程序的编码和译码(主要是将行尾符编/译码问题)。实现各个转换操作的源/目标文件,均由用户在选择此操作时指定。
标签: Initialization 初始化
上传时间: 2014-01-04
上传用户:windwolf2000
(1)接收原始数据: 从终端读入字符集大小n,n个字符和n个权值,建立哈夫曼树,存于文件hfmtree.dat中。 (2)编码: 利用已建好的哈夫曼树(如不在内存,则从文件hfmtree.dat中读入)对文件中的正文进行编码,然后将结果存入文件codefile.dat中。 (3)译码: 利用已建好的哈夫曼树将文件codefile.dat中的代码进行译码,结果存入文件textfile.dat 中。 (4)打印编码规则:即字符与编码的一一对应关系。 (5)打印哈夫曼树:将已在内存中的哈夫曼树以直观的方式显示在终端上。
上传时间: 2013-12-10
上传用户:asdkin
CC1110 CC2510 片上flash操作工程实例 可能过串口终端完成片上flash的擦除或写入动作。
上传时间: 2013-12-31
上传用户:miaochun888
您可能还不知道终端服务的潜力到底有多大?让我们看看如何设计在终端服务里平稳运行、功能先进的企业应用程序。首先,了解终端服务应用软件的设计规范;其次,研究如何使用终端服务的脚本接口、API与托管代码调用方法;最后,我要介绍一个可以实现灵活定制的库:虚拟通道。 适合听众:企业IT架构师、开发人员 预备知识:终端服务的概念与使用经验,Scripting,Windows开发技能和.NET开发技能
上传时间: 2014-06-25
上传用户:zhoujunzhen
自由始端和终端的动态规划,求指标函数最小值的逆序算法递归。
上传时间: 2013-12-15
上传用户:集美慧
从虚拟终端输入8个任意数据,通过串口传送给单片机的led_buf缓冲区,并在8个led上显示;按回车键对led_buf缓冲区中的数据进行由小到大排序,排序结果在led上显示。
上传时间: 2014-02-14
上传用户:asasasas
qt工具和shell用于过自主终端的开发......希望大家用的着
上传时间: 2014-01-04
上传用户:gyq
\OTA手机终端参数管理,设置OTA功能,看一下有好处的
上传时间: 2013-12-27
上传用户:15736969615
水木清华所开发的超级终端工具,和putty工具大同小异,值得研究
上传时间: 2014-01-19
上传用户:Shaikh
简易的“串口调试助手” 即 可以像超级终端一样,将命令从发送编辑框输入,在接收编辑框显示串口返回的结果,对于调试想AT命令,开发板(用串口的开发板)
上传时间: 2014-01-13
上传用户:z1191176801