summaryrefslogtreecommitdiffstats
path: root/lib/lz4frame.c
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2020-07-14 01:09:02 (GMT)
committerGitHub <noreply@github.com>2020-07-14 01:09:02 (GMT)
commit8ef649f3a8f9d2cd8223c2cf8478206e303d0a3a (patch)
treebd46e978884e81e291895c0634554060394d26a5 /lib/lz4frame.c
parent3d5311edc6f62d5988fccda65cd17a7433d9590f (diff)
parent2a7203c05d58e3094df7c173226f5127e15970ad (diff)
downloadlz4-8ef649f3a8f9d2cd8223c2cf8478206e303d0a3a.zip
lz4-8ef649f3a8f9d2cd8223c2cf8478206e303d0a3a.tar.gz
lz4-8ef649f3a8f9d2cd8223c2cf8478206e303d0a3a.tar.bz2
Merge pull request #866 from sandyharvie/dev
Fix issue #865
Diffstat (limited to 'lib/lz4frame.c')
-rw-r--r--lib/lz4frame.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index c9f630d..5d716ea 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -725,6 +725,9 @@ size_t LZ4F_compressBegin(LZ4F_cctx* cctxPtr,
*/
size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr)
{
+ if (preferencesPtr && preferencesPtr->autoFlush) {
+ return LZ4F_compressBound_internal(srcSize, preferencesPtr, 0);
+ }
return LZ4F_compressBound_internal(srcSize, preferencesPtr, (size_t)-1);
}