compress.1 (c3aac50f284c6cca5b4f2eb46aaa13812cb8b630) compress.1 (fae643c5795db2d9bf031c6db8a70ba8d6978c62)
1.\" Copyright (c) 1986, 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" James A. Woods, derived from original work by Spencer Thomas
6.\" and Joseph Orost.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 77 unchanged lines hidden (view full) ---

86.Pp
87If no files are specified, the standard input is compressed or uncompressed
88to the standard output.
89If either the input and output files are not regular files, the checks for
90reduction in size and file overwriting are not performed, the input file is
91not removed, and the attributes of the input file are not retained.
92.Pp
93The options are as follows:
1.\" Copyright (c) 1986, 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" James A. Woods, derived from original work by Spencer Thomas
6.\" and Joseph Orost.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 77 unchanged lines hidden (view full) ---

86.Pp
87If no files are specified, the standard input is compressed or uncompressed
88to the standard output.
89If either the input and output files are not regular files, the checks for
90reduction in size and file overwriting are not performed, the input file is
91not removed, and the attributes of the input file are not retained.
92.Pp
93The options are as follows:
94.Bl -tag -width Ds
94.Bl -tag -width indent
95.It Fl b
96Specify the
97.Ar bits
98code limit (see below).
99.It Fl c
100Compressed or uncompressed output is written to the standard output.
101No files are modified.
102.It Fl f

--- 14 unchanged lines hidden (view full) ---

117.Fl b
118flag is reached (the default is 16).
119.Ar Bits
120must be between 9 and 16.
121.Pp
122After the
123.Ar bits
124limit is reached,
95.It Fl b
96Specify the
97.Ar bits
98code limit (see below).
99.It Fl c
100Compressed or uncompressed output is written to the standard output.
101No files are modified.
102.It Fl f

--- 14 unchanged lines hidden (view full) ---

117.Fl b
118flag is reached (the default is 16).
119.Ar Bits
120must be between 9 and 16.
121.Pp
122After the
123.Ar bits
124limit is reached,
125.Nm compress
125.Nm
126periodically checks the compression ratio.
127If it is increasing,
126periodically checks the compression ratio.
127If it is increasing,
128.Nm compress
128.Nm
129continues to use the existing code dictionary.
130However, if the compression ratio decreases,
129continues to use the existing code dictionary.
130However, if the compression ratio decreases,
131.Nm compress
131.Nm
132discards the table of substrings and rebuilds it from scratch. This allows
133the algorithm to adapt to the next "block" of the file.
134.Pp
135The
136.Fl b
137flag is omitted for
138.Nm uncompress
139since the

--- 8 unchanged lines hidden (view full) ---

148input, the number of
149.Ar bits
150per code, and the distribution of common substrings.
151Typically, text such as source code or English is reduced by 50\-60%.
152Compression is generally much better than that achieved by Huffman
153coding (as used in the historical command pack), or adaptive Huffman
154coding (as used in the historical command compact), and takes less
155time to compute.
132discards the table of substrings and rebuilds it from scratch. This allows
133the algorithm to adapt to the next "block" of the file.
134.Pp
135The
136.Fl b
137flag is omitted for
138.Nm uncompress
139since the

--- 8 unchanged lines hidden (view full) ---

148input, the number of
149.Ar bits
150per code, and the distribution of common substrings.
151Typically, text such as source code or English is reduced by 50\-60%.
152Compression is generally much better than that achieved by Huffman
153coding (as used in the historical command pack), or adaptive Huffman
154coding (as used in the historical command compact), and takes less
155time to compute.
156.Pp
156.Sh DIAGNOSTICS
157The
157The
158.Nm compress
158.Nm
159utility exits 0 on success, and >0 if an error occurs.
160.Sh SEE ALSO
161.Rs
162.%A Welch, Terry A.
163.%D June, 1984
164.%T "A Technique for High Performance Data Compression"
165.%J "IEEE Computer"
166.%V 17:6
167.%P pp. 8-19
168.Re
169.Sh HISTORY
170The
171.Nm
172command appeared in
173.Bx 4.3 .
159utility exits 0 on success, and >0 if an error occurs.
160.Sh SEE ALSO
161.Rs
162.%A Welch, Terry A.
163.%D June, 1984
164.%T "A Technique for High Performance Data Compression"
165.%J "IEEE Computer"
166.%V 17:6
167.%P pp. 8-19
168.Re
169.Sh HISTORY
170The
171.Nm
172command appeared in
173.Bx 4.3 .