hpack v1.1.0 HPack.Huffman

Huffman static table de/encoding as defined in RFC 7541.

Link to this section Summary

Functions

Decodes a Huffman encoded string with the HPACK static table

Huffman encodes a string using the HPACK static table

Link to this section Functions

Link to this function decode(encoded)
decode(binary()) :: String.t()

Decodes a Huffman encoded string with the HPACK static table.

Returns the decoded String.

Examples

iex> HPack.Huffman.decode(<< 0x27::6, 0x5::5, 0x28::6, 0x28::6, 0x7::5 >>)
"hello"
Link to this function encode(string)
encode(String.t()) :: binary()

Huffman encodes a string using the HPACK static table.

Returns the encoded String.

Examples

iex> HPack.Huffman.encode("hello")
<<0x9c, 0xb4, 0x50, 0x7f>>