chore: Fix dictionaryRandomAccess's issue for small file
When size of the given file is less than 1024 (DICTIONARY_BYTES), dict[] may contain garbage. Therefore, test_decompress() fails with garbage dictionary. This change set fixes the failure of test for dictionaryRandomAccess with TESTFILE_SMALL.
This commit is contained in:
@@ -251,7 +251,7 @@ int main(int argc, char* argv[])
|
||||
FILE* outFp = fopen(decFilename, "wb");
|
||||
|
||||
printf("decompress : %s -> %s\n", lz4Filename, decFilename);
|
||||
test_decompress(outFp, inpFp, dict, DICTIONARY_BYTES, offset, length);
|
||||
test_decompress(outFp, inpFp, dict, dictSize, offset, length);
|
||||
printf("decompress : done\n");
|
||||
|
||||
fclose(outFp);
|
||||
|
Reference in New Issue
Block a user