-
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
-
31701012836
C++编写的简单分数类(包含复制,约分,四则运算等)(Simple fraction classes written in C++ (including duplication, reduction, four operations, etc.))
- 2019-06-11 12:01:16下载
- 积分:1
-
897650
种基于VB6.0开发的可进行瓦斯监测并报警的友好界面。该界面通过串行通信方式接收各种瓦斯报警器采集的数据。(Species can be developed based on VB6.0 gas monitoring and alarm-friendly interface. The serial communication interface to receive a variety of gas alarm, the data collected.)
- 2011-05-23 21:32:47下载
- 积分:1
-
lesson-12
孙鑫VC++教学课程lesson12:const char *与char * const的区别。C语言对文件读写的支持,FILE指针;文本文件和二进制文件的区别。用文本方式读写文件和以二进制方式读写文件的注意事项。C++对文件读写的支持,ofstream和ifstream的用法。Win32 SDK对文件读写的支持,CreateFile函数、WriteFile函数、ReadFile函数的使用;MFC对文件读写的支持,CFile类和CFileDialog的使用,文件过滤器的设置。win.ini文件和注册表的读写方式及相关知识点。 (Sun Xin VC++ tutorial lesson12: const char* char* const distinction. C language support for file read and write, the FILE pointer difference between text files and binary files. Way to read and write files with text and Note to the binary mode read and write files. The C++ support, ofstream and ifstream usage of file read and write. Win32 SDK file read and write support for the use of the CreateFile function, WriteFile function, ReadFile function the MFC file reading and writing support use CFile class and CFileDialog file filter settings. win.ini file and read and write registry and related knowledge points.)
- 2013-04-02 10:13:49下载
- 积分:1
-
FormViewDemo
在窗体视图(CFormView)中使用控件,VC++精选学习编程源码,很好的参考资料。(In form view (CFormView) using controls, select learning VC++ programming source code, a good reference.)
- 2013-11-26 18:16:41下载
- 积分:1
-
at91rm9200.c
atmel公司的At90系列嵌入式开发程序
可以学习别人良好的编程习惯(atmel' s At90 series of embedded development process can learn from others, good programming practice to)
- 2009-11-11 09:20:03下载
- 积分:1
-
GIS
从网站上找的一个GIS开发的小例子,很好,希望对大家有帮助(From the site to find a small example of GIS development, good, I hope all of you help)
- 2009-07-01 18:00:09下载
- 积分:1
-
2006_31_3_54
面向对象的信息融合黑板框架的建立,我有一系列关于黑板系统的文章哈(Object-oriented information fusion blackboard framework in place, I have a series of articles on the blackboard system ha)
- 2010-06-12 11:44:03下载
- 积分:1
-
NormSInv
Excel里NormSInv()函数的vb版(Excel Lane NormSInv () function vb version)
- 2009-02-12 10:10:06下载
- 积分:1
-
procmanagement
采购系统,源码及SQL。数据库SQL,采用VC6开发。(The procurement system, source code and SQL. SQL , developed by VC6.)
- 2016-02-25 00:27:39下载
- 积分:1