Skip to main content

http_compress/
lib.rs

1//! http-compress
2//!
3//! A high-performance async library for HTTP compression/decompression,
4//! supporting Brotli, Deflate, and Gzip algorithms. Provides both compression
5//! and decompression capabilities with optimized memory usage,
6//! ideal for HTTP clients/servers and network programming.
7
8mod brotli;
9mod compress;
10mod deflate;
11mod gzip;
12mod xx_hash3_64;
13
14#[cfg(test)]
15#[path = "../tests/mod.rs"]
16mod tests;
17
18pub use {compress::*, xx_hash3_64::*};
19
20use std::{
21    borrow::Cow,
22    collections::HashMap,
23    fmt,
24    io::{self, Read, Write},
25    mem::MaybeUninit,
26    ptr, slice,
27    str::FromStr,
28};
29
30use {
31    ::brotli::{CompressorWriter, Decompressor},
32    core::hash::BuildHasherDefault,
33    flate2::{
34        Compression,
35        read::{DeflateDecoder, MultiGzDecoder},
36        write::{DeflateEncoder, GzEncoder},
37    },
38    twox_hash::xxhash3_64::{self, DEFAULT_SECRET_LENGTH, RawHasher, SecretBuffer},
39};