LZW

所属分类:文件操作
开发工具:Visual C++
文件大小:302KB
下载次数:26
上传日期:2009-11-28 13:10:43
上 传 者chenp0727
说明:  LZW算法,实现对文本文件的加压和解压,能处理任意后缀的文件
(LZW algorithm, to realize a text file compression and decompression, can handle any file suffix)

文件列表:
LZW\1 (59, 2009-11-23)
LZW\big (753424, 2009-11-23)
LZW\big.txt (753424, 2009-11-23)
LZW\chash.h (884, 2009-11-23)
LZW\chash.out (138, 1996-07-26)
LZW\compress.cpp (3550, 2009-11-24)
LZW\compress.dsp (3668, 2009-11-23)
LZW\compress.dsw (541, 2009-11-23)
LZW\compress.ncb (66560, 2009-11-24)
LZW\compress.opt (54784, 2009-11-24)
LZW\compress.plg (1665, 2009-11-24)
LZW\Debug\compress.exe (208976, 2009-11-24)
LZW\Debug\compress.ilk (274200, 2009-11-24)
LZW\Debug\compress.obj (35258, 2009-11-24)
LZW\Debug\compress.pch (353816, 2009-11-24)
LZW\Debug\compress.pdb (566272, 2009-11-24)
LZW\Debug\vc60.idb (66560, 2009-11-24)
LZW\Debug\vc60.pdb (69632, 2009-11-24)
LZW\hash.out (197, 1997-02-14)
LZW\skip.out (563, 1996-08-05)
LZW\sochain.cpp (716, 1997-03-29)
LZW\sochain.h (2652, 2009-11-23)
LZW\sochain.out (160, 1997-02-14)
LZW\sonode.h (258, 2009-11-23)
LZW\xcept.h (507, 2009-11-23)
LZW\Debug (0, 2009-11-24)
LZW\新建文件夹 (0, 2009-11-25)
LZW (0, 2009-11-25)

LIST OF ALL C++ PROGRAMS IN CHAPTER 7 All programs were originally developed and tested using Borland C++ version 5.01 for Windows 95. The codes in this directory have been altered as necessary so that they would compile and execute properly with Microsoft's Visual C++ Version 5.0. The primary changes result from the following: 1. The new function returns 0 on failure instead of throwing the xalloc exception. 2. The set new handler function has a different format. 3. Visual C++ does not recognize the fact that when an exception is thrown, control cannot return to the throw point. As a result, the compiler gives the error ``not all control paths return a value'' when compiling several of the original methods. To get around this problem, unreachable return statements have been added. 4. Visual C++ has a different scoping rule for loop indexes declared within the loop header. For example the loop index i declared as below for (int i = 0; i <= n; i++) { ... } is available outside the for loop block. This causes a variable redefined error if we have another for loop with the header for (int i ...) To overcome this problem, the ``int'' from succeeding for loops has been deleted. 5. The max and min functions are not included in stdlib.h. Therefore, equivalent functions have been defined and placed in the file dosmax.h. 6. Visual C++ appears to have problems resolving template functions at times. For example, some of the functions in binary.h, bbloadd.cpp and bbknap.cpp had to be changed from template functions to integer functions to get them to compile. 7. Visual C++ appears to have problems deleting arrays of type T when T has a default destructor. For example, deleting the chain iterator array Pos (see DeactivatePos) in lnbase causes a crash. A null destructor has been defined in citer1.h to overcome this problem. For programs that require input to be provided, sample input is given in the corresponding .dat file. This sample input is NOT intended to constitute an adequate test set. For information on designing test data, see Section 1.5 of the text. To run the codes, you may need some of the .h files from earlier chapters. The output generated by each program is given in the corresponding .out file. CHAPTER 7 Program 7.1 The class SortedChain file: sonode.h, sochain.h, sochain.cpp Program 7.2 Search and delete members of SortedChain file: sonode.h, sochain.h, sochain.cpp Program 7.3 Insertion into a sorted chain file: sonode.h, sochain.h, sochain.cpp Program 7.4 The class SkipNode file: skipnode.h Program 7.5 The class SkipList file: skip.h, skip.cpp Program 7.6 Constructor and destructor file: skip.h, skip.cpp Program 7.7 Operator overloading for skip lists file: skip.h, skip.cpp Program 7.8 Skip list search functions file: skip.h, skip.cpp Program 7.9 Skip list insertion file: skip.h, skip.cpp Program 7.10 Deletion from a skip list file: skip.h, skip.cpp Program 7.11 C++ class definition for hash tables file: hash.h, hash.cpp Program 7.12 Constructor for HashTable file: hash.h, hash.cpp Program 7.13 Search functions file: hash.h, hash.cpp Program 7.14 Insertion into a hash table file: hash.h, hash.cpp Program 7.15 Chained hash table file: chash.h, chash.cpp Program 7.16 Establish I/O streams file: compress.cpp Program 7.17 Code output file: compress.cpp, cdat (input), cdat.zzz (output) Program 7.18 LZW compressor file: compress.cpp, cdat (input), cdat.zzz (output) Program 7.19 Function main for compression file: compress.cpp, cdat (input), cdat.zzz (output) Program 7.20 Establish I/O streams file: decomp.cpp, cdat.zzz (input), cdat (output) Program 7.21 Compute text(code) file: decomp.cpp, cdat.zzz (input), cdat (output) Program 7.22 Extracting codes from a compressed file file: decomp.cpp, cdat.zzz (input), cdat (output) Program 7.23 LZW decompressor file: decomp.cpp, cdat.zzz (input), cdat (output) Program 7.24 Main function for decompression file: decomp.cpp, cdat.zzz (input), cdat (output)

近期下载者

相关文件


收藏者