/freebsd/sys/contrib/zstd/examples/ |
H A D | dictionary_decompression.c | 32 size_t cSize; in decompress() local 33 void* const cBuff = mallocAndLoadFile_orDie(fname, &cSize); in decompress() 40 unsigned long long const rSize = ZSTD_getFrameContentSize(cBuff, cSize); in decompress() 51 unsigned const actualDictID = ZSTD_getDictID_fromFrame(cBuff, cSize); in decompress() 64 size_t const dSize = ZSTD_decompress_usingDDict(dctx, rBuff, rSize, cBuff, cSize, ddict); in decompress() 70 printf("%25s : %6u -> %7u \n", fname, (unsigned)cSize, (unsigned)rSize); in decompress()
|
H A D | simple_decompression.c | 18 size_t cSize; in decompress() local 19 void* const cBuff = mallocAndLoadFile_orDie(fname, &cSize); in decompress() 26 unsigned long long const rSize = ZSTD_getFrameContentSize(cBuff, cSize); in decompress() 37 size_t const dSize = ZSTD_decompress(rBuff, rSize, cBuff, cSize); in decompress() 43 printf("%25s : %6u -> %7u \n", fname, (unsigned)cSize, (unsigned)rSize); in decompress()
|
H A D | simple_compression.c | 28 size_t const cSize = ZSTD_compress(cBuff, cBuffSize, fBuff, fSize, 1); in compress_orDie() local 29 CHECK_ZSTD(cSize); in compress_orDie() 31 saveFile_orDie(oname, cBuff, cSize); in compress_orDie() 34 printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); in compress_orDie()
|
H A D | dictionary_compression.c | 45 size_t const cSize = ZSTD_compress_usingCDict(cctx, cBuff, cBuffSize, fBuff, fSize, cdict); in compress() local 46 CHECK_ZSTD(cSize); in compress() 48 saveFile_orDie(oname, cBuff, cSize); in compress() 51 printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); in compress()
|
H A D | multiple_simple_compression.c | 74 …size_t const cSize = ZSTD_compressCCtx(ress.cctx, ress.cBuffer, ress.cBufferSize, ress.fBuffer, fS… in compressFile_orDie() local 75 CHECK_ZSTD(cSize); in compressFile_orDie() 77 saveFile_orDie(oname, ress.cBuffer, cSize); in compressFile_orDie() 80 printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); in compressFile_orDie()
|
/freebsd/sys/contrib/zstd/lib/compress/ |
H A D | zstd_compress_superblock.c | 80 …{ const size_t cSize = singleStream ? HUF_compress1X_usingCTable(op, oend-op, literals, litSize,… in ZSTD_compressSubBlock_literal() local 82 op += cSize; in ZSTD_compressSubBlock_literal() 83 cLitSize += cSize; in ZSTD_compressSubBlock_literal() 84 if (cSize == 0 || ERR_isError(cSize)) { in ZSTD_compressSubBlock_literal() 85 DEBUGLOG(5, "Failed to write entropy tables %s", ZSTD_getErrorName(cSize)); in ZSTD_compressSubBlock_literal() 99 DEBUGLOG(5, "ZSTD_compressSubBlock_literal (cSize=%zu)", cSize); in ZSTD_compressSubBlock_literal() 295 { size_t cSize = (op-ostart)-ZSTD_blockHeaderSize; in ZSTD_compressSubBlock() local 296 U32 const cBlockHeader24 = lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); in ZSTD_compressSubBlock() 487 const size_t cSize = ZSTD_compressSubBlock(&nextCBlock->entropy, entropyMetadata, in ZSTD_compressSubBlock_multi() local 496 FORWARD_IF_ERROR(cSize, "ZSTD_compressSubBlock failed"); in ZSTD_compressSubBlock_multi() [all …]
|
H A D | zstdmt_compress.c | 612 unsigned jobID, size_t cSize) in ZSTDMT_serialState_ensureFinished() argument 616 assert(ZSTD_isError(cSize)); (void)cSize; in ZSTDMT_serialState_ensureFinished() 639 …size_t cSize; /* SHARED - set0 by mtctx, then modified by worker AND read b… member 661 job->cSize = e; \ 738 assert(job->cSize == 0); in ZSTDMT_compressionJob() 740 size_t const cSize = ZSTD_compressContinue(cctx, op, oend-op, ip, chunkSize); in ZSTDMT_compressionJob() local 741 if (ZSTD_isError(cSize)) JOB_ERROR(cSize); in ZSTDMT_compressionJob() 743 op += cSize; assert(op < oend); in ZSTDMT_compressionJob() 746 job->cSize += cSize; in ZSTDMT_compressionJob() 749 (U32)cSize, (U32)job->cSize); in ZSTDMT_compressionJob() [all …]
|
H A D | huf_compress.c | 123 …{ CHECK_V_F(cSize, FSE_compress_usingCTable(op, (size_t)(oend - op), weightTable, wtSize, wksp->… in HUF_compressWeights() 124 if (cSize == 0) return 0; /* not enough space for compressed data */ in HUF_compressWeights() 125 op += cSize; in HUF_compressWeights() 1099 …{ CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, C… in HUF_compress4X_usingCTable_internal() 1100 if (cSize == 0 || cSize > 65535) return 0; in HUF_compress4X_usingCTable_internal() 1101 MEM_writeLE16(ostart, (U16)cSize); in HUF_compress4X_usingCTable_internal() 1102 op += cSize; in HUF_compress4X_usingCTable_internal() 1107 …{ CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, C… in HUF_compress4X_usingCTable_internal() 1108 if (cSize == 0 || cSize > 65535) return 0; in HUF_compress4X_usingCTable_internal() 1109 MEM_writeLE16(ostart+2, (U16)cSize); in HUF_compress4X_usingCTable_internal() [all …]
|
H A D | zstd_compress.c | 2612 size_t const cSize = ZSTD_compressLiterals( in ZSTD_entropyCompressSeqStore_internal() local 2620 FORWARD_IF_ERROR(cSize, "ZSTD_compressLiterals failed"); in ZSTD_entropyCompressSeqStore_internal() 2621 assert(cSize <= dstCapacity); in ZSTD_entropyCompressSeqStore_internal() 2622 op += cSize; in ZSTD_entropyCompressSeqStore_internal() 2701 size_t const cSize = ZSTD_entropyCompressSeqStore_internal( in ZSTD_entropyCompressSeqStore() local 2705 if (cSize == 0) return 0; in ZSTD_entropyCompressSeqStore() 2709 if ((cSize == ERROR(dstSize_tooSmall)) & (srcSize <= dstCapacity)) in ZSTD_entropyCompressSeqStore() 2711 FORWARD_IF_ERROR(cSize, "ZSTD_entropyCompressSeqStore_internal failed"); in ZSTD_entropyCompressSeqStore() 2715 if (cSize >= maxCSize) return 0; /* block not compressed */ in ZSTD_entropyCompressSeqStore() 2717 DEBUGLOG(4, "ZSTD_entropyCompressSeqStore() cSize: %zu", cSize); in ZSTD_entropyCompressSeqStore() [all …]
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
H A D | huf_compress.c | 97 …{ CHECK_V_F(cSize, FSE_compress_usingCTable(op, (size_t)(oend - op), weightTable, wtSize, CTable… in HUF_compressWeights() 98 if (cSize == 0) return 0; /* not enough space for compressed data */ in HUF_compressWeights() 99 op += cSize; in HUF_compressWeights() 569 …{ CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, C… in HUF_compress4X_usingCTable_internal() 570 if (cSize==0) return 0; in HUF_compress4X_usingCTable_internal() 571 assert(cSize <= 65535); in HUF_compress4X_usingCTable_internal() 572 MEM_writeLE16(ostart, (U16)cSize); in HUF_compress4X_usingCTable_internal() 573 op += cSize; in HUF_compress4X_usingCTable_internal() 578 …{ CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, C… in HUF_compress4X_usingCTable_internal() 579 if (cSize==0) return 0; in HUF_compress4X_usingCTable_internal() [all …]
|
H A D | zstd_compress_superblock.c | 358 …{ const size_t cSize = singleStream ? HUF_compress1X_usingCTable(op, oend-op, literals, litSize,… in ZSTD_compressSubBlock_literal() local 360 op += cSize; in ZSTD_compressSubBlock_literal() 361 cLitSize += cSize; in ZSTD_compressSubBlock_literal() 362 if (cSize == 0 || ERR_isError(cSize)) { in ZSTD_compressSubBlock_literal() 363 DEBUGLOG(5, "Failed to write entropy tables %s", ZSTD_getErrorName(cSize)); in ZSTD_compressSubBlock_literal() 377 DEBUGLOG(5, "ZSTD_compressSubBlock_literal (cSize=%zu)", cSize); in ZSTD_compressSubBlock_literal() 572 { size_t cSize = (op-ostart)-ZSTD_blockHeaderSize; in ZSTD_compressSubBlock() local 573 U32 const cBlockHeader24 = lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); in ZSTD_compressSubBlock() 763 const size_t cSize = ZSTD_compressSubBlock(&nextCBlock->entropy, entropyMetadata, in ZSTD_compressSubBlock_multi() local 772 FORWARD_IF_ERROR(cSize, "ZSTD_compressSubBlock failed"); in ZSTD_compressSubBlock_multi() [all …]
|
H A D | zstd_compress.c | 1996 size_t const cSize = ZSTD_compressLiterals( in ZSTD_compressSequences_internal() local 2004 FORWARD_IF_ERROR(cSize, "ZSTD_compressLiterals failed"); in ZSTD_compressSequences_internal() 2005 assert(cSize <= dstCapacity); in ZSTD_compressSequences_internal() 2006 op += cSize; in ZSTD_compressSequences_internal() 2160 size_t const cSize = ZSTD_compressSequences_internal( in ZSTD_compressSequences() local 2164 if (cSize == 0) return 0; in ZSTD_compressSequences() 2168 if ((cSize == ERROR(dstSize_tooSmall)) & (srcSize <= dstCapacity)) in ZSTD_compressSequences() 2170 FORWARD_IF_ERROR(cSize, "ZSTD_compressSequences_internal failed"); in ZSTD_compressSequences() 2174 if (cSize >= maxCSize) return 0; /* block not compressed */ in ZSTD_compressSequences() 2177 return cSize; in ZSTD_compressSequences() [all …]
|
/freebsd/sys/contrib/zstd/zlibWrapper/examples/ |
H A D | zwrapbench.c | 143 size_t cSize; member 209 size_t cSize = 0; in BMK_benchMem() local 256 blockTable[blockNb].cSize = rSize; in BMK_benchMem() 300 blockTable[blockNb].cSize = outBuffer.pos; in BMK_benchMem() 341 blockTable[blockNb].cSize = def.total_out; in BMK_benchMem() 374 blockTable[blockNb].cSize = def.total_out; in BMK_benchMem() 385 cSize = 0; in BMK_benchMem() 386 … { U32 blockNb; for (blockNb=0; blockNb<nbBlocks; blockNb++) cSize += blockTable[blockNb].cSize; } in BMK_benchMem() 387 ratio = (double)srcSize / (double)cSize; in BMK_benchMem() 390 marks[markNb], displayName, (unsigned)srcSize, (unsigned)cSize, ratio, in BMK_benchMem() [all …]
|
/freebsd/sys/contrib/zstd/programs/ |
H A D | benchzstd.c | 154 size_t cSize; member 321 size_t cSize = 0; in BMK_benchMemAdvancedNoAlloc() local 351 cSize = srcSize; in BMK_benchMemAdvancedNoAlloc() 353 ratio = (double)srcSize / (double)cSize; in BMK_benchMemAdvancedNoAlloc() 380 benchResult.cSize = thisBlockSize; in BMK_benchMemAdvancedNoAlloc() 449 cSize = cResult.sumOfReturn; in BMK_benchMemAdvancedNoAlloc() 450 ratio = (double)srcSize / (double)cSize; in BMK_benchMemAdvancedNoAlloc() 453 benchResult.cSize = cSize; in BMK_benchMemAdvancedNoAlloc() 459 assert(cSize < UINT_MAX); in BMK_benchMemAdvancedNoAlloc() 462 (unsigned)srcSize, (unsigned)cSize, in BMK_benchMemAdvancedNoAlloc() [all …]
|
H A D | benchzstd.h | 51 size_t cSize; member
|
/freebsd/sys/contrib/zstd/lib/legacy/ |
H A D | zstd_v01.c | 1467 U32 cSize; in ZSTDv01_getcBlockSize() local 1472 cSize = in[2] + (in[1]<<8) + ((in[0] & 7)<<16); in ZSTDv01_getcBlockSize() 1475 bpPtr->origSize = (bpPtr->blockType == bt_rle) ? cSize : 0; in ZSTDv01_getcBlockSize() 1479 return cSize; in ZSTDv01_getcBlockSize() 2006 static void ZSTD_errorFrameSizeInfoLegacy(size_t* cSize, unsigned long long* dBound, size_t ret) in ZSTD_errorFrameSizeInfoLegacy() argument 2008 *cSize = ret; in ZSTD_errorFrameSizeInfoLegacy() 2012 void ZSTDv01_findFrameSizeInfoLegacy(const void *src, size_t srcSize, size_t* cSize, unsigned long … in ZSTDv01_findFrameSizeInfoLegacy() argument 2022 ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(srcSize_wrong)); in ZSTDv01_findFrameSizeInfoLegacy() 2027 ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(prefix_unknown)); in ZSTDv01_findFrameSizeInfoLegacy() 2037 ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, blockSize); in ZSTDv01_findFrameSizeInfoLegacy() [all …]
|
H A D | zstd_v01.h | 49 size_t* cSize, unsigned long long* dBound);
|
H A D | zstd_v02.h | 49 size_t* cSize, unsigned long long* dBound);
|
H A D | zstd_v03.h | 49 size_t* cSize, unsigned long long* dBound);
|
H A D | zstd_v04.h | 49 size_t* cSize, unsigned long long* dBound);
|
H A D | zstd_v03.c | 2462 U32 cSize; in ZSTD_getcBlockSize() local 2467 cSize = in[2] + (in[1]<<8) + ((in[0] & 7)<<16); in ZSTD_getcBlockSize() 2470 bpPtr->origSize = (bpPtr->blockType == bt_rle) ? cSize : 0; in ZSTD_getcBlockSize() 2474 return cSize; in ZSTD_getcBlockSize() 2970 MEM_STATIC void ZSTD_errorFrameSizeInfoLegacy(size_t* cSize, unsigned long long* dBound, size_t ret) in ZSTD_errorFrameSizeInfoLegacy() argument 2972 *cSize = ret; in ZSTD_errorFrameSizeInfoLegacy() 2976 void ZSTDv03_findFrameSizeInfoLegacy(const void *src, size_t srcSize, size_t* cSize, unsigned long … in ZSTDv03_findFrameSizeInfoLegacy() argument 2986 ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(srcSize_wrong)); in ZSTDv03_findFrameSizeInfoLegacy() 2991 ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(prefix_unknown)); in ZSTDv03_findFrameSizeInfoLegacy() 3001 ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, cBlockSize); in ZSTDv03_findFrameSizeInfoLegacy() [all …]
|
H A D | zstd_v05.h | 47 size_t* cSize, unsigned long long* dBound);
|
H A D | zstd_v06.h | 56 size_t* cSize, unsigned long long* dBound);
|
H A D | zstd_v07.h | 63 size_t* cSize, unsigned long long* dBound);
|
/freebsd/sys/contrib/zstd/zlibWrapper/ |
H A D | zstd_zlibwrapper.c | 1106 size_t const cSize = ZSTD_compress(dest, dstCapacity, in z_compress() local 1111 if (ZSTD_isError(cSize)) return Z_STREAM_ERROR; in z_compress() 1112 *destLen = cSize; in z_compress() 1126 size_t const cSize = ZSTD_compress(dest, dstCapacity, source, sourceLen, level); in z_compress2() local 1127 if (ZSTD_isError(cSize)) return Z_STREAM_ERROR; in z_compress2() 1128 *destLen = cSize; in z_compress2()
|