Module compress

Source
Expand description

Certificate compression and decompression support

This crate supports compression and decompression everywhere certificates are used, in accordance with RFC8879.

Note that this is only supported for TLS1.3 connections.

§Getting started

Build this crate with the brotli and/or zlib crate features. This adds dependencies on these crates. They are used by default if enabled.

We especially recommend brotli as it has the widest deployment so far.

§Custom compression/decompression implementations

  1. Implement the CertCompressor and/or CertDecompressor traits
  2. Provide those to:

These are used in these circumstances:

Structs§

CompressionCacheInnerstd
Innards of an enabled CompressionCache.
CompressionFailed
A content-less error for when CertCompressor::compress fails.
DecompressionFailed
A content-less error for when CertDecompressor::decompress fails.

Enums§

CompressionCache
An LRU cache for compressions.
CompressionLevel
A hint for how many resources to dedicate to a compression.

Traits§

CertCompressor
An available certificate compression algorithm.
CertDecompressor
An available certificate decompression algorithm.

Functions§

default_cert_compressors
Returns the supported CertCompressor implementations enabled by crate features.
default_cert_decompressors
Returns the supported CertDecompressor implementations enabled by crate features.