hpack v1.0.3 HPack.Huffman

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

Summary

Functions

Decodes a Huffman encoded string with the HPACK static table

Huffman encodes a string using the HPACK static table

Functions

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"
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>>