Apply rev 1.21 from src/lib/libcrypto/man/ssl.3:
[netbsd-mini2440.git] / usr.bin / gzip / gzip.1
blob0cdea5ddd6df714cab50bb2cb64c040ca8577121
1 .\"     $NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $
2 .\"
3 .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .Dd April 1, 2009
28 .Dt GZIP 1
29 .Os
30 .Sh NAME
31 .Nm gzip
32 .Nd compression/decompression tool using Lempel-Ziv coding (LZ77)
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl cdfhlNnqrtVv
36 .Op Fl S Ar suffix
37 .Ar file
38 .Oo
39 .Ar file Oo ...
40 .Oc
41 .Oc
42 .Nm gunzip
43 .Op Fl cfhNqrtVv
44 .Op Fl S Ar suffix
45 .Ar file
46 .Oo
47 .Ar file Oo ...
48 .Oc
49 .Oc
50 .Nm zcat
51 .Op Fl fhV
52 .Ar file
53 .Oo
54 .Ar file Oo ...
55 .Oc
56 .Oc
57 .Sh DESCRIPTION
58 The
59 .Nm
60 program compresses and decompresses files using Lempel-Ziv coding
61 (LZ77).
62 If no
63 .Ar files
64 are specified,
65 .Nm
66 will compress from standard input, or decompress to standard output.
67 When in compression mode, each
68 .Ar file
69 will be replaced with another file with the suffix, set by the
70 .Fl S Ar suffix
71 option, added, if possible.
72 In decompression mode, each
73 .Ar file
74 will be checked for existence, as will the file with the suffix
75 added.
76 .Pp
77 If invoked as
78 .Nm gunzip
79 then the
80 .Fl d
81 option is enabled.
82 If invoked as
83 .Nm zcat
85 .Nm gzcat
86 then both the
87 .Fl c
88 and
89 .Fl d
90 options are enabled.
91 .Pp
92 This version of
93 .Nm
94 is also capable of decompressing files compressed using
95 .Xr compress 1
97 .Xr bzip2 1 .
98 .Sh OPTIONS
99 The following options are available:
100 .Bl -tag -width XXrXXXrecursiveX
101 .It Fl 1 , -fast
102 .It Fl 2
103 .It Fl 3
104 .It Fl 4
105 .It Fl 5
106 .It Fl 6
107 .It Fl 7
108 .It Fl 8
109 .It Fl 9 , -best
110 These options change the compression level used, with the
111 .Fl 1
112 option being the fastest, with less compression, and the
113 .Fl 9
114 option being the slowest, with optimal compression.
115 The default compression level is 6.
116 .It Fl c , -stdout , -to-stdout
117 This option specifies that output will go to the standard output
118 stream, leaving files intact.
119 .It Fl d , -decompress , -uncompress
120 This option selects decompression rather than compression.
121 .It Fl f , -force
122 This option turns on force mode.
123 This allows files with multiple links, overwriting of pre-existing
124 files, reading from or writing to a terminal, and when combined
125 with the
126 .Fl c
127 option, allowing non-compressed data to pass through unchanged.
128 .It Fl h , -help
129 This option prints a usage summary and exits.
130 .It Fl l , -list
131 This option displays information about the file's compressed and
132 uncompressed size, ratio, uncompressed name.
133 With the
134 .Fl v
135 option, it also displays the compression method, CRC, date and time
136 embedded in the file.
137 .It Fl N , -name
138 This option causes the stored filename in the input file to be used
139 as the output file.
140 .It Fl n , -no-name
141 This option stops the filename and timestamp from being stored in
142 the output file.
143 .It Fl q , -quiet
144 With this option, no warnings or errors are printed.
145 .It Fl r , -recursive
146 This option is used to
148 the files in a directory tree individually, using the
149 .Xr fts 3
150 library.
151 .It Fl S Ar suffix , Fl -suffix Ar suffix
152 This option changes the default suffix from .gz to
153 .Ar suffix .
154 .It Fl t , -test
155 This option will test compressed files for integrity.
156 .It Fl V , -version
157 This option prints the version of the
159 program.
160 .It Fl v , -verbose
161 This option turns on verbose mode, which prints the compression
162 ratio for each file compressed.
164 .Sh ENVIRONMENT
165 If the environment variable
166 .Ev GZIP
167 is set, it is parsed as a white-space separated list of options
168 handled before any options on the command line.
169 Options on the command line will override anything in
170 .Ev GZIP .
171 .Sh SEE ALSO
172 .Xr bzip2 1 ,
173 .Xr compress 1 ,
174 .Xr fts 3 ,
175 .Xr zlib 3
176 .Sh HISTORY
179 program was originally written by Jean-loup Gailly, licensed under
180 the GNU Public Licence.
181 Matthew R. Green wrote a simple front end for
182 .Nx 1.3
183 distribution media, based on the freely re-distributable zlib library.
184 It was enhanced to be mostly feature-compatible with the original
187 program for
188 .Nx 2.0 .
190 This manual documents
193 version 20040427.
194 .Sh AUTHORS
195 This implementation of
197 was written by
198 .An Matthew R. Green Aq mrg@eterna.com.au .