gzip -package:zlib

Generic zip controlled by a function with type-specific branches
Gzip compression with default parameters.
Use gzip to compress the body of the response.
Convert an OutputStream that consumes compressed ByteStrings into an OutputStream that consumes uncompressed ByteStrings in the gzip format
Automatic gzip compression of responses.
CRC32 checksumming using the GZIP/PKZIP algorithm as used in both ISO 3309 and section 8.1.1.6.2 of ITU-T V.42 and referenced in RFC1952.
GZip file decompression Copyright (c) 2004 John Goerzen, jgoerzen@complete.org The GZip format is described in RFC1952.
Helpers for running a Snap web handler with compression.
Please refer to the Support API > GZIP Streams chapter of the reference. Internal: FreeType.Support.GZIP.Internal.
This module exports utilities to compress and decompress GZip pipes streams.
Twin map for monadic transformation
Twin map for queries
Twin map for transformation
Decide which files to compress based on MIME type The ByteString is the value of the "Content-Type" response header and will default to False if the header is missing. E.g. if you'd only want to compress json data, you might define your own function as follows:
myCheckMime mime = mime == "application/json"
Gzip behavior for files Only applies to ResponseFile (responseFile) responses. So any streamed data will be compressed based solely on the response headers having the right "Content-Type" and "Content-Length". (which are checked with gzipCheckMime and gzipSizeThreshold, respectively)
Skip compression when the size of the response body is below this amount of bytes (default: 860.) Setting this option to less than 150 will actually increase the size of outgoing data if its original size is less than 150 bytes. This will only skip compression if the response includes a "Content-Length" header AND the length is less than this threshold.
Convert an OutputStream that consumes compressed Builders into an OutputStream that consumes uncompressed Builders in the gzip format
Ignore the Accept-Encoding header in the Request and attempt to compress the body of the response with gzip. calls compressWithFilter using compress. see also: compressedResponseFilter