Skip to content

Commit

Permalink
Clarify that the presence of a value with weight 1 is required
Browse files Browse the repository at this point in the history
  • Loading branch information
elasota committed Nov 9, 2023
1 parent 1518570 commit 84c85b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/zstd_compression_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ Number_of_Bits = Weight ? (Max_Number_of_Bits + 1 - Weight) : 0
```
When a literal value is not present, it receives a `Weight` of 0.
The least frequent symbol receives a `Weight` of 1.
Consequently, the `Weight` 1 is necessarily present.
If no symbol has a `Weight` of 1, then the data is considered corrupted.
The most frequent symbol receives a `Weight` anywhere between 1 and 11 (max).
The last symbol's `Weight` is deduced from previously retrieved Weights,
by completing to the nearest power of 2. It's necessarily non 0.
Expand Down

0 comments on commit 84c85b1

Please sign in to comment.