http-compress 23.1.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
//! http-compress
//!
//! 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.

mod brotli;
mod compress;
mod deflate;
mod gzip;
mod xx_hash3_64;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {compress::Compress, xx_hash3_64::*};

pub(crate) use compress::{
    BROTLI_DEFAULT_QUALITY, BROTLI_DEFAULT_WINDOW_BITS, MAX_DECOMPRESSED_BYTES,
};

use std::{
    borrow::Cow,
    cell::RefCell,
    collections::HashMap,
    fmt,
    mem::{MaybeUninit, size_of},
    ptr, slice,
    str::FromStr,
    thread_local,
};

use {
    ::brotli::{
        Allocator, BrotliDecompressStream, BrotliResult, BrotliState, HuffmanCode, SliceWrapper,
        SliceWrapperMut,
        enc::{
            BrotliAlloc, PDF, StaticCommand, ZopfliNode,
            cluster::HistogramPair,
            command::Command,
            encode::{
                BrotliEncoderDestroyInstance, BrotliEncoderOperation, BrotliEncoderParameter,
                BrotliEncoderStateStruct,
            },
            entropy_encode::HuffmanTree,
            floatX,
            histogram::{ContextType, HistogramCommand, HistogramDistance, HistogramLiteral},
            interface::PredictionModeContextMap,
            s16, v8,
        },
        {InputPair, InputReferenceMut},
    },
    core::hash::{BuildHasherDefault, Hasher},
    flate2::{self, Compression, Crc, Decompress, FlushCompress, FlushDecompress, Status},
    twox_hash::xxhash3_64::{self, DEFAULT_SECRET_LENGTH, RawHasher, SecretBuffer},
};