Order of preference for responses compressed per request, when the client
accepts several equally: zstd costs the least CPU at a ratio close to
brotli’s at the levels used here.
Bodies smaller than this are sent uncompressed: gzip’s framing overhead
and the CPU time outweigh what it saves (Caddy’s encode uses the same
minimum).
Like apply_gzip, with the content coding negotiated from the request’s
Accept-Encoding among those compiled in (DYNAMIC_PREFERENCE): zstd,
br or gzip. What the HTTP/1.1, HTTP/2 and HTTP/3 writers call (18.1.0).
If the client accepts gzip and the response body is compressible text of
at least MIN_COMPRESS_SIZE bytes, compress every content range
in-place and add Content-Encoding: gzip; also appends Accept-Encoding
to the Vary header. A body that gzip doesn’t make smaller (already
compressed or random data) is left as it was, and so is a response that
already has a Content-Encoding (e.g. a backend that compressed it).
The coding to use for this request among preference (in that order of
preference on equal weight): the one with the highest q in its
Accept-Encoding, counting * for codings not listed; None without the
header, or when nothing in preference is acceptable or compiled in.