Skip to content

Commit

Permalink
Fix hasher resolution for long windows.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 652545288
  • Loading branch information
Brotli authored and copybara-github committed Jul 15, 2024
1 parent a528bce commit 39bcecf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c/enc/quality.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 39bcecf

Please sign in to comment.