Commit 5e0260a
feat(qpack): dynamic-table encoder driving the encoder stream
QPACK previously had a full decoder but a static-only encoder. Add a
dynamic-table encoder so the send path is fully bidirectional, matching
HPACK.
QpackEncoder::with_dynamic_table + encode() return an Encoded pair: the
encoder-stream instructions (Set Dynamic Table Capacity, Insert with
Name Reference against static/dynamic names, Insert with Literal Name)
and a field section with dynamic indexed / name-reference representations
and a non-zero Required Insert Count (Base = RIC, no post-base forms).
Entries referenced by a field section are never evicted by inserts in the
same batch (the section is decoded as a unit after the whole encoder-stream
chunk); sensitive fields stay out of the table and are coded never-indexed.
The static-only encode_field_section path is unchanged (byte-identical).
Adds DynamicTable::find / evict_floor for the encoder mirror, 11 round-trip
tests through the existing decoder, and updates README/CHANGELOG/module docs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent d94348c commit 5e0260a
5 files changed
Lines changed: 593 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
10 | 22 | | |
11 | 23 | | |
12 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
123 | 166 | | |
124 | 167 | | |
125 | 168 | | |
| |||
0 commit comments