Documentation
¶
Overview ¶
Package decompress provides bounded request decompression.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTooLarge = errors.New("decompress: expanded body exceeds limit") ErrExpansionRatio = errors.New("decompress: expansion ratio exceeds limit") ErrUnsupported = errors.New("decompress: unsupported content encoding") ErrMalformedContent = errors.New("decompress: malformed compressed content") )
Functions ¶
func DecodeGzip ¶
DecodeGzip expands src with both an absolute limit and an expansion-ratio limit. The ratio check makes small, highly compressible bombs fail early.
func New ¶
func New(config ...Config) fh.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.