HTTP gzip compression


The client first sends a request with an Accept-Encoding header that indicates it supports gzip:

GET / HTTP/1.1\r\n
Accept-Encoding: gzip, deflate\r\n

The server may then send a response with a compressed response body and a Content-Encoding header that specifies that gzip encoding was used::

HTTP/1.1 200 OK\r\n
Content-Encoding: gzip\r\n
Content-Length: XX\r\n
... compressed content ...