]> git.cworth.org Git - gzip/blob - README
Avoid creating an undersized buffer for the hufts table.
[gzip] / README
1 This is the file README for the gzip distribution.
2
3 gzip (GNU zip) is a compression utility designed to be a replacement
4 for 'compress'. Its main advantages over compress are much better
5 compression and freedom from patented algorithms.  The GNU Project
6 uses it as the standard compression program for its system.
7
8 gzip currently uses by default the LZ77 algorithm used in zip 1.9 (the
9 portable pkzip compatible archiver). The gzip format was however
10 designed to accommodate several compression algorithms. See below
11 for a comparison of zip and gzip.
12
13 gunzip can currently decompress files created by gzip, compress or
14 pack. The detection of the input format is automatic.  For the
15 gzip format, gunzip checks a 32 bit CRC. For pack, gunzip checks the
16 uncompressed length.  The 'compress' format was not designed to allow
17 consistency checks. However gunzip is sometimes able to detect a bad
18 .Z file because there is some redundancy in the .Z compression format.
19 If you get an error when uncompressing a .Z file, do not assume that
20 the .Z file is correct simply because the standard uncompress does not
21 complain.  This generally means that the standard uncompress does not
22 check its input, and happily generates garbage output.
23
24 gzip produces files with a .gz extension. Previous versions of gzip
25 used the .z extension, which was already used by the 'pack'
26 Huffman encoder. gunzip is able to decompress .z files (packed
27 or gzip'ed).
28
29 Several planned features are not yet supported (see the file TODO).
30 See the file NEWS for a summary of changes since 0.5.  See the file
31 INSTALL for installation instructions. Some answers to frequently
32 asked questions are given in the file INSTALL, please read it. (In
33 particular, please don't ask me once more for an /etc/magic entry.)
34
35 WARNING: gzip is sensitive to compiler bugs, particularly when
36 optimizing.  Use "make check" to check that gzip was compiled
37 correctly.  Try compiling gzip without any optimization if you have a
38 problem.
39
40 Please send all comments and bug reports by electronic mail to
41 <bug-gzip@gnu.org>.
42
43 Bug reports should ideally include:
44
45     * The complete output of "gzip -V" (or the contents of revision.h
46       if you can't get gzip to compile)
47     * The hardware and operating system (try "uname -a")
48     * The compiler used to compile (if it is gcc, use "gcc -v")
49     * A description of the bug behavior
50     * The input to gzip, that triggered the bug
51
52 If you send me patches for machines I don't have access to, please test them
53 very carefully. gzip is used for backups, it must be extremely reliable.
54
55 GNU tar 1.11.2 has a -z option to invoke directly gzip, so you don't have to
56 patch it. The package ftp.uu.net:/languages/emacs-lisp/misc/jka-compr19.el.Z
57 also supports gzip'ed files.
58
59 The znew and gzexe shell scripts provided with gzip benefit from
60 (but do not require) the cpmod utility to transfer file attributes.
61 It is available in
62 ftp://gatekeeper.dec.com/pub/usenet/comp.sources.unix/volume11/cpmod.Z.
63
64 The sample programs zread.c, sub.c and add.c in subdirectory sample
65 are provided as examples of useful complements to gzip. Read the
66 comments inside each source file.  The perl script ztouch is also
67 provided as example (not installed by default since it relies on perl).
68
69
70 gzip is free software, you can redistribute it and/or modify it under
71 the terms of the GNU General Public License, a copy of which is
72 provided under the name COPYING. The latest version of gzip are always
73 available from ftp://ftp.gnu.org/gnu/gzip or in any of the gnu
74 mirror sites.
75
76 - sources in gzip-*.tar (or .shar or .tar.gz).
77 - MSDOS lha self-extracting exe in gzip-msdos-*.exe. Once extracted,
78   copy gzip.exe to gunzip.exe and zcat.exe, or use "gzip -d" to decompress.
79   gzip386.exe runs much faster but only on 386 and above; it was compiled with
80   djgpp 1.10 available in directory omnigate.clarkson.edu:/pub/msdos/djgpp.
81
82 A VMS executable is in ftp://ftp.spc.edu/[.macro32.savesets]gzip-1-*.zip
83 (use [.macro32]unzip.exe to extract). A PRIMOS executable is available
84 in ftp://ftp.lysator.liu.se/pub/primos/run/gzip.run.
85
86 Some ftp servers can automatically make a tar.Z from a tar file. If
87 you are getting gzip for the first time, you can ask for a tar.Z file
88 instead of the much larger tar file.
89
90 Many thanks to those who provided me with bug reports and feedback.
91 See the files THANKS and ChangeLog for more details.
92
93
94                 Note about zip vs. gzip:
95
96 The name 'gzip' was a very unfortunate choice, because zip and gzip
97 are two really different programs, although the actual compression and
98 decompression sources were written by the same persons. A different
99 name should have been used for gzip, but it is too late to change now.
100
101 zip is an archiver: it compresses several files into a single archive
102 file. gzip is a simple compressor: each file is compressed separately.
103 Both share the same compression and decompression code for the
104 'deflate' method.  unzip can also decompress old zip archives
105 (implode, shrink and reduce methods). gunzip can also decompress files
106 created by compress and pack. zip 1.9 and gzip do not support
107 compression methods other than deflation. (zip 1.0 supports shrink and
108 implode). Better compression methods may be added in future versions
109 of gzip. zip will always stick to absolute compatibility with pkzip,
110 it is thus constrained by PKWare, which is a commercial company.  The
111 gzip header format is deliberately different from that of pkzip to
112 avoid such a constraint.
113
114 On Unix, gzip is mostly useful in combination with tar. GNU tar
115 1.11.2 and later has a -z option to invoke gzip automatically.  "tar -z"
116 compresses better than zip, since gzip can then take advantage of
117 redundancy between distinct files. The drawback is that you must
118 scan the whole tar.gz file in order to extract a single file near
119 the end; unzip can directly seek to the end of the zip file. There
120 is no overhead when you extract the whole archive anyway.
121 If a member of a .zip archive is damaged, other files can still
122 be recovered. If a .tar.gz file is damaged, files beyond the failure
123 point cannot be recovered. (Future versions of gzip will have
124 error recovery features.)
125
126 gzip and gunzip are distributed as a single program. zip and unzip
127 are, for historical reasons, two separate programs, although the
128 authors of these two programs work closely together in the info-zip
129 team. zip and unzip are not associated with the GNU project.
130 See http://www.cdrom.com/pub/infozip/ for more about zip and unzip.
131
132
133 ========================================================================
134
135 Copyright (C) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
136 Copyright (C) 1992, 1993 Jean-loup Gailly
137
138 Permission is granted to copy, distribute and/or modify this document
139 under the terms of the GNU Free Documentation License, Version 1.2 or
140 any later version published by the Free Software Foundation; with no
141 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
142 Texts.  A copy of the license is included in the ``GNU Free
143 Documentation License'' file as part of this distribution.