make compression of zstd archive type more similar to Zstandard CLI (store dictID and checksum by default in zstd type, no effect for 7z type)

This commit is contained in:
sebres
2023-09-14 18:18:09 +02:00
parent 5697b3dece
commit 8a5e1c82db
3 changed files with 22 additions and 0 deletions

View File

@@ -286,6 +286,9 @@ static HRESULT UpdateArchive(
CMyComPtr<ICompressProgressInfo> localProgress = localProgressSpec;
localProgressSpec->Init(updateCallback, true);
NCompress::NZSTD::CEncoder *encoderSpec = new NCompress::NZSTD::CEncoder;
// by zstd archive type store dictID and checksum (similar to zstd client)
encoderSpec->dictIDFlag = 1;
encoderSpec->checksumFlag = 1;
encoderSpec->unpackSize = unpackSize;
CMyComPtr<ICompressCoder> encoder = encoderSpec;
RINOK(props.SetCoderProps(encoderSpec, NULL));