Skip to main content

Crate hpack_html

Crate hpack_html 

Source
Expand description

§hpack-html

High-performance .hpack HTML packet decompressor.

Decodes binary .hpack packets produced by the hpack-html-js JavaScript compressor, decompresses the HTML body (DEFLATE or gzip), and verifies CRC32 integrity.

§Example

let packed: &[u8] = &[/* .hpack bytes */];
let result = hpack_html::unpack(packed).unwrap();
println!("URL: {}", result.url);
println!("HTML: {} bytes", result.html.len());

Structs§

UnpackOptions
Options for unpacking.
UnpackResult
Result of unpacking an .hpack packet.

Enums§

CompressionAlgorithm
Compression algorithm.
Error
Errors that can occur when decoding an .hpack packet.

Functions§

read_headers
Read only headers without decompressing the body.
unpack
Unpack an .hpack binary packet.
unpack_with_options
Unpack with options.