Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
c
compress(1) compress(1)
uncompress -c.
-V Print the current version and compile options onto the standard error.
-b maxbits Specify the maximum number of bits the compress algorithm will use. The
default is 16 and the range can be any integer between 9 and 16.
compress uses the modified Lempel-Ziv algorithm popularized in A Technique for High Performance Data
Compression , Terry A. Welch, IEEE Computer, vol. 17, no. 6 (June 1984), pages 8-19. Common substrings
in the file are first replaced by 9-bit codes 257 and up. When code 512 is reached, the algorithm switches to
10-bit codes and continues to use more bits until the limit specified by the -b flag is reached (default 16).
After the maxbits limit is attained, compress periodically checks the compression ratio. If it is increas-
ing, compress continues to use the existing code dictionary. However, if the compression ratio is
decreasing, compress discards the table of substrings and rebuilds it from scratch. This allows the algo-
rithm to adapt to the next "block" of the file.
Note that the -b flag is omitted for uncompress since the maxbits parameter specified during compres-
sion is encoded within the output, along with a magic number to ensure that neither decompression of ran-
dom data nor recompression of compressed data is attempted.
Access Control Lists
compress retains a file’s access control list when compressing and expanding data.
EXTERNAL INFLUENCES
Environment Variables
LC_MESSAGES determines the language in which messages are displayed.
If LC_MESSAGES is not specified in the environment or is set to the empty string, the value of
LANG is
used as a default for each unspecified or empty variable. If
LANG is not specified or is set to the empty
string, a default of "C" (see lang(5)) is used instead of
LANG.
If any internationalization variable contains an invalid setting,
compress, uncompress, and zcat
behave as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
These commands return the following values upon completion:
0 Completed successfully.
2 Last file is larger after (attempted) compression.
1 An error occurred.
DIAGNOSTICS
Usage: compress [-f|-z] [-dvcV] [-b maxbits] [file ...]
Invalid options were specified on the command line.
Missing maxbits
maxbits must follow -b.
file: not in compressed format
The file specified to uncompress has not been compressed.
file: compressed with xxbits, can only handle yybits
file was compressed by a program that could deal with a higher value of maxbits than the compress
code on this machine. Recompress the file with a lower value of maxbits.
file
: already has .Z suffix -- no change
The file is assumed to be already compressed. Rename the file and try again.
file: filename too long to tack on .Z
The output file name, which is the source file name with a .Z extension, is too long for the file system
on which the source file resides. Make the source file name shorter and try again.
file already exists; do you wish to overwrite (y or n)?
Respond y if you want the output to replace the existing file; otherwise, respond n.
Section 1110 2 HP-UX Release 11i: December 2000
___
___