O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

compress

Synopsis

compress [options] [files]

Reduces the size of one or more files using adaptive Lempel-Ziv coding and move to file .Z. Restore with uncompress or zcat.

With a filename of -, or with no files, compress reads standard input.

Unisys claims a patent on the algorithm used by compress. Today, gzip is generally preferred for file compression.

compress doesn't preserve resource forks or HFS metadata when compressing files that contain them.

Options

-b n

Limit the number of bits in coding to n; n is 9–16; 16 is the default. A lower n produces a larger, less densely compressed file.

-c

Write to the standard output (don't change files).

-f

Compress unconditionally; i.e., don't prompt before overwriting files. Also, compress files even if the resulting file would actually be larger.

-v

Print the resulting percentage of reduction for files.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required