1*0a6a1f1dSLionel Sambuc.\" $NetBSD: gzip.1,v 1.25 2015/04/06 21:41:17 wiz Exp $ 25a645f22SBen Gras.\" 35a645f22SBen Gras.\" Copyright (c) 1997, 2003, 2004 Matthew R. Green 45a645f22SBen Gras.\" All rights reserved. 55a645f22SBen Gras.\" 65a645f22SBen Gras.\" Redistribution and use in source and binary forms, with or without 75a645f22SBen Gras.\" modification, are permitted provided that the following conditions 85a645f22SBen Gras.\" are met: 95a645f22SBen Gras.\" 1. Redistributions of source code must retain the above copyright 105a645f22SBen Gras.\" notice, this list of conditions and the following disclaimer. 115a645f22SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 125a645f22SBen Gras.\" notice, this list of conditions and the following disclaimer in the 135a645f22SBen Gras.\" documentation and/or other materials provided with the distribution. 145a645f22SBen Gras.\" 155a645f22SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 165a645f22SBen Gras.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 175a645f22SBen Gras.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 185a645f22SBen Gras.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 195a645f22SBen Gras.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 205a645f22SBen Gras.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 215a645f22SBen Gras.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 225a645f22SBen Gras.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 235a645f22SBen Gras.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 245a645f22SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 255a645f22SBen Gras.\" SUCH DAMAGE. 265a645f22SBen Gras.\" 27*0a6a1f1dSLionel Sambuc.Dd April 6, 2015 285a645f22SBen Gras.Dt GZIP 1 295a645f22SBen Gras.Os 305a645f22SBen Gras.Sh NAME 315a645f22SBen Gras.Nm gzip 325a645f22SBen Gras.Nd compression/decompression tool using Lempel-Ziv coding (LZ77) 335a645f22SBen Gras.Sh SYNOPSIS 345a645f22SBen Gras.Nm 355a645f22SBen Gras.Op Fl cdfhlNnqrtVv 365a645f22SBen Gras.Op Fl S Ar suffix 375a645f22SBen Gras.Ar file 385a645f22SBen Gras.Oo 395a645f22SBen Gras.Ar file Oo ... 405a645f22SBen Gras.Oc 415a645f22SBen Gras.Oc 425a645f22SBen Gras.Nm gunzip 435a645f22SBen Gras.Op Fl cfhNqrtVv 445a645f22SBen Gras.Op Fl S Ar suffix 455a645f22SBen Gras.Ar file 465a645f22SBen Gras.Oo 475a645f22SBen Gras.Ar file Oo ... 485a645f22SBen Gras.Oc 495a645f22SBen Gras.Oc 505a645f22SBen Gras.Nm zcat 515a645f22SBen Gras.Op Fl fhV 525a645f22SBen Gras.Ar file 535a645f22SBen Gras.Oo 545a645f22SBen Gras.Ar file Oo ... 555a645f22SBen Gras.Oc 565a645f22SBen Gras.Oc 575a645f22SBen Gras.Sh DESCRIPTION 585a645f22SBen GrasThe 595a645f22SBen Gras.Nm 605a645f22SBen Grasprogram compresses and decompresses files using Lempel-Ziv coding 615a645f22SBen Gras(LZ77). 625a645f22SBen GrasIf no 635a645f22SBen Gras.Ar files 645a645f22SBen Grasare specified, 655a645f22SBen Gras.Nm 665a645f22SBen Graswill compress from standard input, or decompress to standard output. 675a645f22SBen GrasWhen in compression mode, each 685a645f22SBen Gras.Ar file 695a645f22SBen Graswill be replaced with another file with the suffix, set by the 705a645f22SBen Gras.Fl S Ar suffix 715a645f22SBen Grasoption, added, if possible. 725a645f22SBen GrasIn decompression mode, each 735a645f22SBen Gras.Ar file 745a645f22SBen Graswill be checked for existence, as will the file with the suffix 755a645f22SBen Grasadded. 765a645f22SBen Gras.Pp 775a645f22SBen GrasIf invoked as 785a645f22SBen Gras.Nm gunzip 795a645f22SBen Grasthen the 805a645f22SBen Gras.Fl d 815a645f22SBen Grasoption is enabled. 825a645f22SBen GrasIf invoked as 835a645f22SBen Gras.Nm zcat 845a645f22SBen Grasor 855a645f22SBen Gras.Nm gzcat 865a645f22SBen Grasthen both the 875a645f22SBen Gras.Fl c 885a645f22SBen Grasand 895a645f22SBen Gras.Fl d 905a645f22SBen Grasoptions are enabled. 915a645f22SBen Gras.Pp 925a645f22SBen GrasThis version of 935a645f22SBen Gras.Nm 945a645f22SBen Grasis also capable of decompressing files compressed using 95*0a6a1f1dSLionel Sambuc.Xr compress 1 , 96*0a6a1f1dSLionel Sambuc.Xr bzip2 1 , 975a645f22SBen Grasor 98*0a6a1f1dSLionel Sambuc.Xr xz 1 . 995a645f22SBen Gras.Sh OPTIONS 1005a645f22SBen GrasThe following options are available: 1015a645f22SBen Gras.Bl -tag -width XXrXXXrecursiveX 1025a645f22SBen Gras.It Fl 1 , -fast 1035a645f22SBen Gras.It Fl 2 1045a645f22SBen Gras.It Fl 3 1055a645f22SBen Gras.It Fl 4 1065a645f22SBen Gras.It Fl 5 1075a645f22SBen Gras.It Fl 6 1085a645f22SBen Gras.It Fl 7 1095a645f22SBen Gras.It Fl 8 1105a645f22SBen Gras.It Fl 9 , -best 1115a645f22SBen GrasThese options change the compression level used, with the 1125a645f22SBen Gras.Fl 1 1135a645f22SBen Grasoption being the fastest, with less compression, and the 1145a645f22SBen Gras.Fl 9 1155a645f22SBen Grasoption being the slowest, with optimal compression. 1165a645f22SBen GrasThe default compression level is 6. 1175a645f22SBen Gras.It Fl c , -stdout , -to-stdout 1185a645f22SBen GrasThis option specifies that output will go to the standard output 1195a645f22SBen Grasstream, leaving files intact. 1205a645f22SBen Gras.It Fl d , -decompress , -uncompress 1215a645f22SBen GrasThis option selects decompression rather than compression. 1225a645f22SBen Gras.It Fl f , -force 1235a645f22SBen GrasThis option turns on force mode. 1245a645f22SBen GrasThis allows files with multiple links, overwriting of pre-existing 1255a645f22SBen Grasfiles, reading from or writing to a terminal, and when combined 1265a645f22SBen Graswith the 1275a645f22SBen Gras.Fl c 1285a645f22SBen Grasoption, allowing non-compressed data to pass through unchanged. 1295a645f22SBen Gras.It Fl h , -help 1305a645f22SBen GrasThis option prints a usage summary and exits. 1315a645f22SBen Gras.It Fl l , -list 1325a645f22SBen GrasThis option displays information about the file's compressed and 1335a645f22SBen Grasuncompressed size, ratio, uncompressed name. 1345a645f22SBen GrasWith the 1355a645f22SBen Gras.Fl v 1365a645f22SBen Grasoption, it also displays the compression method, CRC, date and time 1375a645f22SBen Grasembedded in the file. 1385a645f22SBen Gras.It Fl N , -name 1395a645f22SBen GrasThis option causes the stored filename in the input file to be used 1405a645f22SBen Grasas the output file. 1415a645f22SBen Gras.It Fl n , -no-name 1425a645f22SBen GrasThis option stops the filename and timestamp from being stored in 1435a645f22SBen Grasthe output file. 1445a645f22SBen Gras.It Fl q , -quiet 1455a645f22SBen GrasWith this option, no warnings or errors are printed. 1465a645f22SBen Gras.It Fl r , -recursive 1475a645f22SBen GrasThis option is used to 1485a645f22SBen Gras.Nm 1495a645f22SBen Grasthe files in a directory tree individually, using the 1505a645f22SBen Gras.Xr fts 3 1515a645f22SBen Graslibrary. 1525a645f22SBen Gras.It Fl S Ar suffix , Fl -suffix Ar suffix 1535a645f22SBen GrasThis option changes the default suffix from .gz to 1545a645f22SBen Gras.Ar suffix . 1555a645f22SBen Gras.It Fl t , -test 1565a645f22SBen GrasThis option will test compressed files for integrity. 1575a645f22SBen Gras.It Fl V , -version 1585a645f22SBen GrasThis option prints the version of the 1595a645f22SBen Gras.Nm 1605a645f22SBen Grasprogram. 1615a645f22SBen Gras.It Fl v , -verbose 1625a645f22SBen GrasThis option turns on verbose mode, which prints the compression 1635a645f22SBen Grasratio for each file compressed. 1645a645f22SBen Gras.El 1655a645f22SBen Gras.Sh ENVIRONMENT 1665a645f22SBen GrasIf the environment variable 1675a645f22SBen Gras.Ev GZIP 1685a645f22SBen Grasis set, it is parsed as a white-space separated list of options 1695a645f22SBen Grashandled before any options on the command line. 1705a645f22SBen GrasOptions on the command line will override anything in 1715a645f22SBen Gras.Ev GZIP . 1725a645f22SBen Gras.Sh SEE ALSO 1735a645f22SBen Gras.Xr bzip2 1 , 1745a645f22SBen Gras.Xr compress 1 , 1755a645f22SBen Gras.Xr xz 1 , 1765a645f22SBen Gras.Xr fts 3 , 1775a645f22SBen Gras.Xr zlib 3 1785a645f22SBen Gras.Sh HISTORY 1795a645f22SBen GrasThe 1805a645f22SBen Gras.Nm 1815a645f22SBen Grasprogram was originally written by Jean-loup Gailly, licensed under 1825a645f22SBen Grasthe GNU Public Licence. 1835a645f22SBen GrasMatthew R. Green wrote a simple front end for 1845a645f22SBen Gras.Nx 1.3 1855a645f22SBen Grasdistribution media, based on the freely re-distributable zlib library. 1865a645f22SBen GrasIt was enhanced to be mostly feature-compatible with the original 1875a645f22SBen GrasGNU 1885a645f22SBen Gras.Nm 1895a645f22SBen Grasprogram for 1905a645f22SBen Gras.Nx 2.0 . 1915a645f22SBen Gras.Pp 1925a645f22SBen GrasThis manual documents 1935a645f22SBen Gras.Nx 1945a645f22SBen Gras.Nm 195*0a6a1f1dSLionel Sambucversion 20150113. 1965a645f22SBen Gras.Sh AUTHORS 1975a645f22SBen GrasThis implementation of 1985a645f22SBen Gras.Nm 1995a645f22SBen Graswas written by 20084d9c625SLionel Sambuc.An Matthew R. Green Aq Mt mrg@eterna.com.au . 201