Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
compress(1) OSS Shell and Utilities Reference Manual
The amount of compression obtained depends on the size of the input file, the number of bits per
code, and the distribution of common substrings. Typically, files containing source code or plain
text are reduced by 50 to 60 percent.
Environment Variables
This command supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH environment variables.
EXAMPLES
To compress the file folder and print the percentage reduction, enter:
compress -v folder
The system responds with a message like:
folder: Compression: 43.94% -- replaced with folder.Z
EXIT VALUES
The compress command returns the following exit values:
0 (zero) The compress utility successfully finished its processing.
1 An error occurred. The input file remains unmodified.
2 One or more files were not compressed because they would have increased in
size (and the -f flag was not specified).
>2 An error occurred. The input file remains unmodified.
RELATED INFORMATION
Commands: uncompress(1), zcat(1).
STANDARDS CONFORMANCE
The following features are HP extensions to the XPG4 Version 2 specification:
• The -C, -F, -q, and -V flags are supported.
2−66 Hewlett-Packard Company 527188-004