-
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
-
VC++6.0安装
VC++6.0绿色安装资源包,安装简单便利,功能强大,适合C/C++编程者的部分需求。大家都来下载吧,加油哦
- 2022-03-31 09:29:16下载
- 积分:1
-
PropClock_v2
propeller clock source code
- 2011-08-18 02:07:46下载
- 积分:1
-
OBD2UART
Arduino Library for Freematics OBD-II UART Adapter
Distributed under BSD License
- 2018-02-19 22:25:40下载
- 积分:1
-
继电器15入15出(高低输入)
说明: 15路输入输出,232串口控制 STC12C5A60S2(15 input and output, 232 serial port control STC12C5A60S2)
- 2020-01-28 14:39:54下载
- 积分:1
-
ServerPlus
本程序为多媒体通信的server端的源码(
VC++ 6.0 以上版本)(the procedures for multimedia communications server side of the source (VC version 6.0 and above))
- 2006-11-10 09:56:41下载
- 积分:1
-
多项式
说明: 用链表实现多项式的加减乘除以及多项式的打印显示(Addition, subtraction, multiplication, division and display of polynomials by linked list)
- 2019-05-19 08:17:30下载
- 积分:1
-
人口普查的工作表现在两个方面,一是人口普查的记录问题,二是各种各样指标的统计问题。统计主要表现为人口总量和人口结构,结构包括知识结构、年龄结构、地区结构等。...
人口普查的工作表现在两个方面,一是人口普查的记录问题,二是各种各样指标的统计问题。统计主要表现为人口总量和人口结构,结构包括知识结构、年龄结构、地区结构等。-census work done in two aspects : First, the census records, two indicators of a variety of statistical issues. The main performance statistics for the total population and the population structure, including the structure of the knowledge structure and age structure, regional structure.
- 2022-05-16 08:44:10下载
- 积分:1
-
MFCDraw
MFC 画图程序
包括了所有画图的功能!
里面包括了源代码,相当好用!(MFC Paint program to include all the functions of drawing! Which includes source code, very easy to use!)
- 2020-11-19 10:09:37下载
- 积分:1
-
peixun5
C # programming. Connect to the C#编程。连接数据库操作,实现数据库连接,添加记录,修改记录,删除记录,查询记录等操作。(C# programming. Connect to the database operation, the implementation of database connection, add records, modify records, delete records, search records and other operations.)
- 2012-04-30 16:56:19下载
- 积分:1