-
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
-
uGopp_GA
基于遗传算法的电力系统优化运行算法,在新能源电力系统中,实现各类分布式电源的优化出力(The optimal operation algorithm of power system based on genetic algorithm is used to realize the optimal output of all kinds of distributed power supply in new energy power system)
- 2017-08-15 18:45:24下载
- 积分:1
-
lexical-011
The following words are used as keywords in proposed extensions and are therefore reserved to allow for the possibility of future adoption of those extensions.
- 2013-12-25 10:49:21下载
- 积分:1
-
Fluent udf手册
【实例简介】Fluent udf手册
- 2021-08-10 00:31:03下载
- 积分:1
-
26883
运行外部程序与打开指定网址源码,程序调用API函数实现运行外部程序。(Run an external program and open the specified URL source code, the program calls API functions to run an external program.)
- 2014-10-22 17:32:02下载
- 积分:1
-
串口助手源码
说明: C#串口助手源代码,有winform的,也有WPF的,一共六个打包下载。代码来自网络。(C# serial assistant source code, there are WinForm, there are also WPF, a total of six packages to download. The code comes from the network.)
- 2021-05-06 17:20:39下载
- 积分:1
-
y
说明: 易语言脱机网页游戏源码例程程序结合易语言扩展界面支持库,调用API函数实现脱机的网页游戏。
(Easy language offline web game source routine procedures combined with easy language extensions interface support library, call the API function to achieve offline web games.
)
- 2017-03-13 11:07:58下载
- 积分:1
-
mdk-1.2.4.tar
he Art Of Computer Programming,著名计算机科学家高德纳(D.E.Knuth) 设计的计算机: MIX的虚拟机源码(he Art Of Computer Programming VM MIX)
- 2009-02-02 11:13:49下载
- 积分:1
-
基于UDP协议的简单网络聊天室的实现,通过启动服务器、客户端程序实现网络对话传输...
基于UDP协议的简单网络聊天室的实现,通过启动服务器、客户端程序实现网络对话传输-UDP-based protocol to achieve a simple online chat room, by starting the server, the client program to achieve dialogue with the network transmission
- 2022-03-07 02:01:13下载
- 积分:1
-
服务器和客户端的VC++实例
服务器和客户端的VC++实例-server and client examples of the VC
- 2022-07-10 17:49:03下载
- 积分:1