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

compress(1) OSS Shell and Utilities Reference Manual
are specified or if the file operand is a - (dash), the standard input file is compressed and written
to the standard output file. If appending the .Z extension to the filename would make the name
exceed NAME_MAX bytes, the compress command fails.
Compressed files can be restored to their original form using the uncompress or zcat command
or using the compress command with the -d flag.
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.
If the file has an access control list (ACL), the ACL is preserved when the file is compressed.
For more information about ACLs, see the acl(5) reference page.
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 nished 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.
2100 Hewlett-Packard Company 527188-021