Expand description
The static Huffman code of HPACK (RFC 7541 §5.2, Appendix B), shared with QPACK (RFC 9204 §4.1.2).
The table below is Appendix B transcribed: one (code, bits) pair per
symbol, 0 to 255 and EOS (256), code right-aligned. Decoding walks a binary
tree built from it at compile time by a const fn, so there is no
hand-written second table to disagree with the first.
Functions§
- decode
- Appends the decoding of
inputtoout, refusing to produce more thancapoctets. - encode
- Appends
sHuffman-coded, padded with the most significant bits of EOS (all ones) to an octet boundary. - encoded_
len - The length of
sHuffman-coded, padding included.