<s>
HTTP	B-Protocol
compression	I-Protocol
is	O
a	O
capability	O
that	O
can	O
be	O
built	O
into	O
web	B-Application
servers	I-Application
and	O
web	B-Application
clients	I-Application
to	O
improve	O
transfer	O
speed	O
and	O
bandwidth	O
utilization	O
.	O
</s>
<s>
HTTP	O
data	O
is	O
compressed	B-General_Concept
before	O
it	O
is	O
sent	O
from	O
the	O
server	O
:	O
compliant	O
browsers	B-Application
will	O
announce	O
what	O
methods	O
are	O
supported	O
to	O
the	O
server	O
before	O
downloading	O
the	O
correct	O
format	O
;	O
browsers	B-Application
that	O
do	O
not	O
support	O
compliant	O
compression	O
method	O
will	O
download	O
uncompressed	B-General_Concept
data	O
.	O
</s>
<s>
The	O
most	O
common	O
compression	O
schemes	O
include	O
gzip	B-Application
and	O
Brotli	B-Application
;	O
a	O
full	O
list	O
of	O
available	O
schemes	O
is	O
maintained	O
by	O
the	O
IANA	O
.	O
</s>
<s>
At	O
a	O
lower	O
level	O
,	O
a	O
Transfer-Encoding	O
header	O
field	O
may	O
indicate	O
the	O
payload	O
of	O
an	O
HTTP	O
message	O
is	O
compressed	B-General_Concept
.	O
</s>
<s>
At	O
a	O
higher	O
level	O
,	O
a	O
Content-Encoding	O
header	O
field	O
may	O
indicate	O
that	O
a	O
resource	O
being	O
transferred	O
,	O
cached	O
,	O
or	O
otherwise	O
referenced	O
is	O
compressed	B-General_Concept
.	O
</s>
<s>
Compression	O
using	O
Content-Encoding	O
is	O
more	O
widely	O
supported	O
than	O
Transfer-Encoding	O
,	O
and	O
some	O
browsers	B-Application
do	O
not	O
advertise	O
support	O
for	O
Transfer-Encoding	O
compression	O
to	O
avoid	O
triggering	O
bugs	O
in	O
servers	O
.	O
</s>
<s>
The	O
web	B-Application
client	I-Application
advertises	O
which	O
compression	O
schemes	O
it	O
supports	O
by	O
including	O
a	O
list	O
of	O
tokens	O
in	O
the	O
HTTP	O
request	O
.	O
</s>
<s>
If	O
the	O
server	O
supports	O
one	O
or	O
more	O
compression	O
schemes	O
,	O
the	O
outgoing	O
data	O
may	O
be	O
compressed	B-General_Concept
by	O
one	O
or	O
more	O
methods	O
supported	O
by	O
both	O
parties	O
.	O
</s>
<s>
The	O
web	B-Application
server	I-Application
is	O
by	O
no	O
means	O
obligated	O
to	O
use	O
any	O
compression	O
method	O
–	O
this	O
depends	O
on	O
the	O
internal	O
settings	O
of	O
the	O
web	B-Application
server	I-Application
and	O
also	O
may	O
depend	O
on	O
the	O
internal	O
architecture	O
of	O
the	O
website	O
in	O
question	O
.	O
</s>
<s>
br	O
–	O
Brotli	B-Application
,	O
a	O
compression	B-General_Concept
algorithm	I-General_Concept
specifically	O
designed	O
for	O
HTTP	O
content	O
encoding	O
,	O
defined	O
in	O
RFC	O
7932	O
and	O
implemented	O
in	O
all	O
modern	O
major	O
browsers	B-Application
.	O
</s>
<s>
deflate	B-Algorithm
–	O
compression	O
based	O
on	O
the	O
deflate	B-Algorithm
algorithm	O
(	O
described	O
in	O
RFC	O
1951	O
)	O
,	O
a	O
combination	O
of	O
the	O
LZ77	O
algorithm	O
and	O
Huffman	O
coding	O
,	O
wrapped	O
inside	O
the	O
zlib	B-Language
data	O
format	O
(	O
RFC	O
1950	O
)	O
;	O
</s>
<s>
gzip	B-Application
–	O
GNU	B-Application
zip	I-Application
format	O
(	O
described	O
in	O
RFC	O
1952	O
)	O
.	O
</s>
<s>
Uses	O
the	O
deflate	B-Algorithm
algorithm	O
for	O
compression	O
,	O
but	O
the	O
data	O
format	O
and	O
the	O
checksum	O
algorithm	O
differ	O
from	O
the	O
"	O
deflate	B-Algorithm
"	O
content-encoding	O
.	O
</s>
<s>
rsync	B-Application
-	O
delta	O
encoding	O
in	O
HTTP	O
,	O
implemented	O
by	O
a	O
pair	O
of	O
rproxy	O
proxies	O
.	O
</s>
<s>
xz	B-Language
-	O
LZMA2-based	O
content	O
compression	O
,	O
supported	O
by	O
a	O
non-official	O
Firefox	O
patch	O
;	O
and	O
fully	O
implemented	O
in	O
mget	O
since	O
2013-12-31	O
.	O
</s>
<s>
Varnish	B-Language
–	O
built-in	O
.	O
</s>
<s>
Many	O
content	B-Operating_System
delivery	I-Operating_System
networks	I-Operating_System
also	O
implement	O
HTTP	B-Protocol
compression	I-Protocol
to	O
improve	O
speedy	O
delivery	O
of	O
resources	O
to	O
end	O
users	O
.	O
</s>
<s>
The	O
compression	O
in	O
HTTP	O
can	O
also	O
be	O
achieved	O
by	O
using	O
the	O
functionality	O
of	O
server-side	B-Language
scripting	I-Language
languages	O
like	O
PHP	B-Application
,	O
or	O
programming	O
languages	O
like	O
Java	B-Language
.	O
</s>
<s>
Various	O
online	O
tools	O
exist	O
to	O
verify	O
a	O
working	O
implementation	O
of	O
HTTP	B-Protocol
compression	I-Protocol
.	O
</s>
<s>
HTTP	B-Protocol
compression	I-Protocol
is	O
considered	O
to	O
be	O
implemented	O
correctly	O
when	O
the	O
server	O
returns	O
a	O
document	O
in	O
a	O
compressed	B-General_Concept
format	O
.	O
</s>
<s>
By	O
comparing	O
the	O
sizes	O
of	O
the	O
returned	O
documents	O
,	O
the	O
effective	O
compression	O
ratio	O
can	O
be	O
calculated	O
(	O
even	O
between	O
different	O
compression	B-General_Concept
algorithms	I-General_Concept
)	O
.	O
</s>
<s>
A	O
2009	O
article	O
by	O
Google	O
engineers	O
Arvind	O
Jain	O
and	O
Jason	O
Glasgow	O
states	O
that	O
more	O
than	O
99	O
person-years	O
are	O
wasted	O
daily	O
due	O
to	O
increase	O
in	O
page	O
load	O
time	O
when	O
users	O
do	O
not	O
receive	O
compressed	B-General_Concept
content	O
.	O
</s>
<s>
This	O
occurs	O
when	O
anti-virus	O
software	O
interferes	O
with	O
connections	O
to	O
force	O
them	O
to	O
be	O
uncompressed	B-General_Concept
,	O
where	O
proxies	O
are	O
used	O
(	O
with	O
overcautious	O
web	B-Application
browsers	I-Application
)	O
,	O
where	O
servers	O
are	O
misconfigured	O
,	O
and	O
where	O
browser	B-Application
bugs	O
stop	O
compression	O
being	O
used	O
.	O
</s>
<s>
Internet	O
Explorer	O
6	O
,	O
which	O
drops	O
to	O
HTTP	O
1.0	O
(	O
without	O
features	O
like	O
compression	O
or	O
pipelining	O
)	O
when	O
behind	O
a	O
proxy	O
–	O
a	O
common	O
configuration	O
in	O
corporate	O
environments	O
–	O
was	O
the	O
mainstream	O
browser	B-Application
most	O
prone	O
to	O
failing	O
back	O
to	O
uncompressed	B-General_Concept
HTTP	O
.	O
</s>
<s>
Another	O
problem	O
found	O
while	O
deploying	O
HTTP	B-Protocol
compression	I-Protocol
on	O
large	O
scale	O
is	O
due	O
to	O
the	O
deflate	B-Algorithm
encoding	O
definition	O
:	O
while	O
HTTP	O
1.1	O
defines	O
the	O
deflate	B-Algorithm
encoding	O
as	O
data	O
compressed	B-General_Concept
with	O
deflate	B-Algorithm
(	O
RFC	O
1951	O
)	O
inside	O
a	O
zlib	B-Language
formatted	O
stream	O
(	O
RFC	O
1950	O
)	O
,	O
Microsoft	O
server	O
and	O
client	O
products	O
historically	O
implemented	O
it	O
as	O
a	O
"	O
raw	O
"	O
deflated	O
stream	O
,	O
making	O
its	O
deployment	O
unreliable	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
some	O
software	O
,	O
including	O
the	O
Apache	B-Application
HTTP	I-Application
Server	I-Application
,	O
only	O
implement	O
gzip	B-Application
encoding	O
.	O
</s>
<s>
This	O
is	O
the	O
idea	O
behind	O
CRIME	B-General_Concept
.	O
</s>
<s>
In	O
2012	O
,	O
a	O
general	O
attack	O
against	O
the	O
use	O
of	O
data	B-General_Concept
compression	I-General_Concept
,	O
called	O
CRIME	B-General_Concept
,	O
was	O
announced	O
.	O
</s>
<s>
While	O
the	O
CRIME	B-General_Concept
attack	I-General_Concept
could	O
work	O
effectively	O
against	O
a	O
large	O
number	O
of	O
protocols	O
,	O
including	O
but	O
not	O
limited	O
to	O
TLS	O
,	O
and	O
application-layer	O
protocols	O
such	O
as	O
SPDY	O
or	O
HTTP	O
,	O
only	O
exploits	O
against	O
TLS	O
and	O
SPDY	O
were	O
demonstrated	O
and	O
largely	O
mitigated	O
in	O
browsers	B-Application
and	O
servers	O
.	O
</s>
<s>
The	O
CRIME	B-General_Concept
exploit	O
against	O
HTTP	B-Protocol
compression	I-Protocol
has	O
not	O
been	O
mitigated	O
at	O
all	O
,	O
even	O
though	O
the	O
authors	O
of	O
CRIME	B-General_Concept
have	O
warned	O
that	O
this	O
vulnerability	O
might	O
be	O
even	O
more	O
widespread	O
than	O
SPDY	O
and	O
TLS	O
compression	O
combined	O
.	O
</s>
<s>
In	O
2013	O
,	O
a	O
new	O
instance	O
of	O
the	O
CRIME	B-General_Concept
attack	I-General_Concept
against	O
HTTP	B-Protocol
compression	I-Protocol
,	O
dubbed	O
BREACH	O
,	O
was	O
published	O
.	O
</s>
<s>
Unlike	O
previous	O
instances	O
of	O
CRIME	B-General_Concept
,	O
which	O
can	O
be	O
successfully	O
defended	O
against	O
by	O
turning	O
off	O
TLS	O
compression	O
or	O
SPDY	O
header	O
compression	O
,	O
BREACH	O
exploits	O
HTTP	B-Protocol
compression	I-Protocol
which	O
cannot	O
realistically	O
be	O
turned	O
off	O
,	O
as	O
virtually	O
all	O
web	B-Application
servers	I-Application
rely	O
upon	O
it	O
to	O
improve	O
data	O
transmission	O
speeds	O
for	O
users	O
.	O
</s>
