From: Yann Collet Date: Tue, 23 Feb 2016 20:28:59 +0000 (+0100) Subject: finer dictionary completion X-Git-Tag: v0.6.0^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3152a8c87a5261d03eb4b4a3c359523f331d0c46;p=thirdparty%2Fzstd.git finer dictionary completion --- diff --git a/lib/zdict.c b/lib/zdict.c index d3d5784dd..2b3d3ae8a 100644 --- a/lib/zdict.c +++ b/lib/zdict.c @@ -618,6 +618,14 @@ static void ZDICT_countEStats(EStats_ress_t esr, litlengthCount[*bytePtr]++; } +static size_t ZDICT_maxSampleSize(const size_t* fileSizes, unsigned nbFiles) +{ + unsigned u; + size_t max=0; + for (u=0; u>10)); - dictContentSize = (U32)ZDICT_fastSampling((char*)dictBuffer + g_provision_entropySize, - targetDictSize, samplesBuffer, sBuffSize); + dictContentSize = (U32)ZDICT_fastSampling(dictBuffer, targetDictSize, + samplesBuffer, sBuffSize); } /* dictionary header */