]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CONTRIB: hpack: implement a reverse huffman table generator for hpack
authorWilly Tarreau <w@1wt.eu>
Fri, 19 May 2017 16:14:51 +0000 (18:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:03:24 +0000 (18:03 +0100)
commit8071eae6b92f00f001af7eef89ee6ac129e45af6
treed96068d8e39bd84c950298e3767f3408b7a91557
parent3e13cbafe2612dc026494d90ce8604f08cdaf58d
CONTRIB: hpack: implement a reverse huffman table generator for hpack

This one was built by studying the HPACK Huffman table (RFC7541
appendix B). It creates 5 small tables (4*512 bytes, 1*64 bytes) to
map one byte at a time from the input stream based on the following
observations :

 * rht_bit31_24[256]   is indexed on bits 31..24 when < 0xfe
 * rht_bit24_17[256]   is indexed on bits 24..17 when 31..24 >= 0xfe
 * rht_bit15_11_fe[32] is indexed on bits 15..11 when 24..17 == 0xfe
 * rht_bit15_8[256]    is indexed on bits 15..8 when 24..17 == 0xff
 * rht_bit11_4[256]    is indexed on bits 11..4 when 15..8 == 0xff
 * when 11..4 == 0xff, 3..2 provide the following mapping :
 *   00 => 0x0a, 01 => 0x0d, 10 => 0x16, 11 => EOS
contrib/hpack/Makefile [new file with mode: 0644]
contrib/hpack/gen-rht.c [new file with mode: 0644]