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;
15
16pub use compress::*;
17
18pub use twox_hash::XxHash3_64;
19
20use std::{
21    borrow::Cow,
22    collections::HashMap,
23    fmt,
24    io::{self, BufReader, BufWriter, Read, prelude::*},
25    str::FromStr,
26};
27
28use {
29    ::brotli::{CompressorWriter, Decompressor},
30    core::hash::BuildHasherDefault,
31    flate2::{
32        Compression,
33        read::{DeflateDecoder, GzDecoder},
34        write::{DeflateEncoder, GzEncoder},
35    },
36};