Enable Zstandard's checksum feature in the zstd write filter

Note that this is not enabled when writing .zip or .7z archive formats,
because they already use their own checksums.

Implements #2675.
This commit is contained in:
Mostyn Bramley-Moore 2025-06-20 14:39:28 +02:00
parent e4978e2edd
commit 0de62cbda8

View File

@ -391,6 +391,8 @@ archive_compressor_zstd_open(struct archive_write_filter *f)
ZSTD_CCtx_setParameter(data->cstream, ZSTD_c_nbWorkers, data->threads);
ZSTD_CCtx_setParameter(data->cstream, ZSTD_c_checksumFlag, 1);
#if ZSTD_VERSION_NUMBER >= MINVER_LONG
ZSTD_CCtx_setParameter(data->cstream, ZSTD_c_windowLog, data->long_distance);
#endif