home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
c
/
uncompress_doc
< prev
next >
Wrap
Text File
|
1995-02-27
|
5KB
|
199 lines
COMPRESS(1) USER COMMANDS COMPRESS(1)
NAME
compress, uncompress, zcat - compress or expand files,
display expanded contents
SYNOPSIS
compress [ -cfv ] [ -b _b_i_t_s ] [ _f_i_l_e_n_a_m_e... ]
uncompress [ -cv ] [ _f_i_l_e_n_a_m_e... ]
zcat [ _f_i_l_e_n_a_m_e... ]
DESCRIPTION
compress reduces the size of the named files using adaptive
Lempel-Ziv coding. Whenever possible, each file is replaced
by one with the extension .Z, while keeping the same owner-
ship modes, as well as access and modification times. If
no files are specified, the standard input is compressed to
the standard output.
The amount of compression obtained depends on the size of
the input, the number of _b_i_t_s per code, and the distribution
of common substrings. Typically, text such as source code
or English is reduced by 50-60%. Compression is generally
much better than that achieved by Huffman coding (as used in
sys-unconfig(8)), or adaptive Huffman coding (old-
compact(1)), and takes less time to compute. The _b_i_t_s
parameter specified during compression is encoded within the
compressed file, along with a magic number to ensure that
neither decompression of random data nor recompression of
compressed data is subsequently allowed.
Compressed files can be restored to their original form
using uncompress.
zcat produces uncompressed output on the standard output,
but leaves the compressed .Z file intact.
OPTIONS
-c Write to the standard output; no files are changed.
The nondestructive behavior of zcat is identical to
that of `uncompress -c'.
-f Force compression, even if the file does not actually
shrink, or the corresponding .Z file already exists.
Except when running in the background (under sh(1)), if
-f is not given, prompt to verify whether an existing
.Z file should be overwritten.
-v Verbose. Display the percentage reduction for each
file compressed.
-b _b_i_t_s
Sun Release 4.1 Last change: 9 September 1987 1
COMPRESS(1) USER COMMANDS COMPRESS(1)
Set the upper limit (in bits) for common substring
codes. _b_i_t_s must be between 9 and 16 (16 is the
default).
SEE ALSO
ln(1V), old-compact(1), sh(1), sys-unconfig(8)
_A _T_e_c_h_n_i_q_u_e _f_o_r _H_i_g_h _P_e_r_f_o_r_m_a_n_c_e _D_a_t_a _C_o_m_p_r_e_s_s_i_o_n, Terry A.
Welch, _c_o_m_p_u_t_e_r, vol. 17, no. 6 (June 1984), pp. 8-19.
DIAGNOSTICS
Exit status is normally 0. If the last file was not
compressed because it became larger, the status is 2. If an
error occurs, exit status is 1.
Usage: compress [-fvc] [-b maxbits] [_f_i_l_e_n_a_m_e...]
Invalid options were specified on the command
line.
Missing maxbits
Maxbits must follow -b .
_f_i_l_e_n_a_m_e: not in compressed format
The file specified to uncompress has not been
compressed.
_f_i_l_e_n_a_m_e: compressed with _x_xbits, can only handle _y_ybits
_f_i_l_e_n_a_m_e was compressed by a program that could
deal with more _b_i_t_s than the compress code on this
machine. Recompress the file with smaller _b_i_t_s.
_f_i_l_e_n_a_m_e: already has .Z suffix -- no change
The file is assumed to be already compressed.
Rename the file and try again.
_f_i_l_e_n_a_m_e: already exists; do you wish to overwrite (y or n)?
Respond y if you want the output file to be
replaced; n if not.
uncompress: corrupt input
A SIGSEGV violation was detected, which usually
means that the input file is corrupted.
Compression: _x_x._x_x%
Percentage of the input saved by compression.
(Relevant only for -v.)
-- not a regular file: unchanged
When the input file is not a regular file, (such
as a directory), it is left unaltered.
-- has _x_x other links: unchanged
Sun Release 4.1 Last change: 9 September 1987 2
COMPRESS(1) USER COMMANDS COMPRESS(1)
The input file has links; it is left unchanged.
See ln(1V) for more information.
-- file unchanged
No savings are achieved by compression. The input
remains uncompressed.
BUGS
Although compressed files are compatible between machines
with large memory, -b12 should be used for file transfer to
architectures with a small process data space (64KB or
less).
compress should be more flexible about the existence of the
.Z suffix.
Sun Release 4.1 Last change: 9 September 1987 3