Go API Documentation

github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip

No package summary is available.

Package

Files: 2. Third party imports: 1. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Vars

Informed from http://blog.klauspost.com/gzip-performance-for-go-webservers/

Types

Gzip

Gzip can create gzip encoders.

Field name Field type Comment
Level

int

No comment on field.

GzipPrecompressed

GzipPrecompressed provides the file extension for files precompressed with gzip encoding.

Field name Field type Comment

Gzip

No comment on field.

Functions

func (*Gzip) Provision

Provision provisions g's configuration.

func (*Gzip) UnmarshalCaddyfile

UnmarshalCaddyfile sets up the handler from Caddyfile tokens.

Uses: strconv.Atoi.

func (Gzip) AcceptEncoding

AcceptEncoding returns the name of the encoding as used in the Accept-Encoding request headers.

func (Gzip) CaddyModule

CaddyModule returns the Caddy module information.

func (Gzip) NewEncoder

NewEncoder returns a new gzip writer.

Uses: gzip.NewWriterLevel.

func (Gzip) Validate

Validate validates g's configuration.

Uses: fmt.Errorf, gzip.BestCompression, gzip.StatelessCompression.

func (GzipPrecompressed) CaddyModule

CaddyModule returns the Caddy module information.

func (GzipPrecompressed) Suffix

Suffix returns the filename suffix of precompressed files.

Private functions

func init