Jump to content

compress (software)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Vadmium (talk | contribs) at 03:37, 14 April 2012 (Style cleanup). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Compress
Filename extension
.Z
Internet media type
application/x-compress
Developed bySpencer Thomas
Type of formatdata compression

Compress is a Unix shell compression program based on the LZC compression method, which is an LZW implementation using variable size pointers as in LZ78.

The uncompress utility will restore files to their original state after they have been compressed using the compress utility. If no files are specified, the standard input will be uncompressed to the standard output.

Description of program

Files compressed by compress are typically given the extension ".Z". Most tar programs will pipe their data through compress when given the command line option "-Z". (The tar program in its own does not compress; it just stores multiple files within one tape archive file.)

Files can be returned to their original state using uncompress. The usual action of uncompress is not merely to create an uncompressed copy of the file, but also to restore the timestamp and other attributes of the compressed file.

For files produced by compress on other systems, uncompress supports 9- to 16-bit compression.

History

The LZW algorithm used in compress was patented by Sperry Research Center in 1983. Terry Welch published an IEEE article on the algorithm in 1984,[1] but failed to note that he had applied for a patent on the algorithm. Spencer Thomas took this article and implemented compress in 1984, without realizing that a patent was pending on the LZW algorithm. The GIF image format also incorporated LZW compression in this way, and Unisys later claimed royalties on implementations of GIF. Joseph M. Orost led the team and worked with Thomas et al. to create the 'final' (4.0) version of compress and published it as free software to the 'comp.sources.unix' USENET group in 1985. U.S. patent 4,558,302 was granted in 1985, and this is why compress could not be used without paying royalties to Sperry Research, which was eventually merged into Unisys. compress has fallen out of favor in particular user-groups because it makes use of the LZW algorithm, which was covered by a Unisys patent — because of this, gzip and bzip2 increased in popularity on Linux-based operating systems due to their alternative algorithms. compress has, however, maintained a presence on Unix and BSD systems. The US LZW patent expired in 2003, so it is now in the public domain in the United States. All patents on the LZW worldwide have also expired (see Graphics Interchange Format#Unisys and LZW patent enforcement).

Usage

Command-line parameters to uncompress are specified like this:

uncompress switches files

Some of the switches that can modify the output are

  • -f: force. If given, uncompress will not prompt for overwriting files.
  • -v: verbose. List all files as they are being uncompressed.

See also

References

  1. ^ Welch, Terry A., "A technique for high performance data compression", IEEE Computer, 17(6), pp.8-19, June 1984.