Versions in this module Expand all Collapse all v1 v1.0.0 Apr 8, 2023 Changes in this version + const EncodingBrotli + const EncodingDeflate + const EncodingGzip + const EncodingZstd + func Default() lightning.Middleware + func New(options ...Options) lightning.Middleware + type BrotliCompression struct + func (c *BrotliCompression) Compress(data []byte, level int) ([]byte, error) + type Compressor interface + Compress func(data []byte, level int) ([]byte, error) + type DeflateCompression struct + func (c *DeflateCompression) Compress(data []byte, level int) ([]byte, error) + type GzipCompression struct + func (c *GzipCompression) Compress(data []byte, level int) ([]byte, error) + type Options func(*config) + func WithBrotliCompressionLevel(level int) Options + func WithDeflateCompressionLevel(level int) Options + func WithGzipCompressionLevel(level int) Options + type ZstdCompression struct + func (c *ZstdCompression) Compress(data []byte, _ int) ([]byte, error)