From: Yann Collet Date: Wed, 28 Mar 2018 17:33:41 +0000 (-0600) Subject: restored ability to manually set overlapLog X-Git-Tag: v1.3.5~3^2~90^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=525f3fab3360f29e4c64b3dfa4ae9699f68eb18d;p=thirdparty%2Fzstd.git restored ability to manually set overlapLog --- diff --git a/programs/fileio.c b/programs/fileio.c index 14569bb47..5e3928ef3 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -466,6 +466,13 @@ static cRess_t FIO_createCResources(const char* dictFileName, int cLevel, #ifdef ZSTD_MULTITHREAD DISPLAYLEVEL(5,"set nb workers = %u \n", g_nbWorkers); CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_p_nbWorkers, g_nbWorkers) ); + if ( (g_overlapLog == FIO_OVERLAP_LOG_NOTSET) + && (cLevel == ZSTD_maxCLevel()) ) + g_overlapLog = 9; /* full overlap */ + if (g_overlapLog != FIO_OVERLAP_LOG_NOTSET) { + DISPLAYLEVEL(3,"set overlapLog = %u \n", g_overlapLog); + CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_p_overlapSizeLog, g_overlapLog) ); + } #endif /* dictionary */ CHECK( ZSTD_CCtx_setPledgedSrcSize(ress.cctx, srcSize) ); /* set the value temporarily for dictionary loading, to adapt compression parameters */