BSD 4_4_Lite2 development
[unix-history] / usr / src / contrib / gzip-1.2.4 / gzip.info
CommitLineData
d91b7e23
C
1Info file gzip.info, produced by Makeinfo, -*- Text -*- from input
2file gzip.texi.
3
4 This file documents the the GNU `gzip' command for compressing
5files.
6
7 Copyright (C) 1992-1993 Jean-loup Gailly
8
9 Permission is granted to make and distribute verbatim copies of
10this manual provided the copyright notice and this permission notice
11are preserved on all copies.
12
13 Permission is granted to copy and distribute modified versions of
14this manual under the conditions for verbatim copying, provided that
15the entire resulting derived work is distributed under the terms of a
16permission notice identical to this one.
17
18 Permission is granted to copy and distribute translations of this
19manual into another language, under the above conditions for modified
20versions, except that this permission notice may be stated in a
21translation approved by the Foundation.
22
23\1f
24File: gzip.info, Node: Top, Up: (dir)
25
26 This file documents the `gzip' command to compress files.
27
28* Menu:
29
30* Copying:: How you can copy and share `gzip'.
31* Overview:: Preliminary information.
32* Sample:: Sample output from `gzip'.
33* Invoking gzip:: How to run `gzip'.
34* Advanced usage:: Concatenated files.
35* Environment:: The `GZIP' environment variable
36* Tapes:: Using `gzip' on tapes.
37* Problems:: Reporting bugs.
38* Concept Index:: Index of concepts.
39
40\1f
41File: gzip.info, Node: Copying, Next: Overview, Up: Top
42
43GNU GENERAL PUBLIC LICENSE
44**************************
45
46 Version 2, June 1991
47
48 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
49 675 Mass Ave, Cambridge, MA 02139, USA
50
51 Everyone is permitted to copy and distribute verbatim copies
52 of this license document, but changing it is not allowed.
53
54Preamble
55========
56
57 The licenses for most software are designed to take away your
58freedom to share and change it. By contrast, the GNU General Public
59License is intended to guarantee your freedom to share and change free
60software--to make sure the software is free for all its users. This
61General Public License applies to most of the Free Software
62Foundation's software and to any other program whose authors commit to
63using it. (Some other Free Software Foundation software is covered by
64the GNU Library General Public License instead.) You can apply it to
65your programs, too.
66
67 When we speak of free software, we are referring to freedom, not
68price. Our General Public Licenses are designed to make sure that you
69have the freedom to distribute copies of free software (and charge for
70this service if you wish), that you receive source code or can get it
71if you want it, that you can change the software or use pieces of it
72in new free programs; and that you know you can do these things.
73
74 To protect your rights, we need to make restrictions that forbid
75anyone to deny you these rights or to ask you to surrender the rights.
76These restrictions translate to certain responsibilities for you if you
77distribute copies of the software, or if you modify it.
78
79 For example, if you distribute copies of such a program, whether
80gratis or for a fee, you must give the recipients all the rights that
81you have. You must make sure that they, too, receive or can get the
82source code. And you must show them these terms so they know their
83rights.
84
85 We protect your rights with two steps: (1) copyright the software,
86and (2) offer you this license which gives you legal permission to
87copy, distribute and/or modify the software.
88
89 Also, for each author's protection and ours, we want to make certain
90that everyone understands that there is no warranty for this free
91software. If the software is modified by someone else and passed on,
92we want its recipients to know that what they have is not the
93original, so that any problems introduced by others will not reflect
94on the original authors' reputations.
95
96 Finally, any free program is threatened constantly by software
97patents. We wish to avoid the danger that redistributors of a free
98program will individually obtain patent licenses, in effect making the
99program proprietary. To prevent this, we have made it clear that any
100patent must be licensed for everyone's free use or not licensed at all.
101
102 The precise terms and conditions for copying, distribution and
103modification follow.
104
105 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
106
107 1. This License applies to any program or other work which contains
108 a notice placed by the copyright holder saying it may be
109 distributed under the terms of this General Public License. The
110 "Program", below, refers to any such program or work, and a "work
111 based on the Program" means either the Program or any derivative
112 work under copyright law: that is to say, a work containing the
113 Program or a portion of it, either verbatim or with modifications
114 and/or translated into another language. (Hereinafter,
115 translation is included without limitation in the term
116 "modification".) Each licensee is addressed as "you".
117
118 Activities other than copying, distribution and modification
119 are not covered by this License; they are outside its scope. The
120 act of running the Program is not restricted, and the output from
121 the Program is covered only if its contents constitute a work
122 based on the Program (independent of having been made by running
123 the Program). Whether that is true depends on what the Program
124 does.
125
126 2. You may copy and distribute verbatim copies of the Program's
127 source code as you receive it, in any medium, provided that you
128 conspicuously and appropriately publish on each copy an
129 appropriate copyright notice and disclaimer of warranty; keep
130 intact all the notices that refer to this License and to the
131 absence of any warranty; and give any other recipients of the
132 Program a copy of this License along with the Program.
133
134 You may charge a fee for the physical act of transferring a
135 copy, and you may at your option offer warranty protection in
136 exchange for a fee.
137
138 3. You may modify your copy or copies of the Program or any portion
139 of it, thus forming a work based on the Program, and copy and
140 distribute such modifications or work under the terms of Section 1
141 above, provided that you also meet all of these conditions:
142
143 1. You must cause the modified files to carry prominent notices
144 stating that you changed the files and the date of any
145 change.
146
147 2. You must cause any work that you distribute or publish, that
148 in whole or in part contains or is derived from the Program
149 or any part thereof, to be licensed as a whole at no charge
150 to all third parties under the terms of this License.
151
152 3. If the modified program normally reads commands interactively
153 when run, you must cause it, when started running for such
154 interactive use in the most ordinary way, to print or
155 display an announcement including an appropriate copyright
156 notice and a notice that there is no warranty (or else,
157 saying that you provide a warranty) and that users may
158 redistribute the program under these conditions, and telling
159 the user how to view a copy of this License. (Exception: if
160 the Program itself is interactive but does not normally
161 print such an announcement, your work based on the Program
162 is not required to print an announcement.)
163
164 These requirements apply to the modified work as a whole. If
165 identifiable sections of that work are not derived from the
166 Program, and can be reasonably considered independent and
167 separate works in themselves, then this License, and its terms,
168 do not apply to those sections when you distribute them as
169 separate works. But when you distribute the same sections as
170 part of a whole which is a work based on the Program, the
171 distribution of the whole must be on the terms of this License,
172 whose permissions for other licensees extend to the entire whole,
173 and thus to each and every part regardless of who wrote it.
174
175 Thus, it is not the intent of this section to claim rights or
176 contest your rights to work written entirely by you; rather, the
177 intent is to exercise the right to control the distribution of
178 derivative or collective works based on the Program.
179
180 In addition, mere aggregation of another work not based on the
181 Program with the Program (or with a work based on the Program) on
182 a volume of a storage or distribution medium does not bring the
183 other work under the scope of this License.
184
185 4. You may copy and distribute the Program (or a work based on it,
186 under Section 2) in object code or executable form under the
187 terms of Sections 1 and 2 above provided that you also do one of
188 the following:
189
190 1. Accompany it with the complete corresponding machine-readable
191 source code, which must be distributed under the terms of
192 Sections 1 and 2 above on a medium customarily used for
193 software interchange; or,
194
195 2. Accompany it with a written offer, valid for at least three
196 years, to give any third party, for a charge no more than
197 your cost of physically performing source distribution, a
198 complete machine-readable copy of the corresponding source
199 code, to be distributed under the terms of Sections 1 and 2
200 above on a medium customarily used for software interchange;
201 or,
202
203 3. Accompany it with the information you received as to the
204 offer to distribute corresponding source code. (This
205 alternative is allowed only for noncommercial distribution
206 and only if you received the program in object code or
207 executable form with such an offer, in accord with
208 Subsection b above.)
209
210 The source code for a work means the preferred form of the
211 work for making modifications to it. For an executable work,
212 complete source code means all the source code for all modules it
213 contains, plus any associated interface definition files, plus
214 the scripts used to control compilation and installation of the
215 executable. However, as a special exception, the source code
216 distributed need not include anything that is normally
217 distributed (in either source or binary form) with the major
218 components (compiler, kernel, and so on) of the operating system
219 on which the executable runs, unless that component itself
220 accompanies the executable.
221
222 If distribution of executable or object code is made by
223 offering access to copy from a designated place, then offering
224 equivalent access to copy the source code from the same place
225 counts as distribution of the source code, even though third
226 parties are not compelled to copy the source along with the
227 object code.
228
229 5. You may not copy, modify, sublicense, or distribute the Program
230 except as expressly provided under this License. Any attempt
231 otherwise to copy, modify, sublicense or distribute the Program is
232 void, and will automatically terminate your rights under this
233 License. However, parties who have received copies, or rights,
234 from you under this License will not have their licenses
235 terminated so long as such parties remain in full compliance.
236
237 6. You are not required to accept this License, since you have not
238 signed it. However, nothing else grants you permission to modify
239 or distribute the Program or its derivative works. These actions
240 are prohibited by law if you do not accept this License.
241 Therefore, by modifying or distributing the Program (or any work
242 based on the Program), you indicate your acceptance of this
243 License to do so, and all its terms and conditions for copying,
244 distributing or modifying the Program or works based on it.
245
246 7. Each time you redistribute the Program (or any work based on the
247 Program), the recipient automatically receives a license from the
248 original licensor to copy, distribute or modify the Program
249 subject to these terms and conditions. You may not impose any
250 further restrictions on the recipients' exercise of the rights
251 granted herein. You are not responsible for enforcing compliance
252 by third parties to this License.
253
254 8. If, as a consequence of a court judgment or allegation of patent
255 infringement or for any other reason (not limited to patent
256 issues), conditions are imposed on you (whether by court order,
257 agreement or otherwise) that contradict the conditions of this
258 License, they do not excuse you from the conditions of this
259 License. If you cannot distribute so as to satisfy
260 simultaneously your obligations under this License and any other
261 pertinent obligations, then as a consequence you may not
262 distribute the Program at all. For example, if a patent license
263 would not permit royalty-free redistribution of the Program by
264 all those who receive copies directly or indirectly through you,
265 then the only way you could satisfy both it and this License
266 would be to refrain entirely from distribution of the Program.
267
268 If any portion of this section is held invalid or
269 unenforceable under any particular circumstance, the balance of
270 the section is intended to apply and the section as a whole is
271 intended to apply in other circumstances.
272
273 It is not the purpose of this section to induce you to
274 infringe any patents or other property right claims or to contest
275 validity of any such claims; this section has the sole purpose of
276 protecting the integrity of the free software distribution
277 system, which is implemented by public license practices. Many
278 people have made generous contributions to the wide range of
279 software distributed through that system in reliance on
280 consistent application of that system; it is up to the
281 author/donor to decide if he or she is willing to distribute
282 software through any other system and a licensee cannot impose
283 that choice.
284
285 This section is intended to make thoroughly clear what is
286 believed to be a consequence of the rest of this License.
287
288 9. If the distribution and/or use of the Program is restricted in
289 certain countries either by patents or by copyrighted interfaces,
290 the original copyright holder who places the Program under this
291 License may add an explicit geographical distribution limitation
292 excluding those countries, so that distribution is permitted only
293 in or among countries not thus excluded. In such case, this
294 License incorporates the limitation as if written in the body of
295 this License.
296
297 10. The Free Software Foundation may publish revised and/or new
298 versions of the General Public License from time to time. Such
299 new versions will be similar in spirit to the present version,
300 but may differ in detail to address new problems or concerns.
301
302 Each version is given a distinguishing version number. If the
303 Program specifies a version number of this License which applies
304 to it and "any later version", you have the option of following
305 the terms and conditions either of that version or of any later
306 version published by the Free Software Foundation. If the
307 Program does not specify a version number of this License, you
308 may choose any version ever published by the Free Software
309 Foundation.
310
311 11. If you wish to incorporate parts of the Program into other free
312 programs whose distribution conditions are different, write to
313 the author to ask for permission. For software which is
314 copyrighted by the Free Software Foundation, write to the Free
315 Software Foundation; we sometimes make exceptions for this. Our
316 decision will be guided by the two goals of preserving the free
317 status of all derivatives of our free software and of promoting
318 the sharing and reuse of software generally.
319
320 NO WARRANTY
321
322 12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
323 WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
324 LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
325 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
326 WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
327 NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
328 FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
329 QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
330 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
331 SERVICING, REPAIR OR CORRECTION.
332
333 13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
334 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
335 MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
336 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
337 INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
338 INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS
339 OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
340 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
341 ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
342 ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
343
344 END OF TERMS AND CONDITIONS
345
346How to Apply These Terms to Your New Programs
347=============================================
348
349 If you develop a new program, and you want it to be of the greatest
350possible use to the public, the best way to achieve this is to make it
351free software which everyone can redistribute and change under these
352terms.
353
354 To do so, attach the following notices to the program. It is safest
355to attach them to the start of each source file to most effectively
356convey the exclusion of warranty; and each file should have at least
357the "copyright" line and a pointer to where the full notice is found.
358
359 ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES.
360 Copyright (C) 19YY NAME OF AUTHOR
361
362 This program is free software; you can redistribute it and/or
363 modify it under the terms of the GNU General Public License
364 as published by the Free Software Foundation; either version 2
365 of the License, or (at your option) any later version.
366
367 This program is distributed in the hope that it will be useful,
368 but WITHOUT ANY WARRANTY; without even the implied warranty of
369 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
370 GNU General Public License for more details.
371
372 You should have received a copy of the GNU General Public License
373 along with this program; if not, write to the Free Software
374 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
375
376 Also add information on how to contact you by electronic and paper
377mail.
378
379 If the program is interactive, make it output a short notice like
380this when it starts in an interactive mode:
381
382 Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
383 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
384 type `show w'. This is free software, and you are welcome
385 to redistribute it under certain conditions; type `show c'
386 for details.
387
388 The hypothetical commands `show w' and `show c' should show the
389appropriate parts of the General Public License. Of course, the
390commands you use may be called something other than `show w' and `show
391c'; they could even be mouse-clicks or menu items--whatever suits your
392program.
393
394 You should also get your employer (if you work as a programmer) or
395your school, if any, to sign a "copyright disclaimer" for the program,
396if necessary. Here is a sample; alter the names:
397
398 Yoyodyne, Inc., hereby disclaims all copyright
399 interest in the program `Gnomovision'
400 (which makes passes at compilers) written
401 by James Hacker.
402
403 SIGNATURE OF TY COON, 1 April 1989
404 Ty Coon, President of Vice
405
406 This General Public License does not permit incorporating your
407program into proprietary programs. If your program is a subroutine
408library, you may consider it more useful to permit linking proprietary
409applications with the library. If this is what you want to do, use
410the GNU Library General Public License instead of this License.
411
412\1f
413File: gzip.info, Node: Overview, Next: Sample, Prev: Copying, Up: Top
414
415Overview
416********
417
418 `gzip' reduces the size of the named files using Lempel-Ziv coding
419(LZ77). Whenever possible, each file is replaced by one with the
420extension `.gz', while keeping the same ownership modes, access and
421modification times. (The default extension is `-gz' for VMS, `z' for
422MSDOS, OS/2 FAT and Atari.) If no files are specified or if a file
423name is "-", the standard input is compressed to the standard output.
424`gzip' will only attempt to compress regular files. In particular, it
425will ignore symbolic links.
426
427 If the new file name is too long for its file system, `gzip'
428truncates it. `gzip' attempts to truncate only the parts of the file
429name longer than 3 characters. (A part is delimited by dots.) If the
430name consists of small parts only, the longest parts are truncated.
431For example, if file names are limited to 14 characters, gzip.msdos.exe
432is compressed to gzi.msd.exe.gz. Names are not truncated on systems
433which do not have a limit on file name length.
434
435 By default, `gzip' keeps the original file name and timestamp in
436the compressed file. These are used when decompressing the file with
437the `-N' option. This is useful when the compressed file name was
438truncated or when the time stamp was not preserved after a file
439transfer.
440
441 Compressed files can be restored to their original form using `gzip
442-d' or `gunzip' or `zcat'. If the original name saved in the
443compressed file is not suitable for its file system, a new name is
444constructed from the original one to make it legal.
445
446 `gunzip' takes a list of files on its command line and replaces
447each file whose name ends with `.gz', `.z', `.Z', `-gz', `-z' or `_z'
448and which begins with the correct magic number with an uncompressed
449file without the original extension. `gunzip' also recognizes the
450special extensions `.tgz' and `.taz' as shorthands for `.tar.gz' and
451`.tar.Z' respectively. When compressing, `gzip' uses the `.tgz'
452extension if necessary instead of truncating a file with a `.tar'
453extension.
454
455 `gunzip' can currently decompress files created by `gzip', `zip',
456`compress' or `pack'. The detection of the input format is automatic.
457When using the first two formats, `gunzip' checks a 32 bit CRC (cyclic
458redundancy check). For `pack', `gunzip' checks the uncompressed
459length. The `compress' format was not designed to allow consistency
460checks. However `gunzip' is sometimes able to detect a bad `.Z' file.
461If you get an error when uncompressing a `.Z' file, do not assume that
462the `.Z' file is correct simply because the standard `uncompress' does
463not complain. This generally means that the standard `uncompress'
464does not check its input, and happily generates garbage output. The
465SCO `compress -H' format (`lzh' compression method) does not include a
466CRC but also allows some consistency checks.
467
468 Files created by `zip' can be uncompressed by `gzip' only if they
469have a single member compressed with the 'deflation' method. This
470feature is only intended to help conversion of `tar.zip' files to the
471`tar.gz' format. To extract `zip' files with several members, use
472`unzip' instead of `gunzip'.
473
474 `zcat' is identical to `gunzip -c'. `zcat' uncompresses either a
475list of files on the command line or its standard input and writes the
476uncompressed data on standard output. `zcat' will uncompress files
477that have the correct magic number whether they have a `.gz' suffix or
478not.
479
480 `gzip' uses the Lempel-Ziv algorithm used in `zip' and PKZIP. The
481amount of compression obtained depends on the size of the input and
482the distribution of common substrings. Typically, text such as source
483code or English is reduced by 60-70%. Compression is generally much
484better than that achieved by LZW (as used in `compress'), Huffman
485coding (as used in `pack'), or adaptive Huffman coding (`compact').
486
487 Compression is always performed, even if the compressed file is
488slightly larger than the original. The worst case expansion is a few
489bytes for the `gzip' file header, plus 5 bytes every 32K block, or an
490expansion ratio of 0.015% for large files. Note that the actual number
491of used disk blocks almost never increases. `gzip' preserves the mode,
492ownership and timestamps of files when compressing or decompressing.
493
494\1f
495File: gzip.info, Node: Sample, Next: Invoking gzip, Prev: Overview, Up: Top
496
497Sample Output
498*************
499
500 Here are some realistic examples of running `gzip'.
501
502 This is the output of the command `gzip -h':
503
504 gzip 1.2.4 (18 Aug 93)
505 usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
506 -c --stdout write on standard output, keep original files unchanged
507 -d --decompress decompress
508 -f --force force overwrite of output file and compress links
509 -h --help give this help
510 -l --list list compressed file contents
511 -L --license display software license
512 -n --no-name do not save or restore the original name and time stamp
513 -N --name save or restore the original name and time stamp
514 -q --quiet suppress all warnings
515 -r --recursive operate recursively on directories
516 -S .suf --suffix .suf use suffix .suf on compressed files
517 -t --test test compressed file integrity
518 -v --verbose verbose mode
519 -V --version display version number
520 -1 --fast compress faster
521 -9 --best compress better
522 file... files to (de)compress. If none given, use standard input.
523
524 This is the output of the command `gzip -v texinfo.tex':
525
526 texinfo.tex: 71.6% -- replaced with texinfo.tex.gz
527
528 The following command will find all `gzip' files in the current
529directory and subdirectories, and extract them in place without
530destroying the original:
531
532 find . -name '*.gz' -print | sed 's/^\(.*\)[.]gz$/gunzip < "&" > "\1"/' | sh
533
534\1f
535File: gzip.info, Node: Invoking gzip, Next: Advanced usage, Prev: Sample, Up: Top
536
537Invoking `gzip'
538***************
539
540 The format for running the `gzip' program is:
541
542 gzip OPTION ...
543
544 `gzip' supports the following options:
545
546`--stdout'
547`--to-stdout'
548`-c'
549 Write output on standard output; keep original files unchanged.
550 If there are several input files, the output consists of a
551 sequence of independently compressed members. To obtain better
552 compression, concatenate all input files before compressing them.
553
554`--decompress'
555`--uncompress'
556`-d'
557 Decompress.
558
559`--force'
560`-f'
561 Force compression or decompression even if the file has multiple
562 links or the corresponding file already exists, or if the
563 compressed data is read from or written to a terminal. If the
564 input data is not in a format recognized by `gzip', and if the
565 option --stdout is also given, copy the input data without change
566 to the standard ouput: let `zcat' behave as `cat'. If `-f' is not
567 given, and when not running in the background, `gzip' prompts to
568 verify whether an existing file should be overwritten.
569
570`--help'
571`-h'
572 Print an informative help message describing the options then
573 quit.
574
575`--list'
576`-l'
577 For each compressed file, list the following fields:
578
579 compressed size: size of the compressed file
580 uncompressed size: size of the uncompressed file
581 ratio: compression ratio (0.0% if unknown)
582 uncompressed_name: name of the uncompressed file
583
584 The uncompressed size is given as `-1' for files not in `gzip'
585 format, such as compressed `.Z' files. To get the uncompressed
586 size for such a file, you can use:
587
588 zcat file.Z | wc -c
589
590 In combination with the --verbose option, the following fields
591 are also displayed:
592
593 method: compression method (deflate,compress,lzh,pack)
594 crc: the 32-bit CRC of the uncompressed data
595 date & time: time stamp for the uncompressed file
596
597 The crc is given as ffffffff for a file not in gzip format.
598
599 With --verbose, the size totals and compression ratio for all
600 files is also displayed, unless some sizes are unknown. With
601 --quiet, the title and totals lines are not displayed.
602
603`--license'
604`-L'
605 Display the `gzip' license then quit.
606
607`--no-name'
608`-n'
609 When compressing, do not save the original file name and time
610 stamp by default. (The original name is always saved if the name
611 had to be truncated.) When decompressing, do not restore the
612 original file name if present (remove only the `gzip' suffix from
613 the compressed file name) and do not restore the original time
614 stamp if present (copy it from the compressed file). This option
615 is the default when decompressing.
616
617`--name'
618`-N'
619 When compressing, always save the original file name and time
620 stamp; this is the default. When decompressing, restore the
621 original file name and time stamp if present. This option is
622 useful on systems which have a limit on file name length or when
623 the time stamp has been lost after a file transfer.
624
625`--quiet'
626`-q'
627 Suppress all warning messages.
628
629`--recursive'
630`-r'
631 Travel the directory structure recursively. If any of the file
632 names specified on the command line are directories, `gzip' will
633 descend into the directory and compress all the files it finds
634 there (or decompress them in the case of `gunzip').
635
636`--suffix SUF'
637`-S SUF'
638 Use suffix `SUF' instead of `.gz'. Any suffix can be given, but
639 suffixes other than `.z' and `.gz' should be avoided to avoid
640 confusion when files are transferred to other systems. A null
641 suffix forces gunzip to try decompression on all given files
642 regardless of suffix, as in:
643
644 gunzip -S "" * (*.* for MSDOS)
645
646 Previous versions of gzip used the `.z' suffix. This was changed
647 to avoid a conflict with `pack'.
648
649`--test'
650`-t'
651 Test. Check the compressed file integrity.
652
653`--verbose'
654`-v'
655 Verbose. Display the name and percentage reduction for each file
656 compressed.
657
658`--version'
659`-V'
660 Version. Display the version number and compilation options, then
661 quit.
662
663`--fast'
664`--best'
665`-N'
666 Regulate the speed of compression using the specified digit N,
667 where `-1' or `--fast' indicates the fastest compression method
668 (less compression) and `--best' or `-9' indicates the slowest
669 compression method (optimal compression). The default
670 compression level is `-6' (that is, biased towards high
671 compression at expense of speed).
672
673\1f
674File: gzip.info, Node: Advanced usage, Next: Environment, Prev: Invoking gzip, Up: Top
675
676Advanced usage
677**************
678
679 Multiple compressed files can be concatenated. In this case,
680`gunzip' will extract all members at once. If one member is damaged,
681other members might still be recovered after removal of the damaged
682member. Better compression can be usually obtained if all members are
683decompressed and then recompressed in a single step.
684
685 This is an example of concatenating `gzip' files:
686
687 gzip -c file1 > foo.gz
688 gzip -c file2 >> foo.gz
689
690 Then
691
692 gunzip -c foo
693
694 is equivalent to
695
696 cat file1 file2
697
698 In case of damage to one member of a `.gz' file, other members can
699still be recovered (if the damaged member is removed). However, you
700can get better compression by compressing all members at once:
701
702 cat file1 file2 | gzip > foo.gz
703
704 compresses better than
705
706 gzip -c file1 file2 > foo.gz
707
708 If you want to recompress concatenated files to get better
709compression, do:
710
711 zcat old.gz | gzip > new.gz
712
713 If a compressed file consists of several members, the uncompressed
714size and CRC reported by the `--list' option applies to the last member
715only. If you need the uncompressed size for all members, you can use:
716
717 zcat file.gz | wc -c
718
719 If you wish to create a single archive file with multiple members so
720that members can later be extracted independently, use an archiver such
721as `tar' or `zip'. GNU `tar' supports the `-z' option to invoke `gzip'
722transparently. `gzip' is designed as a complement to `tar', not as a
723replacement.
724
725\1f
726File: gzip.info, Node: Environment, Next: Tapes, Prev: Advanced usage, Up: Top
727
728Environment
729***********
730
731 The environment variable `GZIP' can hold a set of default options
732for `gzip'. These options are interpreted first and can be
733overwritten by explicit command line parameters. For example:
734
735 for sh: GZIP="-8v --name"; export GZIP
736 for csh: setenv GZIP "-8v --name"
737 for MSDOS: set GZIP=-8v --name
738
739 On Vax/VMS, the name of the environment variable is `GZIP_OPT', to
740avoid a conflict with the symbol set for invocation of the program.
741
742\1f
743File: gzip.info, Node: Tapes, Next: Problems, Prev: Environment, Up: Top
744
745Using `gzip' on tapes
746*********************
747
748 When writing compressed data to a tape, it is generally necessary
749to pad the output with zeroes up to a block boundary. When the data is
750read and the whole block is passed to `gunzip' for decompression,
751`gunzip' detects that there is extra trailing garbage after the
752compressed data and emits a warning by default. You have to use the
753`--quiet' option to suppress the warning. This option can be set in the
754`GZIP' environment variable, as in:
755
756 for sh: GZIP="-q" tar -xfz --block-compress /dev/rst0
757 for csh: (setenv GZIP "-q"; tar -xfz --block-compress /dev/rst0)
758
759 In the above example, `gzip' is invoked implicitly by the `-z'
760option of GNU `tar'. Make sure that the same block size (`-b' option
761of `tar') is used for reading and writing compressed data on tapes.
762(This example assumes you are using the GNU version of `tar'.)
763
764\1f
765File: gzip.info, Node: Problems, Next: Concept Index, Prev: Tapes, Up: Top
766
767Reporting Bugs
768**************
769
770 If you find a bug in `gzip', please send electronic mail to
771`jloup@chorus.fr' or, if this fails, to
772`bug-gnu-utils@prep.ai.mit.edu'. Include the version number, which
773you can find by running `gzip -V'. Also include in your message the
774hardware and operating system, the compiler used to compile `gzip', a
775description of the bug behavior, and the input to `gzip' that triggered
776the bug.
777
778\1f
779File: gzip.info, Node: Concept Index, Prev: Problems, Up: Top
780
781Concept Index
782*************
783
784* Menu:
785
786* Environment: Environment.
787* bugs: Problems.
788* concatenated files: Advanced usage.
789* invoking: Invoking gzip.
790* options: Invoking gzip.
791* overview: Overview.
792* sample: Sample.
793* tapes: Tapes.
794
795
796\1f
797Tag Table:
798Node: Top\7f864
799Node: Copying\7f1344
800Node: Overview\7f20602
801Node: Sample\7f24911
802Node: Invoking gzip\7f26528
803Node: Advanced usage\7f31183
804Node: Environment\7f32772
805Node: Tapes\7f33340
806Node: Problems\7f34317
807Node: Concept Index\7f34822
808\1f
809End Tag Table