Fix BrotliEncoderEstimatePeakMemoryUsage (#1002)

Fixes https://github.com/google/brotli/issues/1001
This commit is contained in:
Aron Parker 2023-01-07 22:01:47 +01:00 committed by GitHub
parent e3ea91d5c9
commit 71fe6cac06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1829,6 +1829,7 @@ size_t BrotliEncoderEstimatePeakMemoryUsage(int quality, int lgwin,
params.quality = quality;
params.lgwin = lgwin;
params.size_hint = input_size;
params.large_window = lgwin > BROTLI_MAX_WINDOW_BITS;
SanitizeParams(&params);
params.lgblock = ComputeLgBlock(&params);
ChooseHasher(&params, &params.hasher);