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;
12#[cfg(test)]
13#[path = "../tests/mod.rs"]
14mod tests;
15mod xx_hash3_64;
16
17pub use {compress::*, xx_hash3_64::*};
18
19use std::{
20    borrow::Cow,
21    collections::HashMap,
22    fmt,
23    io::{self, BufReader, BufWriter, Read, prelude::*},
24    mem::MaybeUninit,
25    ptr, slice,
26    str::FromStr,
27};
28
29use {
30    ::brotli::{CompressorWriter, Decompressor},
31    core::hash::BuildHasherDefault,
32    flate2::{
33        Compression,
34        read::{DeflateDecoder, GzDecoder},
35        write::{DeflateEncoder, GzEncoder},
36    },
37    twox_hash::xxhash3_64::{self, DEFAULT_SECRET_LENGTH, RawHasher, SecretBuffer},
38};