version 1.5, 1997/08/19 06:33:37 |
version 1.6, 1998/09/23 04:32:38 |
|
|
.\".Nm zcat |
.\".Nm zcat |
.\".Op Ar |
.\".Op Ar |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm Compress |
.Nm compress |
reduces the size of the named files using adaptive Lempel-Ziv coding. |
reduces the size of the named files using adaptive Lempel-Ziv coding. |
Each |
Each |
.Ar file |
.Ar file |
|
|
.Ar file , |
.Ar file , |
the file is ignored. |
the file is ignored. |
.Pp |
.Pp |
.Nm Uncompress |
.Nm uncompress |
restores the compressed files to their original form, renaming the |
restores the compressed files to their original form, renaming the |
files by deleting the |
files by deleting the |
.Dq .Z |
.Dq .Z |
|
|
.Pp |
.Pp |
The options are as follows: |
The options are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl b |
.It Fl b Ar bits |
Specify the |
Specify the |
.Ar bits |
.Ar bits |
code limit (see below). |
code limit (see below). |
|
|
even if it is not actually reduced in size. |
even if it is not actually reduced in size. |
Additionally, files are overwritten without prompting for confirmation. |
Additionally, files are overwritten without prompting for confirmation. |
.It Fl g |
.It Fl g |
Use deflate scheme wich reported to provide better compression rates. |
Use deflate scheme which reportedly provides better compression rates. |
.It Fl O |
.It Fl O |
Use old compression method (default is based on the program name). |
Use old compression method (default is based on the program name). |
.It Fl o |
.It Fl o Ar filename |
Set the output file name. |
Set the output file name. |
.It Fl t |
.It Fl t |
Test the entefrity of each file leaving any files intact. |
Test the integrity of each file leaving any files intact. |
.It Fl q |
.It Fl q |
Be quite, suppress any messages. |
Be quiet, suppress any messages. |
.It Fl v |
.It Fl v |
Print the percentage reduction of each file. |
Print the percentage reduction of each file. |
.El |
.El |
.Pp |
.Pp |
.Nm Compress |
.Nm compress |
uses a modified Lempel-Ziv algorithm. |
uses a modified Lempel-Ziv algorithm. |
Common substrings in the file are first replaced by 9-bit codes 257 and up. |
Common substrings in the file are first replaced by 9-bit codes 257 and up. |
When code 512 is reached, the algorithm switches to 10-bit codes and |
When code 512 is reached, the algorithm switches to 10-bit codes and |
|
|
limit specified by the |
limit specified by the |
.Fl b |
.Fl b |
flag is reached (the default is 16). |
flag is reached (the default is 16). |
.Ar Bits |
.Ar bits |
must be between 9 and 16. |
must be between 9 and 16. |
.Pp |
.Pp |
After the |
After the |
|
|
.Pp |
.Pp |
The |
The |
.Nm compress |
.Nm compress |
utility exits 0 on success, 1 if an error occurs, and 2 if one or |
utility exits 0 on success, 1 if an error occurred, or 2 if one or |
more files were not compressed because they would have grown in |
more files were not compressed because they would have grown in |
size (and -f was not specifed). |
size (and |
|
.Fl f |
|
was not specifed). |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Rs |
.Rs |
.%A Welch, Terry A. |
.%A Welch, Terry A. |
|
|
.Nm |
.Nm |
command appeared in |
command appeared in |
.Bx 4.3 . |
.Bx 4.3 . |
The deflate compression support added in |
The deflate compression support was added in |
.Ox 2.1 . |
.Ox 2.1 . |