mirror of
https://github.com/google/brotli.git
synced 2024-11-09 21:50:07 +00:00
Moved not about invalid distances up to 0-15 section
This commit is contained in:
parent
a05fa62501
commit
d1cd34f6d9
@ -842,6 +842,9 @@ distance that was not represented by a 0 distance symbol. Similarly,
|
||||
distances that represent static dictionary words (see Section 8.) are
|
||||
not pushed to the ring buffer of last distances.
|
||||
|
||||
If a special distance symbol resolves to a zero or negative value, the
|
||||
stream should be rejected as invalid.
|
||||
|
||||
The next NDIRECT distance symbols, from 16 to 15 + NDIRECT, represent
|
||||
distances from 1 to NDIRECT. Neither the distance special symbols, nor
|
||||
the NDIRECT direct distance symbols are followed by any extra bits.
|
||||
@ -865,9 +868,6 @@ Given a distance symbol "dcode" (>= 16 + NDIRECT), and extra bits
|
||||
distance = ((offset + dextra) << NPOSTFIX) + lcode + NDIRECT + 1
|
||||
.fi
|
||||
|
||||
If a decoded distance has a zero or negative value, the stream should
|
||||
be rejected as invalid.
|
||||
|
||||
.ti 0
|
||||
5. Encoding of literal insertion lengths and copy lengths
|
||||
|
||||
|
@ -925,6 +925,9 @@ Internet-Draft Brotli October 2015
|
||||
symbol. Similarly, distances that represent static dictionary words
|
||||
(see Section 8.) are not pushed to the ring buffer of last distances.
|
||||
|
||||
If a special distance symbol resolves to a zero or negative value,
|
||||
the stream should be rejected as invalid.
|
||||
|
||||
The next NDIRECT distance symbols, from 16 to 15 + NDIRECT, represent
|
||||
distances from 1 to NDIRECT. Neither the distance special symbols,
|
||||
nor the NDIRECT direct distance symbols are followed by any extra
|
||||
@ -945,9 +948,6 @@ Internet-Draft Brotli October 2015
|
||||
hcode = (dcode - NDIRECT - 16) >> NPOSTFIX
|
||||
lcode = (dcode - NDIRECT - 16) & POSTFIX_MASK
|
||||
offset = ((2 + (hcode & 1)) << ndistbits) - 4;
|
||||
distance = ((offset + dextra) << NPOSTFIX) + lcode + NDIRECT + 1
|
||||
|
||||
If a decoded distance has a zero or negative value, the stream should
|
||||
|
||||
|
||||
|
||||
@ -956,7 +956,7 @@ Alakuijala & Szabadka Expires April 6, 2016 [Page 17]
|
||||
Internet-Draft Brotli October 2015
|
||||
|
||||
|
||||
be rejected as invalid.
|
||||
distance = ((offset + dextra) << NPOSTFIX) + lcode + NDIRECT + 1
|
||||
|
||||
5. Encoding of literal insertion lengths and copy lengths
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user