-
hafuman
一 . 需求分析:
1) 输入形式和输入值范围:
输入形式是要压缩(或者要解压)的文件路径,输入范围是字符串,而且要是文件的路径。
2) 输出形式:
输出相应的编码压缩文件和解码原文件
3) 程序所能达到的功能:
利用哈夫曼对ASCII文件做不等长编码,达到压缩文件。利用哈夫曼树的遍历,达到解压文件的目的。程序的功能也就是实现压缩和解压ASCII类型文件的目的。
4)测试数据:(包括正确的输入数据及其输出结果和含有错误输入及其输出结果)
测试输入或者输出文本框是不是有空的,是不是不是有效路径。进行条件判断,实现错误处理。
比如要压缩:c:a.txt 文件路径就是:c:a.txt。如果输入框是空的,就判断,然后用MessageBox处理信息。
如果文件路径和文件的输出路径都写正确的话,就会输出相应的压缩或者解压文件,否则用函数MessageBox提示错误。然后进行更正。
二 . 概要设计:
1) 哈夫曼树的特点
a) 是二叉树的一种,而且是一种没有度数是1的二叉树
b) 一棵树有n个叶子,就会用2n-1个节点
c) 一种“最优”二叉树,由于树的带权路径(WPL)最小
d) 由于它是由下到上顺序构造的,使得分支节点和叶子节点从下到上,权值都是从小到大的顺序排列的
()
- 2007-07-16 22:04:12下载
- 积分:1
-
terrain
演示地形绘制与漫游,取自OGRE例子,地形管理器会自动应用八叉树分割来管理地形。(Demo terrain rendering and roaming, from OGRE example, terrain Manager automatically applied octree division to manage the terrain.)
- 2013-05-27 23:51:46下载
- 积分:1
-
Mail-list-management
基于C++下的,通讯录管理程序源码,实现了对通讯录的简单管理操作(Based contact management program source C++ under the realization of a simple address book management operations)
- 2014-04-27 11:24:05下载
- 积分:1
-
uCOSII
ucos From a small number of the concept of real-time kernel, developed a simple algorithm available, the core of the book made a detailed presentation
- 2007-09-25 09:56:53下载
- 积分:1
-
rockf
Prewitte边缘算子法(Prewitte Edge Operators)
- 2005-01-20 14:58:44下载
- 积分:1
-
tmp
获取复合文档word/doc excel/xls powerpoint/ppt的信息(Get compound document word doc/excel/XLS powerpoint/powerpoint presentation of information)
- 2014-08-05 11:07:05下载
- 积分:1
-
TestDevFunction
示例程序用了最少的代码实现了对USB的启用禁用操作,对想做windows设备控制的朋友应该有抛砖引玉的作用。(Sample program code used to achieve a minimum of USB-enabled disable operation, pairs of friends want to windows device control should have the role of attracting valuable opinions.)
- 2010-01-17 19:52:56下载
- 积分:1
-
TimeAndSpace
c语言高效编程的几招--时间与空间的互换(Efficient Programming Tips- the exchange of time and space)
- 2010-10-08 11:35:36下载
- 积分:1
-
Excel-vc2
VC++ 与 EXCEL生成系统报表-2(VC and EXCEL Generation System statements-2)
- 2007-04-17 11:43:20下载
- 积分:1
-
app
18B20超声波驱动的测试文件,可以精确的显示到小数点后1位的温度(18 b20 ultrasonic drive test files, can be accurate to 1 decimal places of the temperature)
- 2014-04-18 21:55:46下载
- 积分:1