mirror of
https://github.com/facebook/zstd.git
synced 2025-05-28 16:01:31 +03:00
Clarify that decoding too many Huffman weights is a failure condition
This commit is contained in:
parent
1518570c62
commit
e61e3ff152
@ -1353,6 +1353,9 @@ If updating state after decoding a symbol would require more bits than
|
|||||||
remain in the stream, it is assumed that extra bits are 0. Then,
|
remain in the stream, it is assumed that extra bits are 0. Then,
|
||||||
symbols for each of the final states are decoded and the process is complete.
|
symbols for each of the final states are decoded and the process is complete.
|
||||||
|
|
||||||
|
If this process would produce more weights than the maximum number of decoded
|
||||||
|
weights (255), then the data is considered corrupted.
|
||||||
|
|
||||||
#### Conversion from weights to Huffman prefix codes
|
#### Conversion from weights to Huffman prefix codes
|
||||||
|
|
||||||
All present symbols shall now have a `Weight` value.
|
All present symbols shall now have a `Weight` value.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user