aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEnde <ende.mail@web.de>2015-10-27 06:35:30 -0400
committerEnde <ende.mail@web.de>2015-10-27 06:35:30 -0400
commitd1cd34f6d9d3de867fb742b3303484271ef0044f (patch)
tree2c1e9622d8d2a00b6a0f9cfd922d934e626c2d59 /docs
parenta05fa62501eecc8faa58d69edfcb37f508e38644 (diff)
downloadbrotli-d1cd34f6d9d3de867fb742b3303484271ef0044f.zip
brotli-d1cd34f6d9d3de867fb742b3303484271ef0044f.tar.gz
brotli-d1cd34f6d9d3de867fb742b3303484271ef0044f.tar.bz2
Moved not about invalid distances up to 0-15 section
Diffstat (limited to 'docs')
-rw-r--r--docs/draft-alakuijala-brotli-07.nroff6
-rw-r--r--docs/draft-alakuijala-brotli-07.txt8
2 files changed, 7 insertions, 7 deletions
diff --git a/docs/draft-alakuijala-brotli-07.nroff b/docs/draft-alakuijala-brotli-07.nroff
index 264523b..898924f 100644
--- a/docs/draft-alakuijala-brotli-07.nroff
+++ b/docs/draft-alakuijala-brotli-07.nroff
@@ -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
diff --git a/docs/draft-alakuijala-brotli-07.txt b/docs/draft-alakuijala-brotli-07.txt
index f932f36..969952d 100644
--- a/docs/draft-alakuijala-brotli-07.txt
+++ b/docs/draft-alakuijala-brotli-07.txt
@@ -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