-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do we need two ways to represent Base Index? #2002
Comments
Hmm, diagrams suggest that we already have the latter form. My code might not be interoperable, but it subtracts the extra 1 already. Oh, have I mentioned recently that I hate post-base indexing? Could we perhaps reconsider its addition and have any single-pass encoder lose any opportunity to use insertions it makes after committing to a largest reference? Maybe I should open another issue. |
The ones with the diagram; i.e. Post Base Index that appears in the request and push streams is OK. However, the Delta Base Index calculated in section 5.4.1 is missing the "subtract the extra 1." That is what I am complaining.
I think it might be sensible to open a new issue for the purpose. Even though I have an implementation that emits post-base indexing (for the time being), I agree that it is an unnecessary complexity at least in the current form. Because in the current form, even if you emit the headers in single pass, you still need to adjust the Header Data Prefix afterwards so that Largest Reference will include the correct value. To put it another way, it is impossible to write a "streaming encoder." Therefore, my preference goes to either removing post-base indexing, or to removing "Largest Reference" to allow true one-pass encoding (i.e. streaming encoding). In the latter case, every decoder can / will check if an unresolvable reference is included in each of the header field rather than relying on "Largest Reference." |
This is not true. The draft states:
|
Why do you hate it?
I am against both reconsidering and removing post-base indexing: the former because we already had this discussion and came to a consensus (however "rough") and the latter is because this would penalize already-extant implementations that use this feature profitably. |
Oh thank you for pointing that out. I missed that. Though I still think that we have an inconsistency in the design. As pointed out, post-base indexing in the request and push streams do not call index of zero to be an error. Instead, they adjust the offset so that a post-base index of zero do not overlap with a non-post-base index with zero. Should we follow the pattern for the delta base index as well? |
I agree that inconsistency exists. |
As discussed in quicwg#2002, there are two ways to encode Delta Base Index of zero at the wire level; i.e. (sign-bit, delta-base-index) = (0, 0) and (1, 0). To avoid having multiple ways to represent one value, we prohibit the latter form from being used. A receiver is required to raise an error when it sees the latter. This is not only an unnecessary complexity but also contradicts from the approach we use for Post-Base Indexes. In case of Post- Base Indexes, we introduce an offset of one so that the Post-Base Index of zero and a non-Post-Base Index of zero do not overlap. The commit adopts the approach to Delta Base Index; giving us consistency in the design and also removing an error check at the cost of requiring one subtraction.
As discussed in #2002, there are two ways to encode Delta Base Index of zero at the wire level; i.e. (sign-bit, delta-base-index) = (0, 0) and (1, 0). To avoid having multiple ways to represent one value, we prohibit the latter form from being used. A receiver is required to raise an error when it sees the latter. This is not only an unnecessary complexity but also contradicts from the approach we use for Post-Base Indexes. In case of Post- Base Indexes, we introduce an offset of one so that the Post-Base Index of zero and a non-Post-Base Index of zero do not overlap. The commit adopts the approach to Delta Base Index; giving us consistency in the design and also removing an error check at the cost of requiring one subtraction.
Closed by #2005 |
At the moment, there are two ways to Base Index identical to Largest Reference: use (S, Delta Base Index) = (1, 0) or (0, 0).
Would it be better to add one offset when the sign bit is set, i.e. change
to
?
I ask this because IMO we have an inconsistency; Post Base Index already has this type of offset so that a Post Base Index of zero does not become equal to Relative Index of zero.
EDIT. Inserted "already" to avoid confusion.
The text was updated successfully, but these errors were encountered: