b-make libg++-2.3.90
[unix-history] / gnu / usr.bin / gzip / README
CommitLineData
caed0dfe 1This is the file README for the gzip distribution, version 1.2.2.
3013fe88
NW
2
3gzip (GNU zip) is a compression utility designed to be a replacement
4for 'compress'. Its main advantages over compress are much better
5compression and freedom from patented algorithms. The GNU Project
6uses it as the standard compression program for its system.
7
8gzip currently uses by default the LZ77 algorithm used in zip 1.9 (the
9portable pkzip compatible archiver). The gzip format was however
10designed to accommodate several compression algorithms. See below
11for a comparison of zip and gzip.
12
13gunzip can currently decompress files created by gzip, compress or
14pack. The detection of the input format is automatic. For the
15gzip format, gunzip checks a 32 bit CRC. For pack, gunzip checks the
16uncompressed length. The 'compress' format was not designed to allow
17consistency checks. However gunzip is sometimes able to detect a bad
18.Z file because there is some redundancy in the .Z compression format.
19If you get an error when uncompressing a .Z file, do not assume that
20the .Z file is correct simply because the standard uncompress does not
21complain. This generally means that the standard uncompress does not
22check its input, and happily generates garbage output.
23
24gzip produces files with a .gz extension. Previous versions of gzip
25used the .z extension, which was already used by the 'pack'
26Huffman encoder. gunzip is able to decompress .z files (packed
27or gzip'ed).
28
29Several planned features are not yet supported (see the file TODO).
30See the file NEWS for a summary of changes since 0.5. See the file
31INSTALL for installation instructions. Some answers to frequently
32asked questions are given in the file INSTALL, please read it. (In
33particular, please don't ask me once more for an /etc/magic entry.)
34
35WARNINGS about broken optimizers:
36
37- on the NeXT, "cc -finline-functions" is broken. gzip produces
caed0dfe 38 valid .gz files but they are much too large because the string
3013fe88
NW
39 matching code misses most matches. Use "cc -O" instead.
40
41- on the Mips R4000, gcc -O (version 2.3.1) generates bad code, use cc
42 or just gcc -g instead.
43
caed0dfe
NW
44- gcc 2.3.3 and 2.4.3 on the SGI Indigo IRIX 4.0.5 also produce bad code.
45 Use instead: make CC='cc -O2' or gcc without -O.
46
47- On Solaris 2.1 for x86, the January 1993 "OEM" compiler release
48 generates bad code. This is fixed in the June 1993 "FCS" release.
3013fe88
NW
49
50- on Sparc with SunOS 4.1.1 and the SC1.0 compiler, the optimizer
51 works up to -O3 but -O4 does not work.
52
53- MSC 5.1 with -Ox and -DDYN_ALLOC generates bad code in inflate.c.
54 The default is static allocation (no DYN_ALLOC) and -Ox works on inflate.c.
55 But -Ox does not work on util.c, so you must use -Oait -Gs.
56
57- On dnix 5.3 2.2 cc version 2.37c is buggy. Version 2.38d works.
58
caed0dfe
NW
59- On an Alliant running Concentrix, cc (even without optimization) generates
60 incorrect code. You have to use gcc.
61
3013fe88
NW
62For all machines, Use "make check" to check that gzip was compiled correctly.
63
64Please send all comments and bug reports by electronic mail to:
65 Jean-loup Gailly <jloup@chorus.fr>
66
67or, if this fails, to bug-gnu-utils@prep.ai.mit.edu.
68Bug reports should ideally include:
69
70 * The complete output of "gzip -V" (or the contents of revision.h
71 if you can't get gzip to compile)
72 * The hardware and operating system (try "uname -a")
73 * The compiler used to compile (if it is gcc, use "gcc -v")
74 * A description of the bug behavior
75 * The input to gzip, that triggered the bug
76
caed0dfe
NW
77If you send me patches for machines I don't have access to, please test them
78very carefully. gzip is used for backups, it must be extremely reliable.
79
3013fe88
NW
80The package crypt++.el is highly recommended to manipulate gzip'ed
81file from emacs. It recognizes automatically encrypted and compressed
82files when they are first visited or written. It is available via
83anonymous ftp to roebling.poly.edu [128.238.5.31] in /pub/crypt++.el.
84The same directory contains also patches to dired, ange-ftp and info.
85GNU tar 1.11.2 has a -z option to invoke directly gzip, so you don't have
86to patch it.
87
88The znew and gzexe shell scripts provided with gzip benefit from
89(but do not require) the cpmod utility to transfer file attributes.
90It is available by anonymous ftp on gatekeeper.dec.com in
91/.0/usenet/comp.sources.unix/volume11/cpmod.Z.
92
93The sample programs zread.c, sub.c and add.c are provided as examples
94of useful complements to gzip. Read the comments inside each source file.
95The perl script ztouch is also provided as example (not installed
96by default since it relies on perl).
97
98
99gzip is free software, you can redistribute it and/or modify it under
100the terms of the GNU General Public License, a copy of which is
101provided under the name COPYING. The latest version of gzip are always
102available by ftp in prep.ai.mit.edu:/pub/gnu, or in any of the prep
103mirror sites:
104
caed0dfe 105- sources in gzip-*.tar (or .shar or .tar.gz)
3013fe88
NW
106- Solaris 2 executables in sparc-sun-solaris2/gzip-binaries-*.tar
107- MSDOS lha self-extracting exe in gzip-msdos-*.exe. Once extracted,
108 copy gzip.exe to gunzip.exe and zcat.exe, or use "gzip -d" to decompress.
caed0dfe
NW
109 gzip386.exe runs much faster but only on 386 and above; it needs go32.exe,
110 available in omnigate.clarkson.edu:/pub/msdos/djgpp/djdev110.zip
3013fe88
NW
111
112A VMS executable is available in ftp.spc.edu:[.macro32.savesets]gzip-1-*.zip
caed0dfe
NW
113(use [.macro32]unzip.exe to extract). A PRIMOS executable is available
114in ftp.lysator.liu.se:/pub/primos/run/gzip.run.
3013fe88
NW
115
116Many thanks to those who provided me with bug reports and feedback.
117See the files THANKS and ChangeLog for more details.
118
119
120 Note about zip vs. gzip:
121
122The name 'gzip' was a very unfortunate choice, because zip and gzip
123are two really different programs, although the actual compression and
124decompression sources were written by the same persons. A different
125name should have been used for gzip, but it is too late to change now.
126
127zip is an archiver: it compresses several files into a single archive
128file. gzip is a simple compressor: each file is compressed separately.
129Both share the same compression and decompression code for the
130'deflate' method. unzip can also decompress old zip archives
131(implode, shrink and reduce methods). gunzip can also decompress files
132created by compress and pack. zip 1.9 and gzip do not support
133compression methods other than deflation. (zip 1.0 supports shrink and
134implode). Better compression methods may be added in future versions
135of gzip. zip will always stick to absolute compatibility with pkzip,
136it is thus constrained by PKWare, which is a commercial company. The
137gzip header format is deliberately different from that of pkzip to
138avoid such a constraint.
139
140On Unix, gzip is mostly useful in combination with tar. GNU tar
1411.11.2 has a -z option to invoke gzip automatically. "tar -z"
142compresses better than zip, since gzip can then take advantage of
143redundancy between distinct files. The drawback is that you must
caed0dfe 144scan the whole tar.gz file in order to extract a single file near
3013fe88
NW
145the end; unzip can directly seek to the end of the zip file. There
146is no overhead when you extract the whole archive anyway.
147If a member of a .zip archive is damaged, other files can still
caed0dfe 148be recovered. If a .tar.gz file is damaged, files beyond the failure
3013fe88
NW
149point cannot be recovered. (Future versions of gzip will have
150error recovery features.)
151
152gzip and gunzip are distributed as a single program. zip and unzip
153are, for historical reasons, two separate programs, although the
154authors of these two programs work closely together in the info-zip
155team. zip and unzip are not associated with the GNU project.
156The sources are available by ftp in
157
158 oak.oakland.edu:/pub/misc/unix/zip19p1.zip
159 oak.oakland.edu:/pub/misc/unix/unz50p1.tar-z