http-compress 23.2.0

A high-performance async library for HTTP compression/decompression, supporting Brotli, Deflate, and Gzip algorithms. Provides both compression and decompression capabilities with optimized memory usage, ideal for HTTP clients/servers and network programming.
Documentation
/// Minimum Brotli sliding window size in bits kept above 16 to avoid the 32 MiB H40 hasher table.
pub(crate) const BROTLI_MIN_WINDOW_BITS: u32 = 17;

/// RFC 7932 window gap subtracted from `1 << lgwin` for backward distance bounds.
pub(crate) const BROTLI_WINDOW_GAP: usize = 16;

/// Maximum cached buffers retained per element type in the thread-local Brotli pool.
pub(crate) const BROTLI_MAX_POOL_PER_TYPE: usize = 16;

/// Maximum byte size of a single buffer eligible for retention in the thread-local Brotli pool.
pub(crate) const BROTLI_MAX_POOL_BYTES: usize = 2 * 1024 * 1024;

/// Maximum capacity ratio relative to requested length when reusing a pooled Brotli slice.
pub(crate) const BROTLI_POOL_MAX_WASTE_RATIO: usize = 4;

/// Minimum element capacity threshold exempt from the pooled slice waste ratio cap.
pub(crate) const BROTLI_POOL_SMALL_ELEM_THRESHOLD: usize = 256;

/// Stack scratch buffer size used when streaming encoded Brotli output.
pub(crate) const BROTLI_ENCODE_SCRATCH_LEN: usize = 4096;

/// Stack scratch buffer size used when streaming decoded Brotli output.
pub(crate) const BROTLI_DECODE_SCRATCH_LEN: usize = 8192;