⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gzip.texi

📁 gzip1.2.4源码
💻 TEXI
📖 第 1 页 / 共 2 页
字号:
\input texinfo @c -*-texinfo-*-@c %**start of header@setfilename gzip.info@settitle Gzip User's Manual@finalout@setchapternewpage odd@c %**end of header@ifinfoThis file documents the the GNU @code{gzip} command for compressing files.Copyright (C) 1992-1993 Jean-loup GaillyPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.@ignorePermission is granted to process this file through TeX and print theresults, provided the printed document carries copying permissionnotice identical to this one except for the removal of this paragraph(this paragraph not being relevant to the printed manual).@end ignorePermission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translation approvedby the Foundation.@end ifinfo@titlepage@title gzip@subtitle The data compression program@subtitle Edition 1.2.4, for Gzip Version 1.2.4@subtitle July 1993@author by Jean-loup Gailly@page@vskip 0pt plus 1filllCopyright @copyright{} 1992-1993 Jean-loup GaillyPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.Permission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translation approvedby the Foundation.@end titlepage@node Top, , , (dir)@ifinfoThis file documents the @code{gzip} command to compress files.@end ifinfo@menu* Copying::		How you can copy and share @code{gzip}.* Overview::		Preliminary information.* Sample::		Sample output from @code{gzip}.* Invoking gzip::	How to run @code{gzip}.* Advanced usage::	Concatenated files.* Environment::		The @code{GZIP} environment variable* Tapes::               Using @code{gzip} on tapes.* Problems::		Reporting bugs.* Concept Index::	Index of concepts.@end menu@node Copying, Overview, , Top@include gpl.texinfo@node Overview, Sample, Copying, Top@chapter Overview@cindex overview@code{gzip} reduces the size of the named files using Lempel-Ziv coding(LZ77).  Whenever possible, each file is replaced by one with theextension @samp{.gz}, while keeping the same ownership modes, access andmodification times.  (The default extension is @samp{-gz} for VMS,@samp{z} for MSDOS, OS/2 FAT and Atari.)  If no files are specified orif a file name is "-", the standard input is compressed to the standardoutput. @code{gzip} will only attempt to compress regular files.  Inparticular, it will ignore symbolic links.If the new file name is too long for its file system, @code{gzip}truncates it.  @code{gzip} attempts to truncate only the parts of thefile name longer than 3 characters.  (A part is delimited by dots.) Ifthe name consists of small parts only, the longest parts are truncated.For example, if file names are limited to 14 characters, gzip.msdos.exeis compressed to gzi.msd.exe.gz.  Names are not truncated on systemswhich do not have a limit on file name length.By default, @code{gzip} keeps the original file name and timestamp inthe compressed file. These are used when decompressing the file with the@samp{-N} option. This is useful when the compressed file name wastruncated or when the time stamp was not preserved after a filetransfer.Compressed files can be restored to their original form using @samp{gzip -d}or @code{gunzip} or @code{zcat}.  If the original name saved in thecompressed file is not suitable for its file system, a new name isconstructed from the original one to make it legal.@code{gunzip} takes a list of files on its command line and replaceseach file whose name ends with @samp{.gz}, @samp{.z}, @samp{.Z},@samp{-gz}, @samp{-z} or @samp{_z} and which begins with the correctmagic number with an uncompressed file without the original extension.@code{gunzip} also recognizes the special extensions @samp{.tgz} and@samp{.taz} as shorthands for @samp{.tar.gz} and @samp{.tar.Z}respectively. When compressing, @code{gzip} uses the @samp{.tgz}extension if necessary instead of truncating a file with a @samp{.tar}extension.@code{gunzip} can currently decompress files created by @code{gzip},@code{zip}, @code{compress} or @code{pack}. The detection of the inputformat is automatic.  When using the first two formats, @code{gunzip}checks a 32 bit CRC (cyclic redundancy check). For @code{pack},@code{gunzip} checks the uncompressed length. The @code{compress} formatwas not designed to allow consistency checks. However @code{gunzip} issometimes able to detect a bad @samp{.Z} file. If you get an error whenuncompressing a @samp{.Z} file, do not assume that the @samp{.Z} file iscorrect simply because the standard @code{uncompress} does not complain.This generally means that the standard @code{uncompress} does not checkits input, and happily generates garbage output.  The SCO @samp{compress-H} format (@code{lzh} compression method) does not include a CRC butalso allows some consistency checks.Files created by @code{zip} can be uncompressed by @code{gzip} only ifthey have a single member compressed with the 'deflation' method. Thisfeature is only intended to help conversion of @code{tar.zip} files tothe @code{tar.gz} format. To extract @code{zip} files with severalmembers, use @code{unzip} instead of @code{gunzip}.@code{zcat} is identical to @samp{gunzip -c}.  @code{zcat}uncompresses either a list of files on the command line or its standardinput and writes the uncompressed data on standard output.  @code{zcat}will uncompress files that have the correct magic number whether theyhave a @samp{.gz} suffix or not.@code{gzip} uses the Lempel-Ziv algorithm used in @code{zip} and PKZIP.The amount of compression obtained depends on the size of the input andthe distribution of common substrings.  Typically, text such as sourcecode or English is reduced by 60-70%.  Compression is generally muchbetter than that achieved by LZW (as used in @code{compress}), Huffmancoding (as used in @code{pack}), or adaptive Huffman coding(@code{compact}).Compression is always performed, even if the compressed file is slightlylarger than the original. The worst case expansion is a few bytes forthe @code{gzip} file header, plus 5 bytes every 32K block, or an expansionratio of 0.015% for large files. Note that the actual number of useddisk blocks almost never increases. @code{gzip} preserves the mode,ownership and timestamps of files when compressing or decompressing.@node Sample, Invoking gzip, Overview, Top@chapter Sample Output@cindex sampleHere are some realistic examples of running @code{gzip}.This is the output of the command @samp{gzip -h}:@examplegzip 1.2.4 (18 Aug 93)usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...] -c --stdout      write on standard output, keep original files unchanged -d --decompress  decompress -f --force       force overwrite of output file and compress links -h --help        give this help -l --list        list compressed file contents -L --license     display software license -n --no-name     do not save or restore the original name and time stamp -N --name        save or restore the original name and time stamp -q --quiet       suppress all warnings -r --recursive   operate recursively on directories -S .suf  --suffix .suf     use suffix .suf on compressed files -t --test        test compressed file integrity -v --verbose     verbose mode -V --version     display version number -1 --fast        compress faster -9 --best        compress better file...          files to (de)compress. If none given, use standard input.@end exampleThis is the output of the command @samp{gzip -v texinfo.tex}:@exampletexinfo.tex:             71.6% -- replaced with texinfo.tex.gz@end exampleThe following command will find all @code{gzip} files in the currentdirectory and subdirectories, and extract them in place withoutdestroying the original:@examplefind . -name '*.gz' -print | sed 's/^\(.*\)[.]gz$/gunzip < "&" > "\1"/' | sh@end example@node Invoking gzip, Advanced usage, Sample, Top@chapter Invoking @code{gzip}@cindex invoking@cindex optionsThe format for running the @code{gzip} program is:@examplegzip @var{option} @dots{}@end example@code{gzip} supports the following options:@table @samp@item --stdout@itemx --to-stdout@itemx -cWrite output on standard output; keep original files unchanged.If there are several input files, the output consists of a sequence ofindependently compressed members. To obtain better compression,concatenate all input files before compressing them.@item --decompress@itemx --uncompress@itemx -dDecompress.@item --force@itemx -fForce compression or decompression even if the file has multiple linksor the corresponding file already exists, or if the compressed data

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -