.TH compress "" "" Command
.PC "Compress a file"
\fBcompress [ \-dfvc ] [ -b\fInum\fP ] [ \fIfile ...\fB ]\fR
.PP
.HS
.SH Options:
.IC "\fB\-b\fInum\fR"
Set compression to \fInum\fR
.IC "\fB\-c\fR"
Send output to \fBstdout\fR
.IC "\fB\-d\fR"
Decompress, rather than compress
.IC "\fB\-f\fR"
Force output file, even if no space saved by compression
.IC "\fB\-v\fR"
Verbose mode
.HE
.B compress
compresses a file using the Lempel-Ziv algorithm.
With text files and archives, it often can achieve 50% rate of compression.
.PP
If one or more
.IR file s
are specified on the command,
.B compress
compresses them and appends the suffix \fB.Z\fR onto the end of each
compressed file's name.
If no
.I file
is specified on the command line,
.B compress
compresses text from the standard input and writes the compressed text to
the standard output.
.PP
.B compress
recognizes the following options:
.IP \fB\-b\fR
The ``bits'' option.
.B compress
uses the compression level set via the
.I num
argument.
Previous releases of
.B compress
would only allow values of
.I num
up to 12, with 12
being the default value if the
.B \-b
option was not specified.
The version of
.B compress
introduced with \*(CO version 3.1
handles values up to 16, with 12 being the default.
.IP \fB\-c\fR
Send output to stdout.
.IP \fB\-d\fR
Decompress rather than compress.
.IP \fB\-f\fR
Force an output file to be generated even if no space is saved by compression.
.IP \fB\-v\fR
Verbose mode:
force
.B compress
to write statistics about its performance.
.PP
If you wish to ensure backwards compatibility with
previous releases of \*(CO, do not use
.B compress
with a
.I num
value greater than 12.
.SH "See Also"
.Xr "commands," commands
.Xr "compression," compressi
.Xr "gzip," gzip
.Xr "ram," ram
.Xr "uncompress," uncompres
.Xr "zcat" zcat
