From: elasota <1137273+elasota@users.noreply.github.com> Date: Thu, 9 Nov 2023 04:25:00 +0000 (-0500) Subject: Clarify that the presence of a value with weight 1 is required X-Git-Tag: v1.5.6^2~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc84e35138338e95016fe23feb7dae43a842ca4f;p=thirdparty%2Fzstd.git Clarify that the presence of a value with weight 1 is required --- diff --git a/doc/zstd_compression_format.md b/doc/zstd_compression_format.md index b64ddc3bf..dbf409eac 100644 --- a/doc/zstd_compression_format.md +++ b/doc/zstd_compression_format.md @@ -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.