compress (software)
| compress / uncompress | |
|---|---|
| Original author | Spencer Thomas |
| Initial release | February 1985 |
| Operating system | Unix, Unix-like, IBM i |
| Type | Command |
| compress .Z | |
|---|---|
| Filename extension |
.Z |
| Internet media type |
application/x-compress |
| Developed by | Spencer Thomas |
| Type of format | data compression |
compress is a shell command for compressing data based on the LZW algorithm. uncompress is a companion shell command that restores files to their original state (both content and metadata) from a file created with compress.
Although once popular, compress has fallen out of favor because it uses the patented LZW algorithm. Its use has been replaced by commands such as gzip and bzip2 that use other algorithms and provide better data compression. Compared to gzip at its fastest setting, compress is slightly slower at compression, slightly faster at decompression, and has a significantly lower compression ratio. 1.8 MiB of memory is used to compress the Hutter Prize data, slightly more than gzip at its slowest setting.
compress and uncompress have maintained a presence on Unix and BSD systems and have been ported to IBM i.
compress was standardized in X/Open CAE Specification in 1994, and further in The Open Group Base Specifications, Issue 6 and 7. Linux Standard Base does not require compress.
compress is often excluded from the default installation of a Linux distribution but can be installed from a separate package. compress is available for FreeBSD, OpenBSD, MINIX, Solaris and AIX.
compress is allowed for Point-to-Point Protocol in RFC 1977 and for HTTP/1.1 in RFC 9110, though it is rarely used in modern deployments as the better deflate/gzip is available.