2004-04-27 15:26:28 +04:00
|
|
|
.\" $NetBSD: gzip.1,v 1.17 2004/04/27 11:26:28 mrg Exp $
|
2003-12-23 08:16:31 +03:00
|
|
|
.\"
|
2004-01-01 05:44:09 +03:00
|
|
|
.\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
|
2003-12-23 08:16:31 +03:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. The name of the author may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
2004-04-27 06:25:06 +04:00
|
|
|
.Dd April 27, 2004
|
2003-12-23 08:16:31 +03:00
|
|
|
.Dt GZIP 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm gzip
|
|
|
|
.Nd compression/decompression tool using Lempel-Ziv coding (LZ77)
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2003-12-26 18:15:49 +03:00
|
|
|
.Op Fl cdfhlNnqrtVv
|
2003-12-23 08:16:31 +03:00
|
|
|
.Op Fl S Ar suffix
|
|
|
|
.Ar file
|
|
|
|
.Oo
|
|
|
|
.Ar file Oo ...
|
|
|
|
.Oc
|
|
|
|
.Oc
|
|
|
|
.Nm gunzip
|
2003-12-24 02:20:37 +03:00
|
|
|
.Op Fl cfhNqrtVv
|
2003-12-23 08:16:31 +03:00
|
|
|
.Op Fl S Ar suffix
|
|
|
|
.Ar file
|
|
|
|
.Oo
|
|
|
|
.Ar file Oo ...
|
|
|
|
.Oc
|
|
|
|
.Oc
|
|
|
|
.Nm zcat
|
|
|
|
.Op Fl fhV
|
|
|
|
.Ar file
|
|
|
|
.Oo
|
|
|
|
.Ar file Oo ...
|
|
|
|
.Oc
|
|
|
|
.Oc
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2003-12-24 02:20:37 +03:00
|
|
|
program compresses and decompresses files using Lempel-Ziv coding
|
|
|
|
(LZ77).
|
2003-12-23 08:16:31 +03:00
|
|
|
If no
|
|
|
|
.Ar files
|
|
|
|
are specified,
|
|
|
|
.Nm
|
|
|
|
will compress from standard input, or decompress to standard output.
|
|
|
|
When in compression mode, each
|
|
|
|
.Ar file
|
|
|
|
will be replaced with another file with the suffix, set by the
|
|
|
|
.Fl S Ar suffix
|
|
|
|
option, added, if possible.
|
|
|
|
In decompression mode, each
|
|
|
|
.Ar file
|
2003-12-24 02:20:37 +03:00
|
|
|
will be checked for existence, as will the file with the suffix
|
|
|
|
added.
|
2003-12-23 08:16:31 +03:00
|
|
|
.Pp
|
|
|
|
If invoked as
|
|
|
|
.Nm gunzip
|
|
|
|
then the
|
|
|
|
.Fl d
|
|
|
|
option is enabled.
|
|
|
|
If invoked as
|
|
|
|
.Nm zcat
|
|
|
|
or
|
|
|
|
.Nm gzcat
|
|
|
|
then both the
|
|
|
|
.Fl c
|
2003-12-24 02:20:37 +03:00
|
|
|
and
|
|
|
|
.Fl d
|
2003-12-23 08:16:31 +03:00
|
|
|
options are enabled.
|
2004-01-01 06:51:36 +03:00
|
|
|
.Pp
|
2004-01-01 05:44:09 +03:00
|
|
|
This version of
|
|
|
|
.Nm
|
2004-02-18 12:16:27 +03:00
|
|
|
is also capable of decompressing files compressed using
|
|
|
|
.Xr compress 1
|
|
|
|
or
|
|
|
|
.Xr bzip2 1 .
|
2003-12-23 08:16:31 +03:00
|
|
|
.Sh OPTIONS
|
|
|
|
The following options are available:
|
2003-12-24 02:20:37 +03:00
|
|
|
.Bl -tag -width XXrXXXrecursiveX
|
|
|
|
.It Fl 1 , -fast
|
|
|
|
.It Fl 2
|
|
|
|
.It Fl 3
|
|
|
|
.It Fl 4
|
|
|
|
.It Fl 5
|
|
|
|
.It Fl 6
|
|
|
|
.It Fl 7
|
|
|
|
.It Fl 8
|
|
|
|
.It Fl 9 , -best
|
|
|
|
These options change the compression level used, with the
|
|
|
|
.Fl 1
|
|
|
|
option being the fastest, with less compression, and the
|
|
|
|
.Fl 9
|
|
|
|
option being the slowest, with optimal compression.
|
2004-04-27 15:26:28 +04:00
|
|
|
The default compression level is 6.
|
2003-12-23 08:16:31 +03:00
|
|
|
.It Fl c , -stdout , -to-stdout
|
2003-12-24 02:20:37 +03:00
|
|
|
This option specifies that output will go to the standard output
|
|
|
|
stream, leaving files intact.
|
2003-12-23 08:16:31 +03:00
|
|
|
.It Fl d , -decompress , -uncompress
|
|
|
|
This option selects decompression rather than compression.
|
|
|
|
.It Fl f , -force
|
|
|
|
This option turns on force mode.
|
2003-12-24 02:20:37 +03:00
|
|
|
This allows files with multiple links, overwriting of pre-existing
|
|
|
|
files, reading from or writing to a terminal, and when combined
|
|
|
|
with the
|
2003-12-23 08:16:31 +03:00
|
|
|
.Fl c
|
|
|
|
option, allowing non-compressed data to pass through unchanged.
|
|
|
|
.It Fl h , -help
|
|
|
|
This option prints a usage summary and exits.
|
2003-12-26 18:15:49 +03:00
|
|
|
.It Fl l , -list
|
|
|
|
This option displays information about the file's compressed and
|
2003-12-26 18:18:54 +03:00
|
|
|
uncompressed size, ratio, uncompressed name.
|
|
|
|
With the
|
2003-12-26 18:15:49 +03:00
|
|
|
.Fl v
|
2003-12-26 18:18:54 +03:00
|
|
|
option, it also displays the compression method, CRC, data and time
|
2003-12-26 18:15:49 +03:00
|
|
|
embedded in the file.
|
2003-12-23 08:16:31 +03:00
|
|
|
.It Fl N , -name
|
|
|
|
This option causes the stored filename in the input file to be used
|
|
|
|
as the output file.
|
2003-12-24 02:20:37 +03:00
|
|
|
.It Fl n , -no-name
|
|
|
|
This option stops the filename from being stored in the output
|
|
|
|
file.
|
2003-12-23 08:16:31 +03:00
|
|
|
.It Fl q , -quiet
|
|
|
|
With this option, no warnings or errors are printed.
|
|
|
|
.It Fl r , -recursive
|
|
|
|
This option is used to
|
|
|
|
.Nm
|
|
|
|
the files in a directory tree individually, using the
|
|
|
|
.Xr fts 3
|
|
|
|
library.
|
2003-12-23 11:19:49 +03:00
|
|
|
.It Fl S Ar suffix , Fl -suffix Ar suffix
|
2003-12-23 08:16:31 +03:00
|
|
|
This option changes the default suffix from .gz to
|
|
|
|
.Ar suffix .
|
|
|
|
.It Fl t , -test
|
|
|
|
This option will test compressed files for integrity.
|
|
|
|
.It Fl V , -version
|
|
|
|
This option prints the version of the
|
|
|
|
.Nm
|
|
|
|
program.
|
2003-12-24 02:20:37 +03:00
|
|
|
.It Fl v , -verbose
|
|
|
|
This option turns on verbose mode, which prints the compression
|
|
|
|
ratio for each file compressed.
|
2003-12-23 08:16:31 +03:00
|
|
|
.El
|
2004-01-02 05:55:26 +03:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
If the environment variable
|
|
|
|
.Ev GZIP
|
|
|
|
is set, it is parsed as a white-space separated list of options
|
2004-01-02 06:01:13 +03:00
|
|
|
handled before any options on the command line.
|
|
|
|
Options on the command line will override anything in
|
2004-01-02 05:55:26 +03:00
|
|
|
.Ev GZIP .
|
2004-01-02 06:01:13 +03:00
|
|
|
.Sh SEE ALSO
|
2004-02-18 12:16:27 +03:00
|
|
|
.Xr bzip2 1 ,
|
|
|
|
.Xr compress 1 ,
|
2004-01-02 06:01:13 +03:00
|
|
|
.Xr fts 3 ,
|
|
|
|
.Xr zlib 3
|
2003-12-23 08:16:31 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2003-12-24 02:20:37 +03:00
|
|
|
program was originally written by Jean-loup Gailly, licensed under
|
|
|
|
the GNU Public Licence.
|
|
|
|
Matthew R. Green wrote a simple front end for
|
2003-12-23 08:16:31 +03:00
|
|
|
.Nx 1.3
|
2003-12-24 02:20:37 +03:00
|
|
|
distribution media, based on the freely re-distributable zlib library.
|
|
|
|
It was enhanced to be mostly feature-compatible with the original
|
|
|
|
GNU
|
2003-12-23 08:16:31 +03:00
|
|
|
.Nm
|
|
|
|
program for
|
|
|
|
.Nx 2.0 .
|
2003-12-23 18:02:40 +03:00
|
|
|
.Pp
|
|
|
|
This manual documents
|
|
|
|
.Nx
|
|
|
|
.Nm
|
2004-04-27 06:25:06 +04:00
|
|
|
version 20040427.
|
2003-12-23 08:16:31 +03:00
|
|
|
.Sh AUTHORS
|
2004-04-25 20:20:33 +04:00
|
|
|
This implementation of
|
2003-12-23 08:16:31 +03:00
|
|
|
.Nm
|
2004-04-25 20:20:33 +04:00
|
|
|
was written by
|
2003-12-23 08:16:31 +03:00
|
|
|
.An Matthew R. Green Aq mrg@eterna.com.au .
|