]> git.ipfire.org Git - thirdparty/zstd.git/commit
Provide an API function to estimate decompressed size.
authorshakeelrao <shakeelrao79@gmail.com>
Thu, 28 Feb 2019 08:42:49 +0000 (00:42 -0800)
committershakeelrao <shakeelrao79@gmail.com>
Thu, 28 Feb 2019 08:42:49 +0000 (00:42 -0800)
commit820af1e07855019c95299e27666321fc8b096ebd
treeac4f0e64df648fa28c7dcc74ff9ee8ef63983e26
parentbe3bd70c57a23383401f8a883cdecaca1d10a4d7
Provide an API function to estimate decompressed size.

Introduces a new utility function `ZSTD_findFrameCompressedSize_internal` which
is equivalent to `ZSTD_findFrameCompressSize`, but accepts an additional output
parameter `bound` that computes an upper-bound for the compressed data in the frame.

The new API function is named `ZSTD_decompressBound` to be consistent with
`zstd_compressBound` (the inverse operation). Clients will now be able to compute an upper-bound for
their compressed payloads instead of guessing a large size.

Implements https://github.com/facebook/zstd/issues/1536.
doc/zstd_manual.html
lib/decompress/zstd_decompress.c
lib/zstd.h
tests/fuzzer.c
tests/symbols.c