}
DISPLAYLEVEL(3, "OK \n");
- DISPLAYLEVEL(3, "test%3d: superblock uncompressable data, too many nocompress superblocks : ", testNb++)
+ DISPLAYLEVEL(3, "test%3d: superblock uncompressible data, too many nocompress superblocks : ", testNb++)
{
- ZSTD_CCtx* cctx = ZSTD_createCCtx();
- BYTE* src = (BYTE*)CNBuffer; BYTE* dst = (BYTE*)compressedBuffer;
+ ZSTD_CCtx* const cctx = ZSTD_createCCtx();
+ const BYTE* src = (BYTE*)CNBuffer; BYTE* dst = (BYTE*)compressedBuffer;
size_t srcSize = 321656; size_t dstCapacity = ZSTD_compressBound(srcSize);
/* This is the number of bytes to stream before ending. This value
const size_t streamCompressThreshold = 161792;
const size_t streamCompressDelta = 1024;
- /* The first 1/3 of the buffer is compressable and the last 2/3 is
- * uncompressable. This is an approximation of the type of data
+ /* The first 1/3 of the buffer is compressible and the last 2/3 is
+ * uncompressible. This is an approximation of the type of data
* the fuzzer generated to catch this bug. Streams like this were making
* zstd generate noCompress superblocks (which are larger than the src
* they come from). Do this enough times, and we'll run out of room
* and throw a dstSize_tooSmall error. */
- const size_t compressablePartSize = srcSize/3;
- const size_t uncompressablePartSize = srcSize-compressablePartSize;
- RDG_genBuffer(CNBuffer, compressablePartSize, 0.5, 0.5, seed);
- RDG_genBuffer((BYTE*)CNBuffer+compressablePartSize, uncompressablePartSize, 0, 0, seed);
+ const size_t compressiblePartSize = srcSize/3;
+ const size_t uncompressiblePartSize = srcSize-compressiblePartSize;
+ RDG_genBuffer(CNBuffer, compressiblePartSize, 0.5, 0.5, seed);
+ RDG_genBuffer((BYTE*)CNBuffer+compressiblePartSize, uncompressiblePartSize, 0, 0, seed);
/* Setting target block size so that superblock is used */
+ assert(cctx != NULL);
ZSTD_CCtx_setParameter(cctx, ZSTD_c_targetCBlockSize, 81);
{ size_t read;