diff options
author | Evgenii Kliuchnikov <eustas@google.com> | 2023-05-04 15:09:05 +0000 |
---|---|---|
committer | Evgenii Kliuchnikov <eustas.ru@gmail.com> | 2023-07-04 07:55:16 +0000 |
commit | e252f1fc155cf62d147766a33734b0ce0a4caf30 (patch) | |
tree | 0dd203243ba643fabc8a7b8ef502a37076244864 /c/dec/bit_reader.c | |
parent | 11abde4c96a72a41fbbf48181375527accd4e212 (diff) | |
download | brotli-e252f1fc155cf62d147766a33734b0ce0a4caf30.zip brotli-e252f1fc155cf62d147766a33734b0ce0a4caf30.tar.gz brotli-e252f1fc155cf62d147766a33734b0ce0a4caf30.tar.bz2 |
0.5-2.9% decoder speedup
PiperOrigin-RevId: 529412095
Diffstat (limited to 'c/dec/bit_reader.c')
-rw-r--r-- | c/dec/bit_reader.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/c/dec/bit_reader.c b/c/dec/bit_reader.c index b3ad967..35101dd 100644 --- a/c/dec/bit_reader.c +++ b/c/dec/bit_reader.c @@ -29,7 +29,7 @@ const brotli_reg_t kBrotliBitMask[33] = { 0x00000000, void BrotliInitBitReader(BrotliBitReader* const br) { br->val_ = 0; - br->bit_pos_ = sizeof(br->val_) << 3; + br->bit_pos_ = 0; } BROTLI_BOOL BrotliWarmupBitReader(BrotliBitReader* const br) { @@ -41,6 +41,7 @@ BROTLI_BOOL BrotliWarmupBitReader(BrotliBitReader* const br) { aligned_read_mask = 0; } if (BrotliGetAvailableBits(br) == 0) { + br->val_ = 0; if (!BrotliPullByte(br)) { return BROTLI_FALSE; } |