xref: /gzip/
Name Date Size

..27-Apr.-20224 KiB

.gitignoreH A D31-Aug.-2021328

.gitmodulesH A D13-Aug.-201789

.mailmapH A D13-Aug.-201769

.prev-versionH A D07-Apr.-20225

algorithm.docH A D19-Sep.-20177.5 KiB

AUTHORSH A D13-Aug.-201798

bits.cH A D29-Jun.-20226.3 KiB

bootstrapH A D29-Jun.-202234.8 KiB

bootstrap.confH A D03-Jan.-20221.9 KiB

cfg.mkH A D08-Apr.-20223.7 KiB

ChangeLog-2007H A D03-Jan.-202270.4 KiB

configure.acH A D06-Apr.-202211.1 KiB

COPYINGH A D13-Aug.-201734.3 KiB

deflate.cH A D29-Jun.-202231.3 KiB

dfltcc.cH A D03-Jan.-202213.1 KiB

dist-check.mkH A D13-Aug.-20176.4 KiB

doc/H01-Apr.-20224 KiB

gnulib/H13-Aug.-20174 KiB

gunzip.1H A D13-Aug.-201716

gunzip.inH A D07-Apr.-20222.3 KiB

gzexe.1H A D10-Feb.-20221.4 KiB

gzexe.inH A D07-Apr.-20226.3 KiB

gzip.1H A D01-Apr.-202216.1 KiB

gzip.cH A D07-Apr.-202264.5 KiB

gzip.hH A D03-Jan.-202211.1 KiB

inflate.cH A D29-Jun.-202232 KiB

lib/H04-Apr.-20224 KiB

lzw.hH A D03-Jan.-20221.9 KiB

m4/H04-Apr.-20224 KiB

Makefile.amH A D04-Apr.-20226.4 KiB

NEWSH A D29-Jun.-202224.2 KiB

READMEH A D03-Jan.-20226 KiB

README-hackingH A D03-Jan.-20224.2 KiB

README-prereqH A D31-Oct.-20211.6 KiB

revision.hH A D03-Jan.-2022933

sample/H07-Apr.-20224 KiB

tailor.hH A D03-Jan.-20224.8 KiB

tests/H29-Jun.-20224 KiB

THANKSH A D30-Mar.-202213 KiB

TODOH A D03-Jan.-20223.4 KiB

trees.cH A D29-Jun.-202240.2 KiB

unlzh.cH A D16-Dec.-202110 KiB

unlzw.cH A D16-Dec.-20218.4 KiB

unpack.cH A D03-Jan.-20229.4 KiB

unzip.cH A D03-Jan.-20227.2 KiB

util.cH A D03-Jan.-202215 KiB

zcat.1H A D13-Aug.-201716

zcat.inH A D07-Apr.-20221.9 KiB

zcmp.1H A D13-Aug.-201717

zcmp.inH A D07-Apr.-20221.6 KiB

zdiff.1H A D31-Aug.-2020877

zdiff.inH A D07-Apr.-20226.3 KiB

zegrep.inH A D04-Apr.-202231

zfgrep.inH A D04-Apr.-202231

zforce.1H A D31-Aug.-2020605

zforce.inH A D07-Apr.-20222 KiB

zgrep.1H A D10-Feb.-20221.1 KiB

zgrep.inH A D07-Apr.-20227.9 KiB

zip.cH A D03-Jan.-20224 KiB

zless.1H A D10-Feb.-20222 KiB

zless.inH A D07-Apr.-20222.2 KiB

zmore.1H A D10-Feb.-20223.6 KiB

zmore.inH A D07-Apr.-20221.8 KiB

znew.1H A D10-Feb.-20221.1 KiB

znew.inH A D07-Apr.-20224.5 KiB


1This is the file README for the gzip distribution.
3The GNU gzip home page is https://www.gnu.org/software/gzip.
5gzip (GNU zip) is a compression utility designed to be a replacement
6for 'compress'. Its main advantages over compress are much better
7compression and freedom from patented algorithms.  The GNU Project
8uses it as the standard compression program for its system.
10gzip currently uses by default the LZ77 algorithm used in zip 1.9 (the
11portable pkzip compatible archiver). The gzip format was however
12designed to accommodate several compression algorithms. See below
13for a comparison of zip and gzip.
15gunzip can currently decompress files created by gzip, compress or
16pack. The detection of the input format is automatic.  For the
17gzip format, gunzip checks a 32 bit CRC. For pack, gunzip checks the
18uncompressed length.  The 'compress' format was not designed to allow
19consistency checks. However gunzip is sometimes able to detect a bad
20.Z file because there is some redundancy in the .Z compression format.
21If you get an error when uncompressing a .Z file, do not assume that
22the .Z file is correct simply because the standard uncompress does not
23complain.  This generally means that the standard uncompress does not
24check its input, and happily generates garbage output.
26gzip produces files with a .gz extension. Previous versions of gzip
27used the .z extension, which was already used by the 'pack'
28Huffman encoder. gunzip is able to decompress .z files (packed
29or gzip'ed).
31Several planned features are not yet supported (see the file TODO).
32See the file NEWS for a summary of changes since the last release.
33See the file INSTALL for installation instructions.
35WARNING: gzip is sensitive to compiler bugs, particularly when
36optimizing.  Use "make check" to check that gzip was compiled
37correctly.  Try compiling gzip without any optimization if you have a
40Please send all comments and bug reports by electronic mail to
43Bug reports should ideally include:
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
52If you send me patches for machines I don't have access to, please test them
53very carefully. gzip is used for backups, it must be extremely reliable.
55The znew and gzexe shell scripts provided with gzip benefit from
56(but do not require) the (non-GNU) cpmod utility to transfer file attributes.
58The sample programs zread.c, sub.c and add.c in subdirectory sample
59are provided as examples of useful complements to gzip. Read the
60comments inside each source file.  The perl script ztouch is also
61provided as example (not installed by default since it relies on perl).
64gzip is free software, you can redistribute it and/or modify it under
65the terms of the GNU General Public License, a copy of which is
66provided under the name COPYING. The latest version of gzip is always
67available from https://ftp.gnu.org/gnu/gzip or in any of the GNU
68mirror sites.
70Many thanks to those who provided me with bug reports and feedback.
71See the files THANKS and ChangeLog for more details.
74                Note about zip vs. gzip:
76The name 'gzip' was a very unfortunate choice, because zip and gzip
77are two really different programs, although the actual compression and
78decompression sources were written by the same persons. A different
79name should have been used for gzip, but it is too late to change now.
81zip is an archiver: it compresses several files into a single archive
82file. gzip is a simple compressor: each file is compressed separately.
83Both share the same compression and decompression code for the
84'deflate' method.  unzip can also decompress old zip archives
85(implode, shrink and reduce methods). gunzip can also decompress files
86created by compress and pack. zip 1.9 and gzip do not support
87compression methods other than deflation. (zip 1.0 supports shrink and
88implode). Better compression methods may be added in future versions
89of gzip. zip will always stick to absolute compatibility with pkzip,
90it is thus constrained by PKWare, which is a commercial company.  The
91gzip header format is deliberately different from that of pkzip to
92avoid such a constraint.
94On Unix, gzip is mostly useful in combination with tar. GNU tar
951.11.2 and later has a -z option to invoke gzip automatically.  "tar -z"
96compresses better than zip, since gzip can then take advantage of
97redundancy between distinct files. The drawback is that you must
98scan the whole tar.gz file in order to extract a single file near
99the end; unzip can directly seek to the end of the zip file. There
100is no overhead when you extract the whole archive anyway.
101If a member of a .zip archive is damaged, other files can still
102be recovered. If a .tar.gz file is damaged, files beyond the failure
103point cannot be recovered. (Future versions of gzip will have
104error recovery features.)
106gzip and gunzip are distributed as a single program. zip and unzip
107are, for historical reasons, two separate programs, although the
108authors of these two programs work closely together in the Info-ZIP
109team. zip and unzip are not associated with the GNU project.
110See http://info-zip.org/ for more about zip and unzip.
113For any copyright year range specified as YYYY-ZZZZ in this package
114note that the range specifies every single year in that closed interval.
118Copyright (C) 1999, 2001-2002, 2006-2007, 2009-2022 Free Software Foundation,
120Copyright (C) 1992, 1993 Jean-loup Gailly
122Permission is granted to copy, distribute and/or modify this document
123under the terms of the GNU Free Documentation License, Version 1.3 or
124any later version published by the Free Software Foundation; with no
125Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
126Texts.  A copy of the license is included in the ``GNU Free
127Documentation License'' file as part of this distribution.


1Building from a Git repository				-*- outline -*-
3These notes intend to help people working on the checked-out sources.
4These requirements do not apply when building from a distribution tarball.
5If this package has a file HACKING, please also read that file for
6more detailed contribution guidelines.
8* Requirements
10We've opted to keep only the highest-level sources in the Git repository.
11This eases our maintenance burden (fewer merges etc.), but imposes more
12requirements on anyone wishing to build from the just-checked-out sources.
13(The requirements to build from a release are much less and are just
14the requirements of the standard './configure && make' procedure.)
15Specific development tools and versions will be checked for and listed by
16the bootstrap script.  See README-prereq for specific notes on obtaining
17these prerequisite tools.
19Valgrind <http://valgrind.org/> is also highly recommended, if
20Valgrind supports your architecture.  See also README-valgrind
21(if present).
23While building from a just-cloned source tree may require installing a
24few prerequisites, later, a plain 'git pull && make' typically suffices.
26* First Git checkout
28You can get a copy of the source repository like this:
30        $ git clone git://git.sv.gnu.org/<packagename>
31        $ cd <packagename>
33where '<packagename>' stands for 'coreutils' or whatever other package
34you are building.
36To use the most-recent Gnulib (as opposed to the Gnulib version that
37the package last synchronized to), do this next:
39        $ git submodule foreach git pull origin master
40        $ git commit -m 'build: update gnulib submodule to latest' gnulib
42As an optional step, if you already have a copy of the Gnulib Git
43repository, then you can use it as a reference to reduce download
44time and file system space requirements:
46        $ export GNULIB_SRCDIR=/path/to/gnulib
48The next step is to get and check other files needed to build,
49which are extracted from other source packages:
51        $ ./bootstrap
53And there you are!  Just
55        $ ./configure --quiet #[--disable-gcc-warnings] [*]
56        $ make
57        $ make check
59At this point, there should be no difference between your local copy,
60and the Git master copy:
62        $ git diff
64should output no difference.
68[*] By default GCC warnings are enabled when building from Git.
69If you get warnings with recent GCC and Glibc with default
70configure-time options, please report the warnings to the bug
71reporting address of this package instead of to bug-gnulib,
72even if the problem seems to originate in a Gnulib-provided file.
73If you get warnings with other configurations, you can run
74'./configure --disable-gcc-warnings' or 'make WERROR_CFLAGS='
75to build quietly or verbosely, respectively.
78* Submitting patches
80If you develop a fix or a new feature, please send it to the
81appropriate bug-reporting address as reported by the --help option of
82each program.  One way to do this is to use vc-dwim
83<https://www.gnu.org/software/vc-dwim/>), as follows.
85  Run the command "vc-dwim --initialize" from the top-level directory
86  of this package's git-cloned hierarchy.
88  Edit the (empty) ChangeLog file that this command creates, creating a
89  properly-formatted entry according to the GNU coding standards
90  <https://www.gnu.org/prep/standards/html_node/Change-Logs.html>.
92  Make your changes.
94  Run the command "vc-dwim" and make sure its output (the diff of all
95  your changes) looks good.
97  Run "vc-dwim --commit".
99  Run the command "git format-patch --stdout -1", and email its output
100  in, using the output's subject line.
104Copyright (C) 2002-2022 Free Software Foundation, Inc.
106This program is free software: you can redistribute it and/or modify
107it under the terms of the GNU General Public License as published by
108the Free Software Foundation, either version 3 of the License, or
109(at your option) any later version.
111This program is distributed in the hope that it will be useful,
112but WITHOUT ANY WARRANTY; without even the implied warranty of
114GNU General Public License for more details.
116You should have received a copy of the GNU General Public License
117along with this program.  If not, see <https://www.gnu.org/licenses/>.


1This gives some notes on obtaining the tools required for development.
2These tools can be used by the 'bootstrap' and 'configure' scripts,
3as well as by 'make'.  They include:
5- Autoconf   <https://www.gnu.org/software/autoconf/>
6- Automake   <https://www.gnu.org/software/automake/>
7- Git        <https://git-scm.com/>
8- M4         <https://www.gnu.org/software/m4/>
9- Make       <https://www.gnu.org/software/make/>
10- Perl       <https://www.cpan.org/>
11- Tar        <https://www.gnu.org/software/tar/>
12- Texinfo    <https://www.gnu.org/software/texinfo/>
13- Wget       <http://www.gnu.org/software/wget/>
14- XZ Utils   <https://tukaani.org/xz/>
16It is generally better to use official packages for your system.
17If a package is not officially available you can build it from source
18and install it into a directory that you can then use to build this
19package.  If some packages are available but are too old, install the
20too-old versions first as they may be needed to build newer versions.
22Here is an example of how to build a program from source.  This
23example is for Autoconf; a similar approach should work for the other
24developer prerequisites.  This example assumes Autoconf 2.71; it
25should be OK to use a later version of Autoconf, if available.
27  prefix=$HOME/prefix   # (or wherever else you choose)
28  export PATH=$prefix/bin:$PATH
29  wget https://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.71.tar.gz
30  gzip -d <autoconf-2.71.tar.gz | tar xf -
31  cd autoconf-2.71
32  ./configure --prefix=$prefix
33  make install
35Once the prerequisites are installed, you can build this package as
36described in README-hacking.