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 */ diff --git a/programs/.gitignore b/programs/.gitignore index 021e89371..2fc85021a 100644 --- a/programs/.gitignore +++ b/programs/.gitignore @@ -29,3 +29,6 @@ datagen # Visual solution files *.suo *.user + +# Default dictionary name +dictionary diff --git a/programs/dibio.c b/programs/dibio.c index 646fe2c60..17f89586b 100644 --- a/programs/dibio.c +++ b/programs/dibio.c @@ -259,7 +259,7 @@ int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize, srcBuffer, fileSizes, nbFiles, params); if (ZDICT_isError(dictSize)) { - DISPLAYLEVEL(1, "dictionary training failed : %s", ZDICT_getErrorName(dictSize)); /* should not happen */ + DISPLAYLEVEL(1, "dictionary training failed : %s \n", ZDICT_getErrorName(dictSize)); /* should not happen */ result = 1; goto _cleanup; }