Increasing the expected compressed output size
Usage of CRC32 Castagnoli as a hash function for the hash table of symbols used for compression has a side effect where for compression level [4, 5] it will increase the required output buffer size by 0.1% (i.e. less than 1%) for a high entropy input (i.e. random data). To avoid a scenario where client code would fail while compressing data, this patch will increase the compressBound by 0.8% (i.e. 8x than worst case scenario). Validated using zlib_bench with the data from the 'Random Compression Challenge' on both Intel and Arm. Bug: 990489 Change-Id: I86c6ab09fce6ab09b45c502221864400b86a7d80 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733790 Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#684170} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 6c37c10f93e9d3ac37fd3018f15ec51340d58369
Loading
Please register or sign in to comment