zstdmt: removed job->jobCompleted
replaced by equivalent signal job->consumer == job->srcSize. created additional functions ZSTD_writeLastEmptyBlock() and ZSTDMT_writeLastEmptyBlock() required when it's necessary to finish a frame with a last empty job, to create an "end of frame" marker. It avoids creating a job with srcSize==0.
This commit is contained in:
@@ -481,4 +481,13 @@ size_t ZSTD_compress_advanced_internal(ZSTD_CCtx* cctx,
|
||||
const void* dict,size_t dictSize,
|
||||
ZSTD_CCtx_params params);
|
||||
|
||||
|
||||
/* ZSTD_writeLastEmptyBlock() :
|
||||
* output an empty Block with end-of-frame mark to complete a frame
|
||||
* @return : size of data written into `dst` (== ZSTD_blockHeaderSize (defined in zstd_internal.h))
|
||||
* or an error code if `dstCapcity` is too small (<ZSTD_blockHeaderSize)
|
||||
*/
|
||||
size_t ZSTD_writeLastEmptyBlock(void* dst, size_t dstCapacity);
|
||||
|
||||
|
||||
#endif /* ZSTD_COMPRESS_H */
|
||||
|
||||
Reference in New Issue
Block a user