From 3152a8c87a5261d03eb4b4a3c359523f331d0c46 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 23 Feb 2016 21:28:59 +0100 Subject: [PATCH] finer dictionary completion --- lib/zdict.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 */