Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid having multiple ways to encode Delta Base Index of zero. (#2005)
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.
- Loading branch information