]> git.ipfire.org Git - thirdparty/zstd.git/commit
zstdmt : fix end condition (ZSTD_e_end)
authorYann Collet <cyan@fb.com>
Tue, 23 Jan 2018 23:19:11 +0000 (15:19 -0800)
committerYann Collet <cyan@fb.com>
Tue, 23 Jan 2018 23:19:11 +0000 (15:19 -0800)
commitc1cc57f270e07caf0a8356be921511fedf3a6c8f
tree5aa0a8f2548b2aa1ce3485fe02c7822d1ae9b616
parentde5e38a7a60ef80f4e71838df87cea15c5e15047
zstdmt : fix end condition (ZSTD_e_end)

When ZSTD_e_end directive is provided,
the question is not only "are internal buffers completely flushed",
it is also "is current frame completed".

In some rare cases,
it was possible for internal buffers to be completely flushed,
triggering a @return == 0,
but frame was not completed as it needed a last null-size block to mark the end,
resulting in an unfinished frame.
lib/compress/zstdmt_compress.c
lib/zstd.h
tests/zstreamtest.c