4 compress, uncompress, zcat \- compress and expand data
45 reduces the size of the named files using adaptive Lempel-Ziv coding.
47 each file is replaced by one with the extension
49 while keeping the same ownership modes, access and modification times.
50 If no files are specified, the standard input is compressed to the
52 Compressed files can be restored to their original form using
59 option will force compression of
61 This is useful for compressing an entire directory,
62 even if some of the files do not actually shrink.
67 is run in the foreground,
68 the user is prompted as to whether an existing file should be overwritten.
73 .I compress/uncompress
74 write to the standard output; no files are changed.
75 The nondestructive behavior of
77 is identical to that of
82 uses the modified Lempel-Ziv algorithm popularized in
83 "A Technique for High Performance Data Compression",
86 vol. 17, no. 6 (June 1984), pp. 8-19.
87 Common substrings in the file are first replaced by 9-bit codes 257 and up.
88 When code 512 is reached, the algorithm switches to 10-bit codes and
89 continues to use more bits until the
90 limit specified by the
92 flag is reached (default 16).
94 must be between 9 and 16. The default can be changed in the source to allow
96 to be run on a smaller machine.
102 periodically checks the compression ratio. If it is increasing,
104 continues to use the existing code dictionary. However,
105 if the compression ratio decreases,
107 discards the table of substrings and rebuilds it from scratch. This allows
108 the algorithm to adapt to the next "block" of the file.
116 parameter specified during compression
117 is encoded within the output, along with
118 a magic number to ensure that neither decompression of random data nor
119 recompression of compressed data is attempted.
122 The amount of compression obtained depends on the size of the
125 per code, and the distribution of common substrings.
126 Typically, text such as source code or English
127 is reduced by 50\-60%.
128 Compression is generally much better than that achieved by
129 Huffman coding (as used in
131 or adaptive Huffman coding
133 and takes less time to compute.
138 a message is printed yielding the percentage of
139 reduction for each file compressed.
143 option is specified, the current version and compile options are printed on
146 Exit status is normally 0;
147 if the last file is larger after (attempted) compression, the status is 2;
148 if an error occurs, exit status is 1.
152 Usage: compress [\-dfvcV] [\-b maxbits] [file ...]
154 Invalid options were specified on the command line.
162 not in compressed format
164 The file specified to
166 has not been compressed.
171 bits, can only handle
176 was compressed by a program that could deal with
179 than the compress code on this machine.
180 Recompress the file with smaller
184 already has .Z suffix -- no change
186 The file is assumed to be already compressed.
187 Rename the file and try again.
190 filename too long to tack on .Z
192 The file cannot be compressed because its name is longer than
194 Rename and try again.
195 This message does not occur on BSD systems.
198 already exists; do you wish to overwrite (y or n)?
200 Respond "y" if you want the output file to be replaced; "n" if not.
202 uncompress: corrupt input
204 A SIGSEGV violation was detected which usually means that the input file has
210 Percentage of the input saved by compression.
214 -- not a regular file: unchanged
216 When the input file is not a regular file,
217 (e.g. a directory), it is
222 other links: unchanged
224 The input file has links; it is left unchanged. See
226 for more information.
230 No savings is achieved by
231 compression. The input remains virgin.
234 Although compressed files are compatible between machines with large memory,
236 should be used for file transfer to architectures with
237 a small process data space (64KB or less, as exhibited by the DEC PDP
238 series, the Intel 80286, etc.)