Home | History | Annotate | Download | only in tests

Lines Matching defs:DISPLAYLEVEL

63 #define DISPLAYLEVEL(l, ...)  if (g_displayLevel>=l) { DISPLAY(__VA_ARGS__); }
122 #define CHECK(fn) { if(!(fn)) { DISPLAYLEVEL(1, "Error : test (%s) failed \n", #fn); exit(1); } }
132 #define CHECK_VAR(var, fn) var = fn; if (ZSTD_isError(var)) { DISPLAYLEVEL(1, "%s : fails : %s \n", #fn, ZSTD_getErrorName(var)); exit(1); }
168 DISPLAYLEVEL(4, "allocating %u KB => effectively %u KB \n",
181 DISPLAYLEVEL(4, "freeing %u KB \n", (unsigned)(malloc_size(address) >> 10));
189 DISPLAYLEVEL(3, "peak:%6u KB, nbMallocs:%2u, total:%6u KB \n",
217 DISPLAYLEVEL(3, "compressCCtx level %i : ", compressionLevel);
234 DISPLAYLEVEL(3, "compressStream level %i : ", compressionLevel);
251 DISPLAYLEVEL(3, "compress_generic,-T%i,end level %i : ",
272 DISPLAYLEVEL(3, "compress_generic,-T%i,continue level %i : ",
379 DISPLAYLEVEL(3, "thread pool test : threadPool reuse roundtrips: ");
390 DISPLAYLEVEL(3, "refThreadPool error!\n");
396 DISPLAYLEVEL(3, "Compression error!\n");
402 DISPLAYLEVEL(3, "Decompression error!\n");
411 DISPLAYLEVEL(3, "OK \n");
413 DISPLAYLEVEL(3, "thread pool test : threadPool simultaneous usage: ");
448 DISPLAYLEVEL(3, "OK \n");
469 DISPLAYLEVEL(3, "test%3u : compressBound : ", tnb);
486 DISPLAYLEVEL(3, "OK \n");
491 DISPLAYLEVEL(3, "test%3u : decompressBound : ", tnb);
539 DISPLAYLEVEL(3, "OK \n");
548 DISPLAYLEVEL(3, "test%3u : ZSTD_CCtx_setCParams : ", tnb);
559 DISPLAYLEVEL(3, "OK \n");
582 DISPLAYLEVEL(3, "test%3u : ZSTD_getErrorName : ", testNb++);
584 DISPLAYLEVEL(3, "OK : %s \n", errorString);
587 DISPLAYLEVEL(3, "test%3u : ZSTD_getErrorName with wrong value : ", testNb++);
589 DISPLAYLEVEL(3, "OK : %s \n", errorString);
592 DISPLAYLEVEL(3, "test%3u : min compression level : ", testNb++);
594 DISPLAYLEVEL(3, "%i (OK) \n", mcl);
597 DISPLAYLEVEL(3, "test%3u : default compression level : ", testNb++);
600 DISPLAYLEVEL(3, "%i (OK) \n", defaultCLevel);
603 DISPLAYLEVEL(3, "test%3u : ZSTD_versionNumber : ", testNb++);
605 DISPLAYLEVEL(3, "%u (OK) \n", vn);
614 DISPLAYLEVEL(3, "test%3u : ZSTD_adjustCParams : ", testNb++);
625 DISPLAYLEVEL(3, "OK \n");
627 DISPLAYLEVEL(3, "test%3u : compress %u bytes : ", testNb++, (unsigned)CNBuffSize);
633 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
635 DISPLAYLEVEL(3, "test%3i : size of cctx for level 1 : ", testNb++);
637 DISPLAYLEVEL(3, "%u bytes \n", (unsigned)cctxSize);
642 DISPLAYLEVEL(3, "test%3i : decompress skippable frame -8 size : ", testNb++);
648 DISPLAYLEVEL(3, "OK \n");
650 DISPLAYLEVEL(3, "test%3i : ZSTD_getFrameContentSize test : ", testNb++);
654 DISPLAYLEVEL(3, "OK \n");
656 DISPLAYLEVEL(3, "test%3i : ZSTD_getDecompressedSize test : ", testNb++);
660 DISPLAYLEVEL(3, "OK \n");
662 DISPLAYLEVEL(3, "test%3i : ZSTD_findDecompressedSize test : ", testNb++);
666 DISPLAYLEVEL(3, "OK \n");
668 DISPLAYLEVEL(3, "test%3i : tight ZSTD_decompressBound test : ", testNb++);
673 DISPLAYLEVEL(3, "OK \n");
675 DISPLAYLEVEL(3, "test%3i : ZSTD_decompressBound test with invalid srcSize : ", testNb++);
680 DISPLAYLEVEL(3, "OK \n");
682 DISPLAYLEVEL(3, "test%3i : decompress %u bytes : ", testNb++, (unsigned)CNBuffSize);
685 DISPLAYLEVEL(3, "OK \n");
687 DISPLAYLEVEL(3, "test%3i : decompress %u bytes with Huffman assembly disabled : ", testNb++, (unsigned)CNBuffSize);
696 DISPLAYLEVEL(3, "OK \n");
698 DISPLAYLEVEL(3, "test%3i : check decompressed result : ", testNb++);
703 DISPLAYLEVEL(3, "OK \n");
705 DISPLAYLEVEL(3, "test%3u : invalid endDirective : ", testNb++);
714 DISPLAYLEVEL(3, "OK \n");
716 DISPLAYLEVEL(3, "test%3i : ZSTD_checkCParams : ", testNb++);
721 DISPLAYLEVEL(3, "OK \n");
723 DISPLAYLEVEL(3, "test%3i : ZSTD_createDCtx_advanced and ZSTD_sizeof_DCtx: ", testNb++);
730 DISPLAYLEVEL(3, "OK \n");
732 DISPLAYLEVEL(3, "test%3i : misc unaccounted for zstd symbols : ", testNb++);
766 DISPLAYLEVEL(3, "%p ", voidptr_getDictID);
767 DISPLAYLEVEL(3, "%p ", voidptr_createDStream);
768 DISPLAYLEVEL(3, "%p ", voidptr_copyDCtx);
769 DISPLAYLEVEL(3, "%p ", voidptr_nextInputType);
771 DISPLAYLEVEL(3, ": OK \n");
773 DISPLAYLEVEL(3, "test%3i : decompress with null dict : ", testNb++);
783 DISPLAYLEVEL(3, "OK \n");
785 DISPLAYLEVEL(3, "test%3i : decompress with null DDict : ", testNb++);
795 DISPLAYLEVEL(3, "OK \n");
797 DISPLAYLEVEL(3, "test%3i : decompress with 1 missing byte : ", testNb++);
801 DISPLAYLEVEL(3, "OK \n");
803 DISPLAYLEVEL(3, "test%3i : decompress with 1 too much byte : ", testNb++);
807 DISPLAYLEVEL(3, "OK \n");
809 DISPLAYLEVEL(3, "test%3i : decompress too large input : ", testNb++);
813 DISPLAYLEVEL(3, "OK \n");
815 DISPLAYLEVEL(3, "test%3i : decompress into NULL buffer : ", testNb++);
819 DISPLAYLEVEL(3, "OK \n");
821 DISPLAYLEVEL(3, "test%3i : decompress with corrupted checksum : ", testNb++);
857 DISPLAYLEVEL(3, "OK \n");
860 DISPLAYLEVEL(3, "test%3i : ZSTD_decompressBound test with content size missing : ", testNb++);
878 DISPLAYLEVEL(3, "OK \n");
880 DISPLAYLEVEL(3, "test%3d: check DCtx size is reduced after many oversized calls : ", testNb++);
919 DISPLAYLEVEL(3, "OK \n");
927 DISPLAYLEVEL(3, "test%3i : ZSTD_compressCCtx() doesn't use advanced parameters", testNb++);
930 DISPLAYLEVEL(3, "OK \n");
932 DISPLAYLEVEL(3, "test%3i : ZSTD_compress_usingDict() doesn't use advanced parameters: ", testNb++);
935 DISPLAYLEVEL(3, "OK \n");
937 DISPLAYLEVEL(3, "test%3i : ZSTD_compress_usingCDict() doesn't use advanced parameters: ", testNb++);
940 DISPLAYLEVEL(3, "OK \n");
942 DISPLAYLEVEL(3, "test%3i : ZSTD_compress_advanced() doesn't use advanced parameters: ", testNb++);
945 DISPLAYLEVEL(3, "OK \n");
947 DISPLAYLEVEL(3, "test%3i : ZSTD_compress_usingCDict_advanced() doesn't use advanced parameters: ", testNb++);
950 DISPLAYLEVEL(3, "OK \n");
956 DISPLAYLEVEL(3, "test%3i : maxBlockSize = 2K", testNb++);
975 DISPLAYLEVEL(3, "test%3i : ldm fill dict out-of-bounds check", testNb++);
996 DISPLAYLEVEL(3, "OK \n");
998 DISPLAYLEVEL(3, "test%3i : testing dict compression with enableLdm and forceMaxWindow : ", testNb++);
1023 DISPLAYLEVEL(3, "OK \n");
1025 DISPLAYLEVEL(3, "test%3i : testing dict compression for determinism : ", testNb++);
1067 DISPLAYLEVEL(3, "OK \n");
1069 DISPLAYLEVEL(3, "test%3i : LDM + opt parser with small uncompressible block ", testNb++);
1109 DISPLAYLEVEL(3, "OK \n");
1111 DISPLAYLEVEL(3, "test%3i : testing ldm dictionary gets invalidated : ", testNb++);
1186 DISPLAYLEVEL(3, "OK \n");
1189 DISPLAYLEVEL(3, "test%3i : testing refPrefx vs refPrefx + ldm (size comparison) : ", testNb++);
1254 DISPLAYLEVEL(3, "OK \n");
1256 DISPLAYLEVEL(3, "test%3i : in-place decompression : ", testNb++);
1279 DISPLAYLEVEL(3, "OK \n");
1281 DISPLAYLEVEL(3, "test%3i : in-place decompression with 2 frames : ", testNb++);
1308 DISPLAYLEVEL(3, "OK \n");
1310 DISPLAYLEVEL(3, "test%3i : Check block splitter with 64K literal length : ", testNb++);
1375 DISPLAYLEVEL(3, "OK \n");
1377 DISPLAYLEVEL(3, "test%3d : superblock uncompressible data: too many nocompress superblocks : ", testNb++);
1424 DISPLAYLEVEL(3, "OK \n");
1426 DISPLAYLEVEL(3, "test%3d: superblock with no literals : ", testNb++);
1444 DISPLAYLEVEL(1, "Superblock too big: %u > %u + %u \n", (U32)superCSize, (U32)normalCSize, (U32)allowedExpansion);
1449 DISPLAYLEVEL(3, "OK \n");
1452 DISPLAYLEVEL(3, "test%3d: superblock enough room for checksum : ", testNb++)
1462 DISPLAYLEVEL(3, "OK \n");
1464 DISPLAYLEVEL(3, "test%3i : compress a NULL input with each level : ", testNb++);
1475 DISPLAYLEVEL(3, "OK \n");
1477 DISPLAYLEVEL(3, "test%3d : check CCtx size after compressing empty input : ", testNb++);
1485 DISPLAYLEVEL(3, "OK \n");
1487 DISPLAYLEVEL(3, "test%3d : decompress empty frame into NULL : ", testNb++);
1528 DISPLAYLEVEL(3, "OK \n");
1530 DISPLAYLEVEL(3, "test%3d : reuse CCtx with expanding block size : ", testNb++);
1545 DISPLAYLEVEL(3, "OK \n");
1547 DISPLAYLEVEL(3, "test%3d : re-using a CCtx should compress the same : ", testNb++);
1556 DISPLAYLEVEL(5, "l%i ", i);
1589 DISPLAYLEVEL(3, "OK \n");
1591 DISPLAYLEVEL(3, "test%3d : btultra2 & 1st block : ", testNb++);
1629 DISPLAYLEVEL(3, "OK \n");
1631 DISPLAYLEVEL(3, "test%3d : ZSTD_CCtx_getParameter() : ", testNb++);
1672 DISPLAYLEVEL(3, "OK \n");
1674 DISPLAYLEVEL(3, "test%3d : ZSTD_CCtx_setCParams() : ", testNb++);
1718 DISPLAYLEVEL(3, "test%3d : ZSTD_CCtx_setFParams() : ", testNb++);
1742 DISPLAYLEVEL(3, "test%3d : ZSTD_CCtx_setCarams() : ", testNb++);
1801 DISPLAYLEVEL(3, "test%3d : ldm conditionally enabled by default doesn't change cctx params: ", testNb++);
1819 DISPLAYLEVEL(3, "OK \n");
1822 DISPLAYLEVEL(3, "test%3d : overflow protection with large windowLog : ", testNb++);
1831 DISPLAYLEVEL(6, "run %zu / %zu \n", cnb, nbCompressions);
1837 DISPLAYLEVEL(3, "OK \n");
1839 DISPLAYLEVEL(3, "test%3d : size down context : ", testNb++);
1849 DISPLAYLEVEL(5, "(large) %zuKB > 32*%zuKB (small) : ",
1864 DISPLAYLEVEL(5, "size down after %u attempts : ", u);
1870 DISPLAYLEVEL(3, "OK \n");
1874 DISPLAYLEVEL(3, "test%3i : create static CCtx for level %u : ", testNb++, STATIC_CCTX_LEVEL);
1879 DISPLAYLEVEL(4, "CStream size = %u, ", (U32)staticCStreamSize);
1893 DISPLAYLEVEL
1894 DISPLAYLEVEL(4, "CCtx for 32 KB = %u, ", (U32)smallCCtxSize);
1896 DISPLAYLEVEL(3, "OK \n");
1898 DISPLAYLEVEL(3, "test%3i : compress small input with small static CCtx : ", testNb++);
1902 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n",
1905 DISPLAYLEVEL(3, "test%3i : compress large input with small static CCtx (must fail) : ", testNb++);
1911 DISPLAYLEVEL(3, "OK \n");
1913 DISPLAYLEVEL(3, "test%3i : resize context to full CCtx size : ", testNb++);
1915 DISPLAYLEVEL(4, "staticCCtxBuffer = %p, staticCCtx = %p , ", staticCCtxBuffer, (void*)staticCCtx);
1917 DISPLAYLEVEL(3, "OK \n");
1919 DISPLAYLEVEL(3, "test%3i : compress large input with static CCtx : ", testNb++);
1923 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n",
1926 DISPLAYLEVEL(3, "test%3i : compress small input often enough to trigger context reduce : ", testNb++);
1936 DISPLAYLEVEL(3, "OK \n")
1938 DISPLAYLEVEL(3, "test%3i : init CCtx for level %u : ", testNb++, STATIC_CCTX_LEVEL);
1940 DISPLAYLEVEL(3, "OK \n");
1942 DISPLAYLEVEL(3, "test%3i : compression again with static CCtx : ", testNb++);
1946 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n",
1949 DISPLAYLEVEL(3, "test%3i : simple decompression test with static DCtx : ", testNb++);
1954 DISPLAYLEVEL(3, "OK \n");
1956 DISPLAYLEVEL(3, "test%3i : check decompressed result : ", testNb++);
1958 DISPLAYLEVEL(3, "OK \n");
1960 DISPLAYLEVEL(3, "test%3i : init CCtx for too large level (must fail) : ", testNb++);
1963 DISPLAYLEVEL(3, "OK \n");
1965 DISPLAYLEVEL(3, "test%3i : init CCtx for small level %u (should work again) : ", testNb++, 1);
1967 DISPLAYLEVEL(3, "OK \n");
1969 DISPLAYLEVEL(3, "test%3i : use CStream on CCtx-sized static context (should fail) : ", testNb++);
1976 DISPLAYLEVEL(3, "OK \n");
1978 DISPLAYLEVEL(3, "test%3i : resize context to CStream size, then stream compress : ", testNb++);
1986 DISPLAYLEVEL(3, "OK \n");
1988 DISPLAYLEVEL(3, "test%3i : CStream for small level %u : ", testNb++, 1);
1994 DISPLAYLEVEL(3, "OK \n");
1996 DISPLAYLEVEL(3, "test%3i : init static CStream with dictionary (should fail) : ", testNb++);
1999 DISPLAYLEVEL(3, "OK \n");
2001 DISPLAYLEVEL(3, "test%3i : use DStream on DCtx-sized static context (should fail) : ", testNb++);
2008 DISPLAYLEVEL(3, "OK \n");
2010 DISPLAYLEVEL(3, "test%3i : test estimation functions with default cctx params : ", testNb++);
2050 DISPLAYLEVEL(3, "OK \n");
2052 DISPLAYLEVEL(3, "test%3i : test estimation functions with maxBlockSize = 0 : ", testNb++);
2096 DISPLAYLEVEL(3, "OK \n");
2102 DISPLAYLEVEL(3, "test%3i : Static context sizes for negative levels : ", testNb++);
2111 DISPLAYLEVEL(3, "OK \n");
2115 DISPLAYLEVEL(3, "test%3i : create ZSTDMT CCtx : ", testNb++);
2124 DISPLAYLEVEL(3, "OK \n");
2126 DISPLAYLEVEL(3, "test%3u : compress %u bytes with 2 threads : ", testNb++, (unsigned)CNBuffSize);
2130 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2132 DISPLAYLEVEL(3, "test%3i : decompressed size test : ", testNb++);
2138 DISPLAYLEVEL(3, "OK \n");
2140 DISPLAYLEVEL(3, "test%3i : decompress %u bytes : ", testNb++, (unsigned)CNBuffSize);
2143 DISPLAYLEVEL(3, "OK \n");
2145 DISPLAYLEVEL(3, "test%3i : check decompressed result : ", testNb++);
2150 DISPLAYLEVEL(3, "OK \n");
2152 DISPLAYLEVEL(3, "test%3i : compress -T2 with checksum : ", testNb++);
2159 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2161 DISPLAYLEVEL(3, "test%3i : decompress %u bytes : ", testNb++, (unsigned)CNBuffSize);
2164 DISPLAYLEVEL(3, "OK \n");
2169 DISPLAYLEVEL(3, "test%3u : compress empty string and decompress with small window log : ", testNb++);
2176 DISPLAYLEVEL(3, "OK (%u bytes)\n", (unsigned)cSize);
2191 DISPLAYLEVEL(3, "test%3i : compress with block splitting : ", testNb++)
2198 DISPLAYLEVEL(3, "OK \n");
2200 DISPLAYLEVEL(3, "test%3i : compress -T2 with/without literals compression : ", testNb++)
2213 DISPLAYLEVEL(3, "OK \n");
2215 DISPLAYLEVEL(3, "test%3i : Multithreaded ZSTD_compress2() with rsyncable : ", testNb++)
2226 DISPLAYLEVEL(3, "OK \n");
2228 DISPLAYLEVEL(3, "test%3i : setting multithreaded parameters : ", testNb++)
2252 DISPLAYLEVEL(3, "OK \n");
2255 DISPLAYLEVEL(3, "test%3i : compress multiple frames : ", testNb++);
2284 DISPLAYLEVEL(3, "OK \n");
2286 DISPLAYLEVEL(3, "test%3i : get decompressed size of multiple frames : ", testNb++);
2289 DISPLAYLEVEL(3, "OK \n");
2291 DISPLAYLEVEL(3, "test%3i : get tight decompressed bound of multiple frames : ", testNb++);
2294 DISPLAYLEVEL(3, "OK \n");
2296 DISPLAYLEVEL(3, "test%3i : decompress multiple frames : ", testNb++);
2299 DISPLAYLEVEL(3, "OK \n");
2301 DISPLAYLEVEL(3, "test%3i : check decompressed result : ", testNb++);
2303 DISPLAYLEVEL(3, "OK \n");
2306 DISPLAYLEVEL(3, "test%3i : read/write a skippable frame : ", testNb++);
2328 DISPLAYLEVEL(3, "OK \n");
2330 DISPLAYLEVEL(3, "test%3i : read/write an empty skippable frame : ", testNb++);
2344 DISPLAYLEVEL(3, "OK \n");
2353 DISPLAYLEVEL(3, "test%3i : copy context too soon : ", testNb++);
2356 DISPLAYLEVEL(3, "OK \n");
2358 DISPLAYLEVEL(3, "test%3i : load dictionary into context : ", testNb++);
2361 DISPLAYLEVEL(3, "OK \n");
2363 DISPLAYLEVEL(3, "test%3i : compress with flat dictionary : ", testNb++);
2369 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2371 DISPLAYLEVEL(3, "test%3i : frame built with flat dictionary should be decompressible : ", testNb++);
2377 DISPLAYLEVEL(3, "OK \n");
2379 DISPLAYLEVEL(3, "test%3i : compress with duplicated context : ", testNb++);
2388 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2390 DISPLAYLEVEL(3, "test%3i : frame built with duplicated context should be decompressible : ", testNb++);
2396 DISPLAYLEVEL(3, "OK \n");
2398 DISPLAYLEVEL(3, "test%3i : decompress with DDict : ", testNb++);
2402 DISPLAYLEVEL(3, "OK (size of DDict : %u) \n", (unsigned)ZSTD_sizeof_DDict(ddict));
2406 DISPLAYLEVEL(3, "test%3i : decompress with static DDict : ", testNb++);
2415 DISPLAYLEVEL(3, "OK (size of static DDict : %u) \n", (unsigned)ddictBufferSize);
2418 DISPLAYLEVEL(3, "test%3i : check content size on duplicated context : ", testNb++);
2429 DISPLAYLEVEL(3, "OK \n");
2464 DISPLAYLEVEL(3, "test%3i : flat-dictionary efficiency test : \n", testNb++);
2467 DISPLAYLEVEL(4, "content hash : %016llx; dict hash : %016llx \n",
2475 DISPLAYLEVEL(1, "error : compression at level %i worse than expected (%u > %u) \n",
2479 DISPLAYLEVEL(4, "level %i : max expected %u >= reached %u \n",
2489 DISPLAYLEVEL(1, "error : compression with dictionary at level %i worse than expected (%u > %u) \n",
2493 DISPLAYLEVEL(4, "level %i with dictionary : max expected %u >= reached %u \n",
2508 DISPLAYLEVEL(1, "error : compression with compress2 at level %i worse than expected (%u > %u) \n",
2513 DISPLAYLEVEL(4, "level %i with compress2 : max expected %u >= reached %u \n",
2527 DISPLAYLEVEL(1, "error : compression with dictionary and compress2 at level %i worse than expected (%u > %u) \n",
2531 DISPLAYLEVEL(4, "level %i with dictionary and compress2 : max expected %u >= reached %u \n",
2535 DISPLAYLEVEL(4, "compression efficiency tests OK \n");
2575 DISPLAYLEVEL(3, "test%3i : dictBuilder on cyclic data : ", testNb++);
2582 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)sDictSize);
2585 DISPLAYLEVEL(3, "test%3i : dictBuilder : ", testNb++);
2590 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)dictSize);
2592 DISPLAYLEVEL(3, "test%3i : Multithreaded COVER dictBuilder : ", testNb++);
2604 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)dictSize);
2606 DISPLAYLEVEL(3, "test%3i : COVER dictBuilder with shrinkDict: ", testNb++);
2620 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)dictSize);
2622 DISPLAYLEVEL(3, "test%3i : Multithreaded FASTCOVER dictBuilder : ", testNb++);
2634 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)dictSize);
2636 DISPLAYLEVEL(3, "test%3i : FASTCOVER dictBuilder with shrinkDict: ", testNb++);
2650 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)dictSize);
2652 DISPLAYLEVEL(3, "test%3i : check dictID : ", testNb++);
2655 DISPLAYLEVEL(3, "OK : %u \n", (unsigned)dictID);
2657 DISPLAYLEVEL(3, "test%3i : check dict header size no error : ", testNb++);
2660 DISPLAYLEVEL(3, "OK : %u \n", (unsigned)dictHeaderSize);
2662 DISPLAYLEVEL(3, "test%3i : check dict header size correctness : ", testNb++);
2666 DISPLAYLEVEL(3, "OK : %u \n", (unsigned)dictHeaderSize);
2668 DISPLAYLEVEL(3, "test%3i : compress with dictionary : ", testNb++);
2673 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2675 DISPLAYLEVEL(3, "test%3i : retrieve dictID from dictionary : ", testNb++);
2679 DISPLAYLEVEL(3, "OK \n");
2681 DISPLAYLEVEL(3, "test%3i : retrieve dictID from frame : ", testNb++);
2685 DISPLAYLEVEL(3, "OK \n");
2687 DISPLAYLEVEL(3, "test%3i : frame built with dictionary should be decompressible : ", testNb++);
2696 DISPLAYLEVEL(3, "OK \n");
2698 DISPLAYLEVEL(3, "test%3i : estimate CDict size : ", testNb++);
2701 DISPLAYLEVEL(3, "OK : %u \n", (unsigned)estimatedSize);
2704 DISPLAYLEVEL(3, "test%3i : compress with CDict ", testNb++);
2710 DISPLAYLEVEL(3, "(size : %u) : ", (unsigned)ZSTD_sizeof_CDict(cdict));
2717 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2719 DISPLAYLEVEL(3, "test%3i : retrieve dictID from frame : ", testNb++);
2723 DISPLAYLEVEL(3, "OK \n");
2725 DISPLAYLEVEL(3, "test%3i : frame built with dictionary should be decompressible : ", testNb++);
2734 DISPLAYLEVEL(3, "OK \n");
2736 DISPLAYLEVEL(3, "test%3i : compress with static CDict : ", testNb++);
2762 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2764 DISPLAYLEVEL(3, "test%3i : ZSTD_compress_usingCDict_advanced, no contentSize, no dictID : ", testNb++);
2776 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2778 DISPLAYLEVEL(3, "test%3i : try retrieving contentSize from frame : ", testNb++);
2782 DISPLAYLEVEL(3, "OK (unknown)\n");
2784 DISPLAYLEVEL(3, "test%3i : frame built without dictID should be decompressible : ", testNb++);
2794 DISPLAYLEVEL(3, "OK \n");
2796 DISPLAYLEVEL(3, "test%3i : ZSTD_compress_advanced, no dictID : ", testNb++);
2804 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100);
2806 DISPLAYLEVEL(3, "test%3i : frame built without dictID should be decompressible : ", testNb++);
2815 DISPLAYLEVEL(3, "OK \n");
2817 DISPLAYLEVEL(3, "test%3i : dictionary containing only header should return error : ", testNb++);
2828 DISPLAYLEVEL(3, "OK \n");
2830 DISPLAYLEVEL(3, "test%3d : bufferless api with cdict : ", testNb++);
2849 DISPLAYLEVEL(3, "OK \n");
2851 DISPLAYLEVEL(3, "test%3i : Building cdict w/ ZSTD_dct_fullDict on a good dictionary : ", testNb++);
2857 DISPLAYLEVEL(3, "OK \n");
2859 DISPLAYLEVEL(3, "test%3i : Building cdict w/ ZSTD_dct_fullDict on a rawContent (must fail) : ", testNb++);
2865 DISPLAYLEVEL(3, "OK \n");
2873 DISPLAYLEVEL(3, "test%3i : Loading rawContent starting with dict header w/ ZSTD_dct_auto should fail : ", testNb++);
2884 DISPLAYLEVEL(3, "OK \n");
2886 DISPLAYLEVEL(3, "test%3i : Loading rawContent starting with dict header w/ ZSTD_dct_rawContent should pass : ", testNb++);
2895 DISPLAYLEVEL(3, "OK \n");
2897 DISPLAYLEVEL(3, "test%3i : Testing non-attached CDict with ZSTD_dct_rawContent : ", testNb++);
2906 DISPLAYLEVEL(3, "OK \n");
2911 DISPLAYLEVEL(3, "test%3i : ZSTD_CCtx_refCDict() then set parameters : ", testNb++);
2921 DISPLAYLEVEL(3, "OK \n");
2923 DISPLAYLEVEL(3, "test%3i : Loading dictionary before setting parameters is the same as loading after : ", testNb++);
2940 DISPLAYLEVEL(3, "OK \n");
2942 DISPLAYLEVEL(3, "test%3i : Loading a dictionary clears the prefix : ", testNb++);
2948 DISPLAYLEVEL(3, "OK \n");
2950 DISPLAYLEVEL(3, "test%3i : Loading a dictionary clears the cdict : ", testNb++);
2958 DISPLAYLEVEL(3, "OK \n");
2960 DISPLAYLEVEL(3, "test%3i : Loading a cdict clears the prefix : ", testNb++);
2968 DISPLAYLEVEL(3, "OK \n");
2970 DISPLAYLEVEL(3, "test%3i : Loading a cdict clears the dictionary : ", testNb++);
2978 DISPLAYLEVEL(3, "OK \n");
2980 DISPLAYLEVEL(3, "test%3i : Loading a prefix clears the dictionary : ", testNb++);
2986 DISPLAYLEVEL(3, "OK \n");
2988 DISPLAYLEVEL(3, "test%3i : Loading a prefix clears the cdict : ", testNb++);
2996 DISPLAYLEVEL(3, "OK \n");
2998 DISPLAYLEVEL(3, "test%3i : Loaded dictionary persists across reset session : ", testNb++);
3012 DISPLAYLEVEL(3, "OK \n");
3014 DISPLAYLEVEL(3, "test%3i : Loaded dictionary is cleared after resetting parameters : ", testNb++);
3028 DISPLAYLEVEL(3, "OK \n");
3034 DISPLAYLEVEL(3, "test%3i : ZSTD_decompressDCtx() with dictionary : ", testNb++);
3054 DISPLAYLEVEL(3, "OK \n");
3056 DISPLAYLEVEL(3, "test%3i : ZSTD_decompressDCtx() with ddict : ", testNb++);
3074 DISPLAYLEVEL(3, "OK \n");
3076 DISPLAYLEVEL(3, "test%3i : ZSTD_decompressDCtx() with prefix : ", testNb++);
3089 DISPLAYLEVEL(3, "OK \n");
3091 DISPLAYLEVEL(3, "test%3i : ZSTD_fast attach dictionary with hashLog = 25 and chainLog = 25 : ", testNb++);
3116 DISPLAYLEVEL(3, "OK \n");
3118 DISPLAYLEVEL(3, "test%3i : ZSTD_dfast attach dictionary with hashLog = 25 and chainLog = 25 : ", testNb++);
3143 DISPLAYLEVEL(3, "OK \n");
3145 DISPLAYLEVEL(3, "test%3i : ZSTD_lazy attach dictionary with hashLog = 29 and searchLog = 4 : ", testNb++);
3173 DISPLAYLEVEL(3, "OK \n");
3175 DISPLAYLEVEL(3, "test%3i : Dictionary with non-default repcodes : ", testNb++);
3214 if (ZSTD_isError(cSize)) { DISPLAYLEVEL(5, "Compression error %s : ", ZSTD_getErrorName(cSize)); goto _output_error; }
3216 if (ZSTD_isError(dSize)) { DISPLAYLEVEL(5, "Decompression error %s : ", ZSTD_getErrorName(dSize)); goto _output_error; }
3217 if (memcmp(data, decodedBuffer, sizeof(data))) { DISPLAYLEVEL(5, "Data corruption : "); goto _output_error; }
3220 DISPLAYLEVEL(3, "OK \n");
3222 DISPLAYLEVEL(3, "test%3i : ZSTD_decompressDCtx() with multiple ddicts : ", testNb++);
3288 DISPLAYLEVEL(3, "OK \n");
3314 DISPLAYLEVEL(3, "test%3i : ZDICT_trainFromBuffer_cover : ", testNb++);
3323 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)dictSize);
3325 DISPLAYLEVEL(3, "test%3i : check dictID : ", testNb++);
3328 DISPLAYLEVEL(3, "OK : %u \n", (unsigned)dictID);
3330 DISPLAYLEVEL(3, "test%3i : ZDICT_optimizeTrainFromBuffer_cover : ", testNb++);
3337 DISPLAYLEVEL(3, "OK, created dictionary of size %u \n", (unsigned)optDictSize);
3339 DISPLAYLEVEL(3, "test%3i : check dictID : ", testNb++);
3342 DISPLAYLEVEL(3, "OK : %u \n", (unsigned)dictID);
3350 DISPLAYLEVEL(3, "test%3i : Check input length for magic number : ", testNb++);
3354 DISPLAYLEVEL(3, "OK \n");
3356 DISPLAYLEVEL(3, "test%3i : Check magic Number : ", testNb++);
3360 DISPLAYLEVEL(3, "OK \n");
3363 DISPLAYLEVEL(3, "test%3i : Content size verification : ", testNb++);
3373 DISPLAYLEVEL(3, "OK : %s \n", ZSTD_getErrorName(result));
3379 DISPLAYLEVEL(3, "test%3i : negative compression level : ", testNb++);
3393 DISPLAYLEVEL(5, "simple=%zu vs %zu=advanced : ", cSize_1pass, compressionResult);
3399 DISPLAYLEVEL(3, "OK \n");
3406 DISPLAYLEVEL(3, "test%3i : parameters in order : ", testNb++);
3418 DISPLAYLEVEL(3, "OK (compress : %u -> %u bytes)\n", (unsigned)inputSize, (unsigned)cSize);
3423 DISPLAYLEVEL(3, "test%3i : parameters disordered : ", testNb++);
3433 DISPLAYLEVEL(3, "OK (compress : %u -> %u bytes)\n", (unsigned)inputSize, (unsigned)result);
3443 DISPLAYLEVEL(3, "test%3i : get dParameter bounds ", testNb++);
3447 DISPLAYLEVEL(3, "OK \n");
3449 DISPLAYLEVEL(3, "test%3i : wrong dParameter : ", testNb++);
3456 DISPLAYLEVEL(3, "OK \n");
3458 DISPLAYLEVEL(3, "test%3i : out of bound dParameter : ", testNb++);
3465 DISPLAYLEVEL(3, "OK \n");
3478 DISPLAYLEVEL(3, "test%3i : magic-less format test : ", testNb++);
3487 DISPLAYLEVEL(3, "OK (compress : %u -> %u bytes)\n", (unsigned)inputSize, (unsigned)cSize);
3489 DISPLAYLEVEL(3, "test%3i : decompress normally (should fail) : ", testNb++);
3492 DISPLAYLEVEL(3, "OK : %s \n", ZSTD_getErrorName(decodeResult));
3495 DISPLAYLEVEL(3, "test%3i : decompress of magic-less frame : ", testNb++);
3505 DISPLAYLEVEL(3, "one-shot OK, ");
3514 DISPLAYLEVEL(3, "streaming OK : regenerated %u bytes \n", (unsigned)out.pos);
3518 DISPLAYLEVEL(3, "test%3i : empty magic-less format test : ", testNb++);
3527 DISPLAYLEVEL(3, "OK (compress : %u -> %u bytes)\n", (unsigned)0, (unsigned)cSize);
3529 DISPLAYLEVEL(3, "test%3i : decompress of empty magic-less frame : ", testNb++);
3535 DISPLAYLEVEL(3, "one-shot OK, ");
3544 DISPLAYLEVEL(3, "streaming OK : regenerated %u bytes \n", (unsigned)out.pos);
3551 DISPLAYLEVEL(3, "test%3i : Decompression parameter reset test : ", testNb++);
3577 DISPLAYLEVEL(3, "OK \n");
3588 DISPLAYLEVEL(3, "test%3i : Block compression test : ", testNb++);
3592 DISPLAYLEVEL(3, "OK \n");
3594 DISPLAYLEVEL(3, "test%3i : Block decompression test : ", testNb++);
3598 DISPLAYLEVEL(3, "OK \n");
3601 DISPLAYLEVEL(3, "test%3i : Huge block streaming compression test : ", testNb++);
3612 DISPLAYLEVEL(3, "OK \n");
3615 DISPLAYLEVEL(3, "test%3i : Dictionary Block compression test : ", testNb++);
3624 DISPLAYLEVEL(3, "OK \n");
3626 DISPLAYLEVEL(3, "test%3i : Dictionary Block decompression test : ", testNb++);
3630 DISPLAYLEVEL(1, "ZSTD_decompressBlock() with _usingDict() fails : %u, instead of %u expected \n", (unsigned)r, (unsigned)blockSize);
3637 DISPLAYLEVEL(1, "ZSTD_decompressBlock() with _usingDict() and after insertBlock() fails : %u, instead of %u expected \n", (unsigned)r, (unsigned)blockSize);
3641 DISPLAYLEVEL(3, "OK \n");
3643 DISPLAYLEVEL(3, "test%3i : Block compression with CDict : ", testNb++);
3650 DISPLAYLEVEL(3, "OK \n");
3659 DISPLAYLEVEL(3, "test%3i : Long RLE test : ", testNb++);
3668 DISPLAYLEVEL(3, "OK \n");
3671 DISPLAYLEVEL(3, "test%3i : ZSTD_generateSequences decode from sequences test : ", testNb++);
3702 DISPLAYLEVEL(3, "OK \n");
3704 DISPLAYLEVEL(3, "test%3i : ZSTD_generateSequences too small output buffer : ", testNb++);
3727 DISPLAYLEVEL(3, "OK \n");
3729 DISPLAYLEVEL(3, "test%3i : ZSTD_getSequences followed by ZSTD_compressSequences : ", testNb++);
3786 DISPLAYLEVEL(3, "OK \n");
3790 DISPLAYLEVEL(3, "test%3i : compress %u zeroes : ", testNb++, LONGZEROSLENGTH);
3793 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/LONGZEROSLENGTH*100);
3795 DISPLAYLEVEL(3, "test%3i : decompress %u zeroes : ", testNb++, LONGZEROSLENGTH);
3798 DISPLAYLEVEL(3, "OK \n");
3802 DISPLAYLEVEL(3, "test%3i : compress %u zeroes : ", testNb++, ZEROESLENGTH);
3805 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/ZEROESLENGTH*100);
3807 DISPLAYLEVEL(3, "test%3i : decompress %u zeroes : ", testNb++, ZEROESLENGTH);
3810 DISPLAYLEVEL(3, "OK \n");
3837 DISPLAYLEVEL(3, "test%3i : growing nbSeq : ", testNb++);
3853 DISPLAYLEVEL(3, "OK \n");
3855 DISPLAYLEVEL(3, "test%3i : compress lots 3-bytes sequences : ", testNb++);
3858 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/_3BYTESTESTLENGTH*100);
3860 DISPLAYLEVEL(3, "test%3i : decompress lots 3-bytes sequence : ", testNb++);
3863 DISPLAYLEVEL(3, "OK \n");
3866 DISPLAYLEVEL(3, "test%3i : growing literals buffer : ", testNb++);
3882 DISPLAYLEVEL(3, "OK \n");
3884 DISPLAYLEVEL(3, "test%3i : incompressible data and ill suited dictionary : ", testNb++);
3915 DISPLAYLEVEL(3, "OK \n");
3919 DISPLAYLEVEL(3, "test%3i : frame compressed size of skippable frame : ", testNb++);
3923 DISPLAYLEVEL(3, "OK \n");
3926 DISPLAYLEVEL(3, "test%3i : testing ZSTD error code strings : ", testNb++);
3933 DISPLAYLEVEL(3, "OK \n");
3935 DISPLAYLEVEL(3, "test%3i : testing ZSTD dictionary sizes : ", testNb++);
3956 DISPLAYLEVEL(3, "OK \n");
3958 DISPLAYLEVEL(3, "test%3i : testing FSE_normalizeCount() PR#1255: ", testNb++);
3974 DISPLAYLEVEL(3, "OK \n");
3976 DISPLAYLEVEL(3, "test%3i : testing FSE_writeNCount() PR#2779: ", testNb++);
3990 DISPLAYLEVEL(3, "OK \n");
3992 DISPLAYLEVEL(3, "test%3i : testing bitwise intrinsics PR#3045: ", testNb++);
4058 DISPLAYLEVEL(3, "OK \n");
4061 DISPLAYLEVEL(3, "test%3i : passing wrong full dict should fail on compressStream2 refPrefix ", testNb++);
4089 DISPLAYLEVEL(3, "OK \n");
4091 DISPLAYLEVEL(3, "test%3i : small dictionary with multithreading and LDM ", testNb++);
4116 DISPLAYLEVEL(3, "OK \n");
4118 DISPLAYLEVEL(3, "test%3i : ZSTD_getCParams() + dictionary ", testNb++);
4130 DISPLAYLEVEL(3, "OK \n");
4132 DISPLAYLEVEL(3, "test%3i : ZSTD_adjustCParams() + dictionary ", testNb++);
4141 DISPLAYLEVEL(3, "OK \n");
4143 DISPLAYLEVEL(3, "test%3i : check compression mem usage monotonicity over levels for estimateCCtxSize() : ", testNb++);
4150 DISPLAYLEVEL(3, "Error! previous cctx size: %zu at level: %d is larger than current cctx size: %zu at level: %d",
4157 DISPLAYLEVEL(3, "OK \n");
4159 DISPLAYLEVEL(3, "test%3i : check estimateCCtxSize() always larger or equal to ZSTD_estimateCCtxSize_usingCParams() : ", testNb++);
4175 DISPLAYLEVEL(3, "error! l: %d dict: %zu srcSize: %zu cctx size cpar: %zu, cctx size level: %zu\n",
4179 DISPLAYLEVEL(3, "OK \n");
4181 DISPLAYLEVEL(3, "test%3i : thread pool API tests : \n", testNb++)
4188 DISPLAYLEVEL(3, "thread pool tests OK \n");
4224 DISPLAYLEVEL(3, "longtest%3i : table cleanliness through index reduction : ", testNb++);
4291 DISPLAYLEVEL(3, "OK \n");
4293 DISPLAYLEVEL(3, "longtest%3i : testing ldm no regressions in size for opt parser : ", testNb++);
4328 DISPLAYLEVEL(3, "OK \n");
4330 DISPLAYLEVEL(3, "longtest%3i : testing cdict compression with different attachment strategies : ", testNb++);
4356 DISPLAYLEVEL(3, "\n Testing with dictSize %u ", (U32)dictSize);
4363 DISPLAYLEVEL(5, "\n dictSize %u cLevel %d iter %d ", (U32)dictSize, cLevel, i);
4378 DISPLAYLEVEL(5, "compressed to %u bytes ", (U32)cSize);
4389 DISPLAYLEVEL(3, "OK \n");
4543 DISPLAYLEVEL(5, "fuzzer t%u: Simple compression test (level %i) \n", testNb, cLevel);
4553 DISPLAYLEVEL(5, "fuzzer t%u: compress into too small buffer of size %u (missing %u bytes) \n",
4573 DISPLAYLEVEL(5, "fuzzer t%u: simple decompression test \n", testNb);
4584 DISPLAYLEVEL(5, "fuzzer t%u: decompression of truncated source \n", testNb);
4596 DISPLAYLEVEL(5, "fuzzer t%u: decompress into too small dst buffer \n", testNb);
4632 DISPLAYLEVEL(5, "fuzzer t%u: decompress noisy source \n", testNb);
4645 DISPLAYLEVEL(5, "fuzzer t%u: Bufferless streaming compression test \n", testNb);
4658 DISPLAYLEVEL(6, "fuzzer t%u: Compressing up to <=%u bytes at level %i with dictionary size %u \n",
4702 DISPLAYLEVEL(5, "fuzzer t%u: Bufferless streaming decompression test \n", testNb);