From: Paul Cruz Date: Mon, 19 Jun 2017 18:40:45 +0000 (-0700) Subject: fixed decompression so that it uses compressed version X-Git-Tag: v1.3.0~1^2~15^2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da4ddc1f76f7c89cf0715de7d4543bab72b261dc;p=thirdparty%2Fzstd.git fixed decompression so that it uses compressed version --- diff --git a/tests/decodecorpus.c b/tests/decodecorpus.c index 00eaa9dab..8c94154df 100644 --- a/tests/decodecorpus.c +++ b/tests/decodecorpus.c @@ -1353,7 +1353,7 @@ static int generateCorpusWithDict(U32 seed, unsigned numFiles, const char* const BYTE* curr = samples; while (i <= 4) { *(sampleSizes + i - 1) = currSize; - for (int j = 0; j < currSize; j++) { + for (size_t j = 0; j < currSize; j++) { *(curr++) = (BYTE)i; } i++; @@ -1416,9 +1416,9 @@ static int generateCorpusWithDict(U32 seed, unsigned numFiles, const char* const } /* if asked, supply the decompressed version */ - + DISPLAY("Attempting to decompress using the dictionary\n"); returnValue = ZSTD_decompress_usingDict(dctx, decompressedPtr, MAX_DECOMPRESSED_SIZE, - fr.srcStart, (BYTE*)fr.src - (BYTE*)fr.srcStart, + fr.dataStart, (BYTE*)fr.data - (BYTE*)fr.dataStart, fullDict, dictSize); if (ZSTD_isError(returnValue)) {