📄 compact.1
字号:
.\" Copyright (c) 1980.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)compact.1 6.2 (Berkeley) 4/2/94.\".TH COMPACT 1 "April 2, 1994".UC 4.SH NAMEcompact, uncompact, ccat \- compress and uncompress files, and cat them.SH SYNOPSIS.B compact[.B \-v] [ name ... ].br.B uncompact[.B \-v] [ name ... ].br.B ccat[.B \-v] [ file ... ].SH DESCRIPTION.I Compactcompresses the named files using an adaptive Huffman code. If no filenames are given, the standard input is compacted to the standard output..I Compactoperates as an on-line algorithm. Each time a byte is read,it is encoded immediately according to the current prefix code.This code is an optimal Huffman code for the set of frequencies seen so far.It is unnecessary to prepend a decoding tree to the compressed filesince the encoder and the decoder start in the same state and staysynchronized. Furthermore,.I compactand.I uncompactcan operate as filters. In particular,.sp ... | compact | uncompact | ....br.spoperates as a (very slow) no-op..PPWhen an argument.I fileis given, it is compacted and the resulting file is placed in.I file.C;.I fileis unlinked. The first two bytes of the compacted file code thefact that the file is compacted. This code is used to prohibit recompaction..PPThe amount of compression to be expected depends on the type of file beingcompressed. Typical values of compression are:Text (38%), Pascal Source (43%), C Source (36%) and Binary (19%).These values are the percentages of file bytes reduced..PP.I Uncompactrestores the original file from a file compressed by.I compact.If no file names are given, the standard input is uncompacted tothe standard output..PP.I Ccatcats the original file from a file compressed by.I compact,without uncompressing the file (it is just a shell script whichdirects the uncompacted output to the standard output)..PP.IR Compact ,.IR uncompact ,and.I ccatnormally do their work silently. If a.B \-vflag is supplied, .I compactwill report the compression percentage for each compactedfile while .I uncompactand.I ccatwill print out the name of each file as they're uncompacted..SH RESTRICTIONThe last segment of the filename must be short enoughto allow space for the appended '.C'..SH FILES.ta 1i*.C compacted file created by compact, removed by uncompact.SH "SEE ALSO"Gallager, Robert G., `Variations on a Theme of Huffman',.I "I.E.E.E. Transactions on Information Theory,"vol. IT-24, no. 6, November 1978, pp. 668 - 674..SH AUTHORColin L. Mc Master
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -