Skip to content

Commit eade0aa

Browse files
committed
Re-level sections, Martin's comments
1 parent db55b12 commit eade0aa

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

draft-ietf-quic-qpack.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,26 @@ balance between resilience against head-of-line blocking and optimal compression
7171
ratio. The design goals are to closely approach the compression ratio of HPACK
7272
with substantially less head-of-line blocking under the same loss conditions.
7373

74-
## Header Tables
74+
# Header Tables
7575

7676
Like HPACK, QPACK uses two tables for associating header fields to indexes. The
7777
static table (see {{table-static}}) is predefined and contains common header
7878
fields (some of them with an empty value). The dynamic table (see
7979
{{table-dynamic}}) built up over the course of the connection and can be used by
8080
the encoder to index header fields repeated in the encoded header lists.
8181

82-
These two tables are indexed in a different manner than in HPACK; see
83-
{{indexing}} for more details.
82+
Unlike in HPACK, entries in the QPACK static and dynamic tables are addressed
83+
separately. The following sections describe how entries in each table is
84+
addressed.
8485

85-
### Static Table {#table-static}
86+
## Static Table {#table-static}
8687

87-
The static table consists of a predefined static list of header fields. Its
88-
entries are defined in Appendix A of {{!RFC7541}}. Note that because HPACK did
89-
not use zero-based references, there is no value at index zero of the static
90-
table.
88+
The static table consists of a predefined static list of header fields, each of
89+
which has a fixed index over time. Its entries are defined in Appendix A of
90+
{{!RFC7541}}. Note that because HPACK did not use zero-based references, there
91+
is no value at index zero of the static table.
9192

92-
### Dynamic Table {#table-dynamic}
93+
## Dynamic Table {#table-dynamic}
9394

9495
The dynamic table consists of a list of header fields maintained in first-in,
9596
first-out order. The dynamic table is initially empty. Entries are added by
@@ -131,16 +132,16 @@ the dynamic table is less than or equal to the maximum size.
131132
This mechanism can be used to completely clear entries from the dynamic table by
132133
setting a maximum size of 0, which can subsequently be restored.
133134

134-
### Indexing
135+
### Absolute and Relative Indexing {#indexing}
135136

136-
Entries in the QPACK static and dynamic tables are addressed separately.
137+
Each entry possesses both an absolute index which is fixed for the lifetime of
138+
that entry and a relative index which changes over time based on the context of
139+
the reference. The first entry inserted has an absolute index of "1"; indices
140+
increase sequentially with each insertion.
137141

138-
While entries in the static table have the same indices at all times, entries
139-
are inserted into the dynamic table over time. Each entry possesses both an
140-
absolute index which is fixed for the lifetime of that entry and a relative
141-
index which changes over time based on the context of the reference. The first
142-
entry inserted has an absolute index of "1"; indices increase sequentially with
143-
each insertion.
142+
The relative index begins at zero and increases in the opposite direction from
143+
the absolute index. Determining which entry has a relative index of "0" depends
144+
on the context of the reference.
144145

145146
On the control stream, a relative index of "0" always refers to the most
146147
recently inserted value in the dynamic table. Note that this means the
@@ -165,9 +166,9 @@ d = count of entries dropped
165166
Because frames from request streams can be delivered out of order with
166167
instructions on the control stream, relative indices are relative to the Base
167168
Index at the beginning of the header block (see {{absolute-index}}). The Base
168-
Index is the absolute index of the entry which has the relative index of zero
169-
when interpreting the frame. The relative indices of entries do not change
170-
while interpreting headers on a request or push stream.
169+
Index is an absolute index. When interpreting the rest of the frame, the entry
170+
identified by Base Index has a relative index of zero. The relative indices of
171+
entries do not change while interpreting headers on a request or push stream.
171172

172173
~~~~~ drawing
173174
Base Index
@@ -184,9 +185,14 @@ d = count of entries dropped
184185
~~~~~
185186
{: title="Example Dynamic Table Indexing - Request Stream"}
186187

187-
Entries with an absolute index greater than a frame's Base Index can be
188-
referenced using specific Post-Base instructions. The relative indices of
189-
Post-Base references count up from Base Index.
188+
### Post-Base Indexing
189+
190+
A header block on the request stream can reference entries added after the entry
191+
identified by the Base Index. This allows an encoder to process a header block
192+
in a single pass and include references to entries added while processing this
193+
(or other) header blocks. Newly added entries are referenced using Post-Base
194+
instructions. Indices for Post-Base instructions increase in the same direction
195+
as absolute indices, but the zero value is one higher than the Base Index.
190196

191197
~~~~~ drawing
192198
Base Index

0 commit comments

Comments
 (0)