BSD 4_4_Lite2 development
[unix-history] / usr / src / contrib / gzip-1.2.4 / README
CommitLineData
24c2f017
C
1This is the file README for the gzip distribution, version 1.2.4.
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
35WARNING: on several systems, compiler bugs cause gzip to fail, in
36particular when optimization options are on. See the section "Special
37targets" at the end of the INSTALL file for a list of known problems.
38For all machines, use "make check" to check that gzip was compiled
39correctly. Try compiling gzip without any optimization if you have a
40problem.
41
42Please send all comments and bug reports by electronic mail to:
43 Jean-loup Gailly <jloup@chorus.fr>
44
45or, if this fails, to bug-gnu-utils@prep.ai.mit.edu.
46Bug reports should ideally include:
47
48 * The complete output of "gzip -V" (or the contents of revision.h
49 if you can't get gzip to compile)
50 * The hardware and operating system (try "uname -a")
51 * The compiler used to compile (if it is gcc, use "gcc -v")
52 * A description of the bug behavior
53 * The input to gzip, that triggered the bug
54
55If you send me patches for machines I don't have access to, please test them
56very carefully. gzip is used for backups, it must be extremely reliable.
57
58The package crypt++.el is highly recommended to manipulate gzip'ed
59file from emacs. It recognizes automatically encrypted and compressed
60files when they are first visited or written. It is available via
61anonymous ftp to roebling.poly.edu [128.238.5.31] in /pub/crypt++.el.
62The same directory contains also patches to dired, ange-ftp and info.
63GNU tar 1.11.2 has a -z option to invoke directly gzip, so you don't have to
64patch it. The package ftp.uu.net:/languages/emacs-lisp/misc/jka-compr19.el.Z
65also supports gzip'ed files.
66
67The znew and gzexe shell scripts provided with gzip benefit from
68(but do not require) the cpmod utility to transfer file attributes.
69It is available by anonymous ftp on gatekeeper.dec.com in
70/.0/usenet/comp.sources.unix/volume11/cpmod.Z.
71
72The sample programs zread.c, sub.c and add.c in subdirectory sample
73are provided as examples of useful complements to gzip. Read the
74comments inside each source file. The perl script ztouch is also
75provided as example (not installed by default since it relies on perl).
76
77
78gzip is free software, you can redistribute it and/or modify it under
79the terms of the GNU General Public License, a copy of which is
80provided under the name COPYING. The latest version of gzip are always
81available by ftp in prep.ai.mit.edu:/pub/gnu, or in any of the prep
82mirror sites:
83
84- sources in gzip-*.tar (or .shar or .tar.gz).
85- Solaris 2 executables in sparc-sun-solaris2/gzip-binaries-*.tar
86- MSDOS lha self-extracting exe in gzip-msdos-*.exe. Once extracted,
87 copy gzip.exe to gunzip.exe and zcat.exe, or use "gzip -d" to decompress.
88 gzip386.exe runs much faster but only on 386 and above; it is compiled with
89 djgpp 1.10 available in directory omnigate.clarkson.edu:/pub/msdos/djgpp.
90
91A VMS executable is available in ftp.spc.edu:[.macro32.savesets]gzip-1-*.zip
92(use [.macro32]unzip.exe to extract). A PRIMOS executable is available
93in ftp.lysator.liu.se:/pub/primos/run/gzip.run.
94OS/2 executables (16 and 32 bits versions) are available in
95ftp.tu-muenchen.de:/pub/comp/os/os2/archiver/gz*-[16,32].zip
96
97Some ftp servers can automatically make a tar.Z from a tar file. If
98you are getting gzip for the first time, you can ask for a tar.Z file
99instead of the much larger tar file.
100
101Many thanks to those who provided me with bug reports and feedback.
102See the files THANKS and ChangeLog for more details.
103
104
105 Note about zip vs. gzip:
106
107The name 'gzip' was a very unfortunate choice, because zip and gzip
108are two really different programs, although the actual compression and
109decompression sources were written by the same persons. A different
110name should have been used for gzip, but it is too late to change now.
111
112zip is an archiver: it compresses several files into a single archive
113file. gzip is a simple compressor: each file is compressed separately.
114Both share the same compression and decompression code for the
115'deflate' method. unzip can also decompress old zip archives
116(implode, shrink and reduce methods). gunzip can also decompress files
117created by compress and pack. zip 1.9 and gzip do not support
118compression methods other than deflation. (zip 1.0 supports shrink and
119implode). Better compression methods may be added in future versions
120of gzip. zip will always stick to absolute compatibility with pkzip,
121it is thus constrained by PKWare, which is a commercial company. The
122gzip header format is deliberately different from that of pkzip to
123avoid such a constraint.
124
125On Unix, gzip is mostly useful in combination with tar. GNU tar
1261.11.2 has a -z option to invoke gzip automatically. "tar -z"
127compresses better than zip, since gzip can then take advantage of
128redundancy between distinct files. The drawback is that you must
129scan the whole tar.gz file in order to extract a single file near
130the end; unzip can directly seek to the end of the zip file. There
131is no overhead when you extract the whole archive anyway.
132If a member of a .zip archive is damaged, other files can still
133be recovered. If a .tar.gz file is damaged, files beyond the failure
134point cannot be recovered. (Future versions of gzip will have
135error recovery features.)
136
137gzip and gunzip are distributed as a single program. zip and unzip
138are, for historical reasons, two separate programs, although the
139authors of these two programs work closely together in the info-zip
140team. zip and unzip are not associated with the GNU project.
141The sources are available by ftp in
142
143 oak.oakland.edu:/pub/misc/unix/zip19p1.zip
144 oak.oakland.edu:/pub/misc/unix/unz50p1.tar-z