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    str::FromStr,
25};
26
27use {
28    ::brotli::{CompressorWriter, Decompressor},
29    core::hash::BuildHasherDefault,
30    flate2::{
31        Compression,
32        read::{DeflateDecoder, GzDecoder},
33        write::{DeflateEncoder, GzEncoder},
34    },
35    twox_hash::xxhash3_64::{DEFAULT_SECRET_LENGTH, RawHasher, SecretBuffer},
36};