Module H2_hpack.Huffman

Huffman Encoding

Low-level Huffman encoding/decoding per RFC 7541 Appendix B.

val encoded_length : string -> int

encoded_length s returns the Huffman-encoded length in bytes.

val encode : Cstruct.t -> int -> string -> int

encode buf off s encodes s using Huffman coding. Returns the number of bytes written.

val decode : string -> (string, error) result

decode s decodes a Huffman-encoded string.