fixed decompression so that it uses compressed version

This commit is contained in:
Paul Cruz 2017-06-19 11:40:45 -07:00
parent 33467add60
commit da4ddc1f76

View File

@ -1353,7 +1353,7 @@ static int generateCorpusWithDict(U32 seed, unsigned numFiles, const char* const
BYTE* curr = samples; BYTE* curr = samples;
while (i <= 4) { while (i <= 4) {
*(sampleSizes + i - 1) = currSize; *(sampleSizes + i - 1) = currSize;
for (int j = 0; j < currSize; j++) { for (size_t j = 0; j < currSize; j++) {
*(curr++) = (BYTE)i; *(curr++) = (BYTE)i;
} }
i++; i++;
@ -1416,9 +1416,9 @@ static int generateCorpusWithDict(U32 seed, unsigned numFiles, const char* const
} }
/* if asked, supply the decompressed version */ /* if asked, supply the decompressed version */
DISPLAY("Attempting to decompress using the dictionary\n");
returnValue = ZSTD_decompress_usingDict(dctx, decompressedPtr, MAX_DECOMPRESSED_SIZE, 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); fullDict, dictSize);
if (ZSTD_isError(returnValue)) { if (ZSTD_isError(returnValue)) {