Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

User Commands (c) compress(1)
NAME
compress - Compresses or decompresses data
SYNOPSIS
compress [-CdfFnqvV][-b maxbits][file ...]
compress [-cCdfFnqvV][-b maxbits][file]
FLAGS
-b maxbits
Specifies the maximum number of bits to use to replace common substrings
in the file. The default value for the maxbits argument is 16, with values of 9
through 16 acceptable. First, the algorithm uses 9-bit codes 257 through 512.
Then it uses 10-bit codes, continuing until the maxbits limit is reached. (This
action is not permitted with the uncompress command.)
After the maxbits limit is reached, the compress command periodically
checks the compression ratio. If the ratio increases, compress continues to
use the existing code dictionary. However, if the compression ratio
decreases, compress discards the table of substrings and rebuilds it from the
beginning. This strategy allows the algorithm to adapt to the next block of
the file.
-c Makes the compress command write to the standard output file; no input
files are changed and no .Z file is created. The nondestructive behavior of
the zcat command is identical to that of compress -cd.
-C Produces output compatible with BSD compress revision 2.0.
-d Specifies decompression (uncompressing) the specified file.
-f or -F For both compressing and decompressing files (except when this command is
run in the background under the /usr/bin/sh file), this flag suppresses the
prompt as to whether an existing file given by the file operand should be
overwritten. For compressing files only, this flag forces the compression of
file even if the file does not actually get smaller or the corresponding file.Z
already exists.
-n Specifies that no header is added or expected. This flag might be useful for
decompressing old files.
-q Specifies a quiet operation. This flag is the default action; diagnostics are
displayed only if the -v flag is specified.
-v For a compression operation, prints the percentage reduction of each file. For
a decompression operation, this flag prints the percentage expansion of each
file.
-V Displays the version number and any options with which the program was
compiled.
DESCRIPTION
The compress command reduces the size of the specified files using adaptive Lempel-Ziv cod-
ing.
For compress, whenever possible, each file is replaced by one with the extension .Z that has the
same ownership modes, access, and modification times. Note that the filename extension used by
compress is different from that used by pack command compression (.z extension). If no files
527188-021 Hewlett-Packard Company 299