aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrotli <no-reply@google.com>2024-07-15 11:26:47 -0700
committerCopybara-Service <copybara-worker@google.com>2024-07-15 11:27:36 -0700
commit39bcecf4559f9b0e75c6248a75d9c0db6b123d88 (patch)
treecf8c4c6005140afb7d8f1680e3fc30e605a9d8bd
parenta528bce9f65be7515a47cec2cbdcd8023822b99b (diff)
downloadbrotli-39bcecf4559f9b0e75c6248a75d9c0db6b123d88.zip
brotli-39bcecf4559f9b0e75c6248a75d9c0db6b123d88.tar.gz
brotli-39bcecf4559f9b0e75c6248a75d9c0db6b123d88.tar.bz2
Fix hasher resolution for long windows.
PiperOrigin-RevId: 652545288
-rw-r--r--c/enc/quality.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/c/enc/quality.h b/c/enc/quality.h
index 4fe649e..1065f23 100644
--- a/c/enc/quality.h
+++ b/c/enc/quality.h
@@ -194,14 +194,14 @@ static BROTLI_INLINE void ChooseHasher(const BrotliEncoderParams* params,
hasher already works well with large window. So the changes are:
H3 --> H35: for quality 3.
H54 --> H55: for quality 4 with size hint > 1MB
- H6 --> H65: for qualities 5, 6, 7, 8, 9. */
+ H6/H68 --> H65: for qualities 5, 6, 7, 8, 9. */
if (hparams->type == 3) {
hparams->type = 35;
}
if (hparams->type == 54) {
hparams->type = 55;
}
- if (hparams->type == 6) {
+ if (hparams->type == 6 || hparams->type == 68) {
hparams->type = 65;
}
}