Crate nahpack [] [src]

nahpack is an RFC 7541 HPACK encoder and decoder library. It compresses, decompresses, and validates an HTTP/2 "header block" as contained in HEADERS, PUSH PROMISE, and CONTINUATION frames.

Structs

Headers

Header is a collection of decoded Header objects backed by both the block passed to it and an owned buffer of decoded literals.

HpackContext

HpackContext contains the state, namely dynamic table and capacity setting, for either the transmitting or receiving part of a connection.

Enums

HpackDecodeError

HPACK decoding error states are detailed here.

Traits

HpackEncodable

HpackEncodable is the interface which headers decoded by decode_block adhere to, and headers to be encoded by encode_block must adhere to.

Functions

decode_block

Decode an HTTP/2 header block transmitted in one or more HEADERS, PUSH_PROMISE, or CONTINUATION frames. If the header block was split across multiple frames, they must first be merged.

encode_block

Encode an HTTP/2 header block to transmit in one or more HEADERS, PUSH_PROMISE, or CONTINUATION frames. The data written may be too large for one frame, and the caller is responsible for splitting it.

nahpack_context_free
nahpack_context_new
nahpack_decode_block
nahpack_encode_block
nahpack_get_header
nahpack_headers_free
nahpack_headers_new
nahpack_set_context_capacity