Skip to main content

hpack_html/
lib.rs

1//! # hpack-html
2//!
3//! High-performance .hpack HTML packet decompressor.
4//!
5//! Decodes binary .hpack packets produced by the `hpack-html-js` JavaScript compressor,
6//! decompresses the HTML body (DEFLATE or gzip), and verifies CRC32 integrity.
7//!
8//! ## Example
9//!
10//! ```rust,no_run
11//! let packed: &[u8] = &[/* .hpack bytes */];
12//! let result = hpack_html::unpack(packed).unwrap();
13//! println!("URL: {}", result.url);
14//! println!("HTML: {} bytes", result.html.len());
15//! ```
16
17mod decoder;
18mod error;
19mod varint;
20
21pub use decoder::{
22    read_headers, unpack, unpack_with_options, CompressionAlgorithm, UnpackOptions, UnpackResult,
23};
24pub use error::Error;