diff options
author | Zoltan Szabadka <szabadka@google.com> | 2014-01-06 16:35:24 +0100 |
---|---|---|
committer | Zoltan Szabadka <szabadka@google.com> | 2014-01-06 16:35:24 +0100 |
commit | efbc1a896593be75066ba8769915f19a6c1d7485 (patch) | |
tree | b0c5363239ceaa0593801f062a73a318a3b3cd9c | |
parent | 40955ce409e55573646af2b0d0ece2e2404f2e7a (diff) | |
download | src-efbc1a896593be75066ba8769915f19a6c1d7485.tar.gz |
Small update to brotli specification.
Clarify how to recover from error conditions caused by overflowing
block types and symbol values.
-rw-r--r-- | brotli/brotlispec.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/brotli/brotlispec.txt b/brotli/brotlispec.txt index 9bad7ba..765abfb 100644 --- a/brotli/brotlispec.txt +++ b/brotli/brotlispec.txt @@ -432,7 +432,9 @@ Abstract The value of ALPHABET_BITS depends on the alphabet of the Huffman code: it is the smallest number of bits that can represent all symbols in the alphabet. E.g. for the alphabet of literal bytes, - ALPHABET_BITS is 8. + ALPHABET_BITS is 8. The value of each of the NSYM symbols above is + the value of the ALPHABETS_BITS width machine integer representing + the symbol modulo the alphabet size of the Huffman code. The (non-zero) code lengths of the symbols can be reconstructed as follows: @@ -714,9 +716,11 @@ Abstract alphabet. A block type code 0 means that the block type is the same as the type of the second last block from the same block category, while a block type code 1 means that the block type equals the last - block type plus one. Block type codes 2 - 257 represent block types - 0 - 255. The second last and last block types are initialized with 0 - and 1, respectively, at the beginning of each meta-block. + block type plus one. If the last block type is the maximal possible, + then a block type code 1 means block type 0. Block type codes 2 - 257 + represent block types 0 - 255. The second last and last block types + are initialized with 0 and 1, respectively, at the beginning of each + meta-block. The first block type of each block category must be 0 and the block type of the first block switch command is therefore not encoded in |