<s>
gzip	B-Application
is	O
a	O
file	O
format	O
and	O
a	O
software	B-Application
application	I-Application
used	O
for	O
file	B-General_Concept
compression	I-General_Concept
and	I-General_Concept
decompression	I-General_Concept
.	O
</s>
<s>
The	O
program	O
was	O
created	O
by	O
Jean-loup	O
Gailly	O
and	O
Mark	O
Adler	O
as	O
a	O
free	B-Application
software	I-Application
replacement	O
for	O
the	O
compress	B-Device
program	O
used	O
in	O
early	O
Unix	B-Application
systems	I-Application
,	O
and	O
intended	O
for	O
use	O
by	O
GNU	B-Operating_System
(	O
from	O
where	O
the	O
"	O
g	O
"	O
of	O
gzip	B-Application
is	O
derived	O
)	O
.	O
</s>
<s>
The	O
decompression	O
of	O
the	O
gzip	B-Application
format	O
can	O
be	O
implemented	O
as	O
a	O
streaming	O
algorithm	O
,	O
an	O
important	O
feature	O
for	O
Web	B-Protocol
protocols	I-Protocol
,	O
data	O
interchange	O
and	O
ETL	O
(	O
in	O
standard	B-Operating_System
pipes	I-Operating_System
)	O
applications	O
.	O
</s>
<s>
gzip	B-Application
is	O
based	O
on	O
the	O
DEFLATE	B-Algorithm
algorithm	O
,	O
which	O
is	O
a	O
combination	O
of	O
LZ77	B-Algorithm
and	O
Huffman	B-General_Concept
coding	I-General_Concept
.	O
</s>
<s>
DEFLATE	B-Algorithm
was	O
intended	O
as	O
a	O
replacement	O
for	O
LZW	B-Algorithm
and	O
other	O
patent-encumbered	O
data	B-General_Concept
compression	I-General_Concept
algorithms	I-General_Concept
which	O
,	O
at	O
the	O
time	O
,	O
limited	O
the	O
usability	O
of	O
compress	B-Device
and	O
other	O
popular	O
archivers	O
.	O
</s>
<s>
"	O
gzip	B-Application
"	O
is	O
often	O
also	O
used	O
to	O
refer	O
to	O
the	O
gzip	B-Application
file	O
format	O
,	O
which	O
is	O
:	O
</s>
<s>
a	O
10-byte	O
header	O
,	O
containing	O
a	O
magic	O
number	O
(	O
1f	O
8b	O
)	O
,	O
the	O
compression	O
method	O
(	O
08	O
for	O
DEFLATE	B-Algorithm
)	O
,	O
1-byte	O
of	O
header	O
flags	O
,	O
a	O
4-byte	O
timestamp	O
,	O
compression	O
flags	O
and	O
the	O
operating	O
system	O
ID	B-Application
.	O
</s>
<s>
an	O
8-byte	O
trailer	O
,	O
containing	O
a	O
CRC-32	O
checksum	O
and	O
the	O
length	O
of	O
the	O
original	O
uncompressed	B-General_Concept
data	O
,	O
modulo	O
232	O
.	O
</s>
<s>
Although	O
its	O
file	O
format	O
also	O
allows	O
for	O
multiple	O
such	O
streams	O
to	O
be	O
concatenated	O
(	O
gzipped	O
files	O
are	O
simply	O
decompressed	O
concatenated	O
as	O
if	O
they	O
were	O
originally	O
one	O
file	O
)	O
,	O
gzip	B-Application
is	O
normally	O
used	O
to	O
compress	B-Device
just	O
single	O
files	O
.	O
</s>
<s>
Compressed	O
archives	O
are	O
typically	O
created	O
by	O
assembling	O
collections	O
of	O
files	O
into	O
a	O
single	O
tar	B-Application
archive	I-Application
(	O
also	O
called	O
tarball	B-Application
)	O
,	O
and	O
then	O
compressing	O
that	O
archive	O
with	O
gzip	B-Application
.	O
</s>
<s>
gzip	B-Application
is	O
not	O
to	O
be	O
confused	O
with	O
the	O
ZIP	B-General_Concept
archive	I-General_Concept
format	O
,	O
which	O
also	O
uses	O
DEFLATE	B-Algorithm
.	O
</s>
<s>
The	O
ZIP	B-General_Concept
format	O
can	O
hold	O
collections	O
of	O
files	O
without	O
an	O
external	O
archiver	O
,	O
but	O
is	O
less	O
compact	O
than	O
compressed	O
tarballs	B-Application
holding	O
the	O
same	O
data	O
,	O
because	O
it	O
compresses	O
files	O
individually	O
and	O
cannot	O
take	O
advantage	O
of	O
redundancy	O
between	O
files	O
(	O
solid	B-General_Concept
compression	I-General_Concept
)	O
.	O
</s>
<s>
The	O
most	O
commonly	O
known	O
is	O
the	B-Application
GNU	I-Application
Project	I-Application
's	O
implementation	O
using	O
Lempel-Ziv	B-Algorithm
coding	I-Algorithm
(	O
LZ77	B-Algorithm
)	O
.	O
</s>
<s>
OpenBSD	B-Operating_System
's	O
version	O
of	O
gzip	B-Application
is	O
actually	O
the	O
compress	B-Device
program	O
,	O
to	O
which	O
support	O
for	O
the	O
gzip	B-Application
format	O
was	O
added	O
in	O
OpenBSD	B-Operating_System
3.4	O
.	O
</s>
<s>
FreeBSD	B-Operating_System
,	O
DragonFly	B-Application
BSD	I-Application
and	O
NetBSD	B-Device
use	O
a	O
BSD-licensed	O
implementation	O
instead	O
of	O
the	O
GNU	B-Operating_System
version	O
;	O
it	O
is	O
actually	O
a	O
command-line	B-Application
interface	I-Application
for	O
zlib	B-Language
intended	O
to	O
be	O
compatible	O
with	O
the	O
GNU	B-Operating_System
implementations	O
 '	O
options	O
.	O
</s>
<s>
These	O
implementations	O
originally	O
come	O
from	O
NetBSD	B-Device
,	O
and	O
support	O
decompression	O
of	O
bzip2	B-Application
and	O
the	O
Unix	B-Application
pack	B-Application
format	O
.	O
</s>
<s>
An	O
alternative	O
compression	B-General_Concept
program	I-General_Concept
achieving	O
3-8	O
%	O
better	O
compression	O
is	O
Zopfli	B-Application
.	O
</s>
<s>
It	O
achieves	O
gzip-compatible	O
compression	O
using	O
more	O
exhaustive	O
algorithms	O
,	O
at	O
the	O
expense	O
of	O
compression	O
time	O
required	O
.	O
</s>
<s>
pigz	O
,	O
written	O
by	O
Mark	O
Adler	O
,	O
is	O
compatible	O
with	O
gzip	B-Application
and	O
speeds	O
up	O
compression	O
by	O
using	O
all	O
available	O
CPU	O
cores	O
and	O
threads	O
.	O
</s>
<s>
The	O
tar	B-Application
utility	O
included	O
in	O
most	O
Linux	O
distributions	O
can	O
extract	O
.tar.gz	B-Application
files	I-Application
by	O
passing	O
the	O
option	O
,	O
e.g.	O
,	O
,	O
where	O
-z	O
instructs	O
decompression	O
,	O
-x	O
means	O
extraction	O
,	O
and	O
-f	O
specifies	O
the	O
name	O
of	O
the	O
compressed	O
archive	O
file	O
to	O
extract	O
from	O
.	O
</s>
<s>
zlib	B-Language
is	O
an	O
abstraction	O
of	O
the	O
DEFLATE	B-Algorithm
algorithm	O
in	O
library	O
form	O
which	O
includes	O
support	O
both	O
for	O
the	O
gzip	B-Application
file	O
format	O
and	O
a	O
lightweight	O
data	O
stream	O
format	O
in	O
its	O
API	O
.	O
</s>
<s>
The	O
zlib	B-Language
stream	O
format	O
,	O
DEFLATE	B-Algorithm
,	O
and	O
the	O
gzip	B-Application
file	O
format	O
were	O
standardized	O
respectively	O
as	O
RFC	O
1950	O
,	O
RFC	O
1951	O
,	O
and	O
RFC	O
1952	O
.	O
</s>
<s>
The	O
gzip	B-Application
format	O
is	O
used	O
in	O
HTTP	B-Protocol
compression	I-Protocol
,	O
a	O
technique	O
used	O
to	O
speed	O
up	O
the	O
sending	O
of	O
HTML	B-Language
and	O
other	O
content	O
on	O
the	O
World	O
Wide	O
Web	O
.	O
</s>
<s>
It	O
is	O
one	O
of	O
the	O
three	O
standard	O
formats	O
for	O
HTTP	B-Protocol
compression	I-Protocol
as	O
specified	O
in	O
RFC	O
2616	O
.	O
</s>
<s>
This	O
RFC	O
also	O
specifies	O
a	O
zlib	B-Language
format	O
(	O
called	O
"	O
DEFLATE	B-Algorithm
"	O
)	O
,	O
which	O
is	O
equal	O
to	O
the	O
gzip	B-Application
format	O
except	O
that	O
gzip	B-Application
adds	O
eleven	O
bytes	O
of	O
overhead	O
in	O
the	O
form	O
of	O
headers	O
and	O
trailers	O
.	O
</s>
<s>
Still	O
,	O
the	O
gzip	B-Application
format	O
is	O
sometimes	O
recommended	O
over	O
zlib	B-Language
because	O
Internet	B-Application
Explorer	I-Application
does	O
not	O
implement	O
the	O
standard	O
correctly	O
and	O
cannot	O
handle	O
the	O
zlib	B-Language
format	O
as	O
specified	O
in	O
RFC	O
1950	O
.	O
</s>
<s>
zlib	B-Language
DEFLATE	B-Algorithm
is	O
used	O
internally	O
by	O
the	O
Portable	O
Network	O
Graphics	O
(	O
PNG	O
)	O
format	O
.	O
</s>
<s>
Since	O
the	O
late	O
1990s	O
,	O
bzip2	B-Application
,	O
a	O
file	B-General_Concept
compression	I-General_Concept
utility	O
based	O
on	O
a	O
block-sorting	O
algorithm	O
,	O
has	O
gained	O
some	O
popularity	O
as	O
a	O
gzip	B-Application
replacement	O
.	O
</s>
<s>
AdvanceCOMP	O
and	O
7-Zip	B-Language
can	O
produce	O
gzip-compatible	O
files	O
,	O
using	O
an	O
internal	O
DEFLATE	B-Algorithm
implementation	O
with	O
better	O
compression	O
ratios	O
than	O
gzip	B-Application
itself	O
—	O
at	O
the	O
cost	O
of	O
more	O
processor	O
time	O
compared	O
to	O
the	O
reference	O
implementation	O
.	O
</s>
