Skip to main content

Module compression

Module compression 

Source
Expand description

HTTP response (de)compression libraries

Gzip, Brotli, Zstd, and dictionary-compressed Zstd (dcz, RFC 9842) are supported.

Structs§

DictionaryData
Dictionary data for RFC 9842 shared dictionary compression.
ResponseCompressionCtx
The response compression object. Currently support gzip compression and brotli decompression.

Enums§

Algorithm

Constants§

COMPRESSION_ERROR
The type of error to return when (de)compression fails
DCZ_HEADER_SIZE
Re-export RFC 9842 constants for external use. Re-export RFC 9842 constants for external use. Re-export RFC 9842 constants for external use. RFC 9842 header size: 8-byte magic + 32-byte SHA-256 hash.
DCZ_MAGIC
Re-export RFC 9842 constants for external use. Re-export RFC 9842 constants for external use. Re-export RFC 9842 constants for external use. RFC 9842 magic number for dcz.

Traits§

Encode
The trait for both compress and decompress because the interface and syntax are the same: encode some bytes to other bytes