diff --git a/NEWS b/NEWS index beb6ae3db..e54b09967 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,12 @@ v0.7.0 New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski New : Support for Sparse File-systems (do not use space for zero-filled sectors) +New : Frame checksum support New : Support pass-through mode (when using `-df`) New : API : dictionary files from custom content, by Giuseppe Ottaviano New : API support for custom malloc/free functions New : controllable Dictionary ID +New : Support for skippable frames v0.6.1 New : zlib wrapper API, thanks to Przemyslaw Skibinski diff --git a/programs/fileio.c b/programs/fileio.c index 48555424c..4211e4a0f 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -317,7 +317,10 @@ static int FIO_compressFilename_internal(cRess_t ress, params.fParams.contentSizeFlag = 1; params.fParams.checksumFlag = g_checksumFlag; params.fParams.noDictIDFlag = !g_dictIDFlag; - if (g_maxWLog) if (params.cParams.windowLog > g_maxWLog) params.cParams.windowLog = g_maxWLog; + if ((g_maxWLog) && (params.cParams.windowLog > g_maxWLog)) { + params.cParams.windowLog = g_maxWLog; + params.cParams = ZSTD_adjustCParams(params.cParams, fileSize, ress.dictBufferSize); + } { size_t const errorCode = ZBUFF_compressInit_advanced(ress.ctx, ress.dictBuffer, ress.dictBufferSize, params, fileSize); if (ZBUFF_isError(errorCode)) EXM_THROW(21, "Error initializing compression : %s", ZBUFF_getErrorName(errorCode)); } }