上传日期:2001-01-10 13:30:57
上 传 者管理员
说明:  和Unix的compress/uncompress兼容的压缩/解压算法16位程序,适合压缩文本或重复字节较多的文件
(16-bit compression and decompression program which is compatible with that in Unix,it is suitable for text)

ATOB.C (4229, 1990-01-18)
BTOA.1 (2593, 1990-01-18)
BTOA.C (3182, 1990-01-18)
COMPAPI.C (23289, 1990-01-18)
COMPRESS.1 (5376, 1990-01-18)
COMPRESS.C (28376, 1990-01-18)
COMPRESS.FNS (2385, 1990-01-18)
COMPRESS.H (28046, 1990-01-18)
COMPRESS.MAN (6220, 1990-01-18)
COMPRS.DIR (318, 1990-01-18)
COMPRSDI.R1 (769, 1990-01-18)
COMPUSI.DOS (10501, 1990-01-18)
COMPUSI.UNI (7287, 1990-01-18)
DOS.LNK (71, 1990-01-18)
MAKEFILE.ISC (2097, 1990-01-18)
MAKEFILE.MNX (886, 1990-01-18)
MAKEFILE.MRW (691, 1990-01-18)
MAKEFILE.MSC (1339, 1990-01-18)
MAKEFILE.OS2 (886, 1990-01-18)
MAKEFILE.TAN (1031, 1990-01-18)
MAKEFILE.TC (806, 1990-01-18)
MAKEFILE.UNI (660, 1990-01-18)
MAKEFILE.XEN (664, 1990-01-18)
OS2.LNK (98, 1990-01-18)
README3.0 (8334, 1990-01-18)
README4.0 (3454, 1990-01-18)
README4.3 (16876, 1990-01-18)
REV.HST (11459, 1990-01-18)
TARMAIL (316, 1990-01-18)
UNCOMPRS.DIR (306, 1990-01-18)
UNTARMA.IL (181, 1990-01-18)
ZCMP (802, 1990-01-18)
ZCMP.1 (842, 1990-01-18)
ZDIFF (764, 1990-01-18)
ZMORE (324, 1990-01-18)
ZMORE.1 (3824, 1990-01-18)

Enclosed is compress version 3.0 with the following changes: 1. "Block" compression is performed. After the BITS run out, the compression ratio is checked every so often. If it is decreasing, the table is cleared and a new set of substrings are generated. This makes the output of compress 3.0 not compatable with that of compress 2.0. However, compress 3.0 still accepts the output of compress 2.0. To generate output that is compatable with compress 2.0, use the undocumented "-C" flag. 2. A quiet "-q" flag has been added for use by the news system. 3. The character chaining has been deleted and the program now uses hashing. This improves the speed of the program, especially during decompression. Other speed improvements have been made, such as using putc() instead of fwrite(). 4. A large table is used on large machines when a relatively small number of bits is specified. This saves much time when compressing for a 16-bit machine on a 32-bit virtual machine. Note that the speed improvement only occurs when the input file is > 30000 characters, and the -b BITS is less than or equal to the cutoff described below. Most of these changes were made by James A. Woods (ames!jaw). Thank you James! Version 3.0 has been beta tested on many machines. To compile compress: cc -O -DUSERMEM=usermem -o compress compress.c Where "usermem" is the amount of physical user memory available (in bytes). If any physical memory is to be reserved for other processes, put in "-DSACREDMEM sacredmem", where "sacredmem" is the amount to be reserved. The difference "usermem-sacredmem" determines the maximum BITS that can be specified, and the cutoff bits where the large+fast table is used. memory: at least BITS cutoff ------ -- ----- ---- ------ 4,718,592 16 13 2,621,440 16 12 1,572,8*** 16 11 1,048,576 16 10 631,808 16 -- 329,728 15 -- 178,176 14 -- 99,328 13 -- 0 12 -- The default memory size is 750,000 which gives a maximum BITS=16 and no large+fast table. The maximum bits can be overrulled by specifying "-DBITS=bits" at compilation time. If your machine doesn't support unsigned characters, define "NO_UCHAR" when compiling. If your machine has "int" as 16-bits, define "SHORT_INT" when compiling. After compilation, move "compress" to a standard executable location, such as /usr/local. Then: cd /usr/local ln compress uncompress ln compress zcat On machines that have a fixed stack size (such as Perkin-Elmer), set the stack to at least 12kb. ("setstack compress 12" on Perkin-Elmer). Next, install the manual (compress.l). cp compress.l /usr/man/manl cd /usr/man/manl ln compress.l uncompress.l ln compress.l zcat.l - or - cp compress.l /usr/man/man1/compress.1 cd /usr/man/man1 ln compress.1 uncompress.1 ln compress.1 zcat.1 The zmore shell script and manual page are for use on systems that have a "more(1)" program. Install the shell script and the manual page in a "bin" and "man" directory, respectively. If your system doesn't have the "more(1)" program, just skip "zmore". regards, petsd!joe Here is the README file from the previous version of compress (2.0): >Enclosed is compress.c version 2.0 with the following bugs fixed: > >1. The packed files produced by compress are different on different > machines and dependent on the vax sysgen option. > The bug was in the different byte/bit ordering on the > various machines. This has been fixed. > > This version is NOT compatible with the original vax posting > unless the '-DCOMPATIBLE' option is specified to the C > compiler. The original posting has a bug which I fixed, > causing ... ...