Documentation
¶
Overview ¶
Package contentenc is how the platform sends a file compressed: which media types are worth compressing, the gzip and brotli forms of a body, whether a form saves enough to keep, and which forms a request's Accept-Encoding allows. A site's published files (internal/site) and the portal's own build files (internal/ui, #2598) are sent by these one set of rules.
Index ¶
Constants ¶
const ( // MinBytes is the smallest body worth compressing: below it the framing // costs about what the compression saves. MinBytes = 1024 )
Variables ¶
This section is empty.
Functions ¶
func Accepted ¶
Accepted reads which compressed forms an Accept-Encoding allows. An entry whose q is 0 refuses that form.
func Compressible ¶
Compressible reports whether a file of the media type is worth compressing.
func Worthwhile ¶
Worthwhile reports whether a compressed form of compressed bytes saves enough over an original of original bytes to be kept and sent.
Types ¶
This section is empty.