Home | History | Annotate | Download | only in tests

Lines Matching defs:inBuff

280     ZSTD_inBuffer  inBuff, inBuff2;
310 inBuff.src = CNBuffer;
311 inBuff.size = CNBufferSize;
312 inBuff.pos = 0;
313 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
314 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
333 inBuff.src = CNBuffer;
334 inBuff.size = CNBufferSize;
335 inBuff.pos = 0;
336 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
337 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
387 inBuff.src = compressedBuffer;
388 inBuff.size = cSize;
389 inBuff.pos = 0;
393 { size_t const r = ZSTD_decompressStream(zd, &outBuff, &inBuff);
401 inBuff2 = inBuff;
405 { size_t const remaining = ZSTD_decompressStream(zd, &outBuff, &inBuff);
408 if (inBuff.pos != inBuff.size) goto _output_error; /* should have read the entire frame */
417 if (inBuff.pos != inBuff.size) goto _output_error; /* should have read the entire frame */
462 inBuff.src = compressedBuffer;
464 inBuff.pos = 0;
469 inBuff.size = inBuff.pos + inSize;
471 r = ZSTD_decompressStream(zd, &outBuff, &inBuff);
481 inBuff.size = inBuff.pos + inSize;
483 r = ZSTD_decompressStream(zd, &outBuff, &inBuff);
490 if (inBuff.pos != cSize) DISPLAYLEVEL(4, "inBuff.pos != cSize : should have real all input ! \n");
491 if (inBuff.pos != cSize) goto _output_error; /* should have read the entire frame */
508 inBuff.src = compressedBuffer;
509 inBuff.size = cSize;
510 inBuff.pos = 0;
518 r = ZSTD_decompressStream(zd, &outBuff, &inBuff);
527 inBuff.src = NULL;
528 inBuff.size = 0;
529 inBuff.pos = 0;
533 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
534 CHECK(inBuff.pos != inBuff.size, "Entire input should be consumed");
542 inBuff.src = outBuff.dst;
543 inBuff.size = outBuff.pos;
544 inBuff.pos = 0;
549 { size_t const ret = ZSTD_decompressStream(zd, &outBuff, &inBuff);
557 inBuff.src = test;
558 inBuff.size = 2;
559 inBuff.pos = 0;
563 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
564 CHECK(inBuff.pos != inBuff.size, "Entire input should be consumed");
572 inBuff.src = outBuff.dst;
573 inBuff.size = outBuff.pos;
574 inBuff.pos = 0;
579 CHECK_Z(ZSTD_decompressStream(zd, &outBuff, &inBuff));
592 inBuff.src = CNBuffer;
593 inBuff.size = CNBufferSize;
594 inBuff.pos = 0;
595 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
596 CHECK(inBuff.pos != inBuff.size, "Entire input should be consumed");
615 inBuff.src = CNBuffer;
616 inBuff.size = CNBufferSize;
617 inBuff.pos = 0;
618 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
619 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
633 inBuff.src = CNBuffer;
634 inBuff.size = CNBufferSize;
635 inBuff.pos = 0;
636 { size_t const r = ZSTD_compressStream(zc, &outBuff, &inBuff);
648 inBuff.src = CNBuffer;
649 inBuff.size = CNBufferSize;
650 inBuff.pos = 0;
651 { size_t const r = ZSTD_compressStream(zc, &outBuff, &inBuff);
667 inBuff.src = CNBuffer;
668 inBuff.size = inSize;
669 inBuff.pos = 0;
674 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
675 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
685 inBuff.src = CNBuffer;
686 inBuff.size = inSize;
687 inBuff.pos = 0;
692 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
693 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
711 inBuff.src = compressedBuffer;
712 inBuff.size = cSize;
713 inBuff.pos = 0;
714 { size_t const r = ZSTD_decompressStream(dctx, &outBuff, &inBuff);
745 inBuff.src = compressedBuffer;
746 inBuff.size = cSize;
752 inBuff.pos = 0;
755 size_t const r = ZSTD_decompressStream(dctx, &outBuff, &inBuff);
763 inBuff.pos = 0;
766 size_t const r = ZSTD_decompressStream(dctx, &outBuff, &inBuff);
774 inBuff.pos = 0;
776 CHECK(!ZSTD_isError(ZSTD_decompressStream(dctx, &outBuff, &inBuff)), "decompression must fail");
799 inBuff.src = compressedBuffer;
800 inBuff.size = cSize;
801 inBuff.pos = 0;
802 { size_t const r = ZSTD_decompressStream(dctx, &outBuff, &inBuff);
813 inBuff.pos = 0;
814 inBuff.size = 0;
815 while (inBuff.pos < cSize) {
816 inBuff.size += MIN(cSize - inBuff.pos, 1 + (FUZ_rand(&coreSeed) & 15));
817 CHECK_Z(ZSTD_decompressStream(dctx, &outBuff, &inBuff));
828 inBuff.src = compressedBuffer;
829 inBuff.size = cSize;
830 inBuff.pos = 0;
833 { size_t const r = ZSTD_decompressStream(dctx, &outBuff, &inBuff);
841 inBuff.src = compressedBuffer;
842 inBuff.size = cSize - 1;
843 inBuff.pos = 0;
846 CHECK_Z(ZSTD_decompressStream(dctx, &outBuff, &inBuff));
847 ++inBuff.size;
849 { size_t const r = ZSTD_decompressStream(dctx, &outBuff, &inBuff);
858 inBuff.pos = 0;
859 inBuff.size = 0;
860 while (inBuff.pos < cSize) {
861 inBuff.size += MIN(cSize - inBuff.pos, 1 + (FUZ_rand(&coreSeed) & 15));
862 CHECK_Z(ZSTD_decompressStream(dctx, &outBuff, &inBuff));
1092 inBuff.src = CNBuffer;
1093 inBuff.size = CNBufferSize;
1094 inBuff.pos = 0;
1096 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
1097 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1127 inBuff.src = compressedBuffer;
1128 inBuff.size = cSize;
1129 inBuff.pos = 0;
1130 { size_t const r = ZSTD_decompressStream(zd, &outBuff, &inBuff);
1133 if (inBuff.pos != inBuff.size) goto _output_error; /* should have read the entire frame */
1145 inBuff.src = compressedBuffer;
1146 inBuff.size = cSize;
1147 inBuff.pos = 0;
1148 { size_t const r = ZSTD_decompressStream(zd, &outBuff, &inBuff);
1171 inBuff.src = CNBuffer;
1172 inBuff.size = size;
1173 inBuff.pos = 0;
1175 CHECK_Z(ZSTD_compressStream2(cctx, &outBuff, &inBuff, ZSTD_e_end));
1177 if (inBuff.pos != inBuff.size) goto _output_error;
1353 inBuff.src = CNBuffer;
1354 inBuff.size = CNBufferSize;
1355 inBuff.pos = 0;
1356 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
1357 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1382 inBuff.src = CNBuffer;
1383 inBuff.size = CNBufferSize;
1384 inBuff.pos = 0;
1385 CHECK_Z( ZSTD_compressStream2(zc, &outBuff, &inBuff, ZSTD_e_end) );
1386 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1395 inBuff.src = compressedBuffer;
1396 inBuff.size = cSize;
1397 inBuff.pos = 0;
1398 CHECK_Z( ZSTD_decompressStream(zd, &outBuff, &inBuff) );
1399 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1413 inBuff.src = CNBuffer;
1414 inBuff.size = CNBufferSize;
1415 inBuff.pos = 0;
1416 CHECK_Z( ZSTD_compressStream2(zc, &outBuff, &inBuff, ZSTD_e_end) );
1417 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1434 inBuff.src = CNBuffer;
1435 inBuff.size = 0;
1436 inBuff.pos = 0;
1437 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
1448 inBuff.src = CNBuffer;
1449 inBuff.size = 0;
1450 inBuff.pos = 0;
1454 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
1464 inBuff.src = CNBuffer;
1465 inBuff.size = 0;
1466 inBuff.pos = 0;
1467 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
1484 inBuff.src = CNBuffer;
1485 inBuff.size = CNBufferSize;
1486 inBuff.pos = 0;
1487 { size_t const compressResult = ZSTD_compressStream2(mtctx, &outBuff, &inBuff, ZSTD_e_end);
1490 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1515 inBuff.src = CNBuffer;
1516 inBuff.size = srcSize; assert(srcSize < COMPRESSIBLE_NOISE_LENGTH);
1517 inBuff.pos = 0;
1523 CHECK_Z( ZSTD_compressStream2(zc, &outBuff, &inBuff, ZSTD_e_end) );
1527 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1539 inBuff.src = compressedBuffer;
1540 inBuff.pos = 0;
1542 inBuff.size = 1; /* avoid shortcut to single-pass mode */
1543 CHECK_Z( ZSTD_decompressStream(dstream, &outBuff, &inBuff) );
1544 inBuff.size = cSize;
1545 CHECK_Z( ZSTD_decompressStream(dstream, &outBuff, &inBuff) );
1546 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */
1727 inBuff.src = testCase;
1728 inBuff.size = 47;
1729 inBuff.pos = 0;
1734 while (inBuff.pos < inBuff.size) {
1735 CHECK_Z( ZSTD_decompressStream(zds, &outBuff, &inBuff) );
1776 inBuff.src = compressed;
1777 inBuff.size = compressedSize;
1778 inBuff.pos = 0;
1783 CHECK(ZSTD_decompressStream(zds, &outBuff, &inBuff) != 0,
1785 CHECK(inBuff.pos != inBuff.size, "Decompress did not fully consume input");
2721 ZSTD_inBuffer inBuff = { srcBuffer+srcStart, srcSize, 0 };
2724 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) );
2726 XXH64_update(&xxhState, srcBuffer+srcStart, inBuff.pos);
2727 memcpy(copyBuffer+totalTestSize, srcBuffer+srcStart, inBuff.pos);
2728 totalTestSize += inBuff.pos;
2759 ZSTD_inBuffer inBuff = { cBuffer, cSize, 0 };
2765 inBuff.size = inBuff.pos + readCSrcSize;
2767 decompressionResult = ZSTD_decompressStream(zd, &outBuff, &inBuff);
2778 CHECK (inBuff.pos != cSize, "compressed data should be fully read")
2798 { ZSTD_inBuffer inBuff = { cBuffer, cSize, 0 };
2804 size_t const adjustedCSrcSize = MIN(cSize - inBuff.pos, randomCSrcSize);
2806 inBuff.size = inBuff.pos + adjustedCSrcSize;
2807 { size_t const decompressError = ZSTD_decompressStream(zd, &outBuff, &inBuff);
2810 if (outBuff.pos < outBuff.size && inBuff.pos == cSize) break;
3118 ZSTD_inBuffer inBuff = { srcBuffer, maxTestSize, 0 };
3119 CHECK_Z(ZSTD_compressStream2(zc, &outBuff, &inBuff, ZSTD_e_end));
3121 testNb, (unsigned)inBuff.pos, (unsigned)outBuff.pos);
3122 CHECK(inBuff.pos != inBuff.size, "Input not consumed!");
3133 ZSTD_inBuffer inBuff = { srcBuffer+srcStart, srcSize, 0 };
3136 size_t const ipos = inBuff.pos;
3144 CHECK_Z( ret = ZSTD_compressStream2(zc, &outBuff, &inBuff, flush) );
3146 testNb, (unsigned)inBuff.pos, (unsigned)(totalTestSize + inBuff.pos), (unsigned)flush, (unsigned)outBuff.pos);
3153 forwardProgress = (inBuff.pos != ipos) || (outBuff.pos != opos);
3155 assert(inBuff.pos == inBuff.size);
3157 XXH64_update(&xxhState, srcBuffer+srcStart, inBuff.pos);
3158 memcpy(copyBuffer+totalTestSize, srcBuffer+srcStart, inBuff.pos);
3159 totalTestSize += inBuff.pos;
3165 ZSTD_inBuffer inBuff = { NULL, 0, 0 };
3171 remainingToFlush = ZSTD_compressStream2(zc, &outBuff, &inBuff, ZSTD_e_end);
3211 ZSTD_inBuffer inBuff = { cBuffer, cSize, 0 };
3217 inBuff.size = inBuff.pos + readCSrcSize;
3220 (unsigned)readCSrcSize, (unsigned)inBuff.pos, (unsigned)cSize);
3221 decompressionResult = ZSTD_decompressStream(zd, &outBuff, &inBuff);
3223 (unsigned)inBuff.pos, (unsigned)outBuff.pos);
3229 CHECK (inBuff.pos > cSize, "ZSTD_decompressStream consumes too much input : %u > %u ", (unsigned)inBuff.pos, (unsigned)cSize);
3231 CHECK (inBuff.pos != cSize, "compressed data should be fully read (%u != %u)", (unsigned)inBuff.pos, (unsigned)cSize);
3259 { ZSTD_inBuffer inBuff = { cBuffer, cSize, 0 };
3265 size_t const adjustedCSrcSize = MIN(cSize - inBuff.pos, randomCSrcSize);
3267 inBuff.size = inBuff.pos + adjustedCSrcSize;
3268 { size_t const decompressError = ZSTD_decompressStream(zd, &outBuff, &inBuff);
3271 if (outBuff.pos < outBuff.size && inBuff.pos == cSize) break;