Home
last modified time | relevance | path

Searched refs:cSize (Results 1 – 25 of 65) sorted by relevance

123

/external/zstd/tests/
Dfuzzer.c351 size_t cSize; in basicUnitTests() local
398 CHECK_VAR(cSize, ZSTD_compressCCtx(cctx, in basicUnitTests()
401 DISPLAYLEVEL(3, "OK (%u bytes : %.2f%%)\n", (unsigned)cSize, (double)cSize/CNBuffSize*100); in basicUnitTests()
419 { unsigned long long const rSize = ZSTD_getFrameContentSize(compressedBuffer, cSize); in basicUnitTests()
425 { unsigned long long const rSize = ZSTD_getDecompressedSize(compressedBuffer, cSize); in basicUnitTests()
431 { unsigned long long const rSize = ZSTD_findDecompressedSize(compressedBuffer, cSize); in basicUnitTests()
438 unsigned long long bound = ZSTD_decompressBound(compressedBuffer, cSize); in basicUnitTests()
445 unsigned long long bound = ZSTD_decompressBound(compressedBuffer, cSize - 1); in basicUnitTests()
451 { size_t const r = ZSTD_decompress(decodedBuffer, CNBuffSize, compressedBuffer, cSize); in basicUnitTests()
534 compressedBuffer, cSize, in basicUnitTests()
[all …]
Dzbufftest.c131 size_t cSize, readSize, readSkipSize, genSize; in basicUnitTests() local
146 cSize = skippableFrameSize + 8; in basicUnitTests()
153 …{ size_t const r = ZBUFF_compressContinue(zc, ((char*)compressedBuffer)+cSize, &genSize, CNBuffer,… in basicUnitTests()
156 cSize += genSize; in basicUnitTests()
157 genSize = compressedBufferSize - cSize; in basicUnitTests()
158 { size_t const r = ZBUFF_compressEnd(zc, ((char*)compressedBuffer)+cSize, &genSize); in basicUnitTests()
160 cSize += genSize; in basicUnitTests()
161 …DISPLAYLEVEL(4, "OK (%u bytes : %.2f%%)\n", (U32)cSize, (double)cSize/COMPRESSIBLE_NOISE_LENGTH*10… in basicUnitTests()
166 readSkipSize = cSize; in basicUnitTests()
176 readSize = cSize - readSkipSize; in basicUnitTests()
[all …]
Dzstreamtest.c270 size_t cSize; in basicUnitTests() local
320 cSize = skippableFrameSize + 8; in basicUnitTests()
325 outBuff.dst = (char*)(compressedBuffer)+cSize; in basicUnitTests()
326 assert(compressedBufferSize > cSize); in basicUnitTests()
327 outBuff.size = compressedBufferSize - cSize; in basicUnitTests()
336 cSize += outBuff.pos; in basicUnitTests()
338 (unsigned)cSize, (double)cSize/COMPRESSIBLE_NOISE_LENGTH*100); in basicUnitTests()
384 inBuff.size = cSize; in basicUnitTests()
428 size_t const gfhError = ZSTD_getFrameHeader(&fhi, cStart, cSize); in basicUnitTests()
477 … if (inBuff.pos != cSize) DISPLAYLEVEL(4, "inBuff.pos != cSize : should have real all input ! \n"); in basicUnitTests()
[all …]
DroundTripCrash.c71 …size_t const cSize = ZSTD_compress(compressedBuff, compressedBuffCapacity, srcBuff, srcBuffSize, c… in roundTripTest() local
72 if (ZSTD_isError(cSize)) { in roundTripTest()
73 fprintf(stderr, "Compression error : %s \n", ZSTD_getErrorName(cSize)); in roundTripTest()
74 return cSize; in roundTripTest()
76 return ZSTD_decompress(resultBuff, resultBuffCapacity, compressedBuff, cSize); in roundTripTest()
Dparamgrill.c468 w1.result.cSize = (size_t)-1; in initWinnerInfo()
554 && (!g_optmode || results.cSize <= g_lvltarget.cSize); in feasible()
572 rt = ((double)srcSize / res.cSize); in resultScore()
585 double normalizedRatioGain1 = ((double)lvlRes.cSize / result1.cSize) - 1; in resultDistLvl()
600 return (result1.cSize > result2.cSize) in compareResultLT()
601 || (result1.cSize == result2.cSize && result2.cSpeed > result1.cSpeed) in compareResultLT()
602 …|| (result1.cSize == result2.cSize && result2.cSpeed == result1.cSpeed && result2.dSpeed > result1… in compareResultLT()
732 if(r1.cSize >= r2.cSize) { in speedSizeCompare()
737 if(r1.cSize <= r2.cSize) { in speedSizeCompare()
856 { double const ratio = res.result.cSize ? in BMK_displayOneResult()
[all …]
/external/lz4/tests/
Dframetest.c181 size_t cSize, testSize; in basicTests() local
206 …CHECK_V(cSize, LZ4F_compressFrame(compressedBuffer, LZ4F_compressFrameBound(testSize, NULL), CNBuf… in basicTests()
207 DISPLAYLEVEL(3, "null content encoded into a %u bytes frame \n", (unsigned)cSize); in basicTests()
213 assert(cSize >= LZ4F_MIN_SIZE_TO_KNOW_HEADER_LENGTH); in basicTests()
233 …CHECK_V(cSize, LZ4F_compressFrame(compressedBuffer, LZ4F_compressFrameBound(testSize, NULL), CNBuf… in basicTests()
234 DISPLAYLEVEL(3, "Compressed %u bytes into a %u bytes frame \n", (U32)testSize, (U32)cSize); in basicTests()
238 …CHECK_V(cSize, LZ4F_compressFrame(compressedBuffer, LZ4F_compressFrameBound(testSize, NULL), CNBuf… in basicTests()
239 DISPLAYLEVEL(3, "Compressed %u bytes into a %u bytes frame \n", (U32)testSize, (U32)cSize); in basicTests()
243 size_t compressedBufferSize = cSize; in basicTests()
320 assert(cSize > 48); in basicTests()
[all …]
Dfuzzer.c399 { int cSize, srcSize = blockSize; in FUZ_test() local
403 cSize = LZ4_compress_destSize(block, compressedBuffer, &srcSize, targetSize); in FUZ_test()
404 … FUZ_CHECKTEST(cSize > targetSize, "LZ4_compress_destSize() result larger than dst buffer !"); in FUZ_test()
407 … DISPLAYLEVEL(5, "destSize : %7i/%7i; content%7i/%7i ", cSize, targetSize, srcSize, blockSize); in FUZ_test()
412 FUZ_CHECKTEST((cSize==0), "LZ4_compress_destSize() compression failed"); in FUZ_test()
415 … { int const dSize = LZ4_decompress_safe(compressedBuffer, decodedBuffer, cSize, srcSize); in FUZ_test()
428 { int cSize, srcSize = blockSize; in FUZ_test() local
434cSize = LZ4_compress_HC_destSize(ctx, block, compressedBuffer, &srcSize, targetSize, compressionLe… in FUZ_test()
436 compressionLevel, cSize, targetSize, srcSize, blockSize); in FUZ_test()
438 … FUZ_CHECKTEST(cSize > targetSize, "LZ4_compress_HC_destSize() result larger than dst buffer !"); in FUZ_test()
[all …]
/external/zstd/examples/
Dsimple_decompression.c18 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()
Ddictionary_decompression.c32 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()
Dsimple_compression.c28 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()
Ddictionary_compression.c45 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()
Dmultiple_simple_compression.c74 …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()
/external/lz4/ossfuzz/
Dround_trip_stream_fuzzer.c147 int const cSize = LZ4_compress_fast_continue(state->cstream, src, dst, in state_prefixRoundTrip() local
149 FUZZ_ASSERT(cSize > 0); in state_prefixRoundTrip()
151 state->compressed.pos += cSize; in state_prefixRoundTrip()
152 state_decompress(state, dst, cSize); in state_prefixRoundTrip()
168 int const cSize = LZ4_compress_fast_continue(state->cstream, src, dst, in state_extDictRoundTrip() local
170 FUZZ_ASSERT(cSize > 0); in state_extDictRoundTrip()
172 state->compressed.pos += cSize; in state_extDictRoundTrip()
173 state_decompress(state, dst, cSize); in state_extDictRoundTrip()
217 int const cSize = LZ4_compress_HC_continue(state->cstreamHC, src, dst, in state_prefixHCRoundTrip() local
219 FUZZ_ASSERT(cSize > 0); in state_prefixHCRoundTrip()
[all …]
/external/zstd/tests/fuzz/
Dsimple_round_trip.c34 size_t cSize; in roundTripTest() local
39 cSize = ZSTD_compress2(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest()
44 cSize = ZSTD_compressCCtx( in roundTripTest()
47 FUZZ_ZASSERT(cSize); in roundTripTest()
48 dSize = ZSTD_decompressDCtx(dctx, result, resultCapacity, compressed, cSize); in roundTripTest()
68 FUZZ_ASSERT(cSize <= normalCSize + allowedExpansion); in roundTripTest()
Ddictionary_round_trip.c36 size_t cSize; in roundTripTest() local
40 cSize = ZSTD_compress_usingDict(cctx, in roundTripTest()
59 cSize = ZSTD_compress2(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest()
61 FUZZ_ZASSERT(cSize); in roundTripTest()
73 dctx, result, resultCapacity, compressed, cSize); in roundTripTest()
Draw_dictionary_round_trip.c36 size_t cSize; in roundTripTest() local
50 cSize = ZSTD_compress2(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest()
51 FUZZ_ZASSERT(cSize); in roundTripTest()
64 dctx, result, resultCapacity, compressed, cSize); in roundTripTest()
Ddecompress_dstSize_tooSmall.c53 size_t const cSize = ZSTD_compressCCtx(cctx, cBuf, cBufSize, src, size, 1); in LLVMFuzzerTestOneInput() local
54 FUZZ_ZASSERT(cSize); in LLVMFuzzerTestOneInput()
55 size_t const rSize = ZSTD_decompressDCtx(dctx, rBuf, rBufSize, cBuf, cSize); in LLVMFuzzerTestOneInput()
Ddictionary_loader.c86 size_t const cSize = in LLVMFuzzerTestOneInput() local
89 if (ZSTD_isError(cSize)) { in LLVMFuzzerTestOneInput()
94 decompress(rBuf, size, cBuf, cSize, src, size, dlm, dct, refPrefix); in LLVMFuzzerTestOneInput()
/external/zstd/lib/compress/
Dhuf_compress.c96 …{ CHECK_V_F(cSize, FSE_compress_usingCTable(op, (size_t)(oend - op), weightTable, wtSize, CTable… in HUF_compressWeights()
97 if (cSize == 0) return 0; /* not enough space for compressed data */ in HUF_compressWeights()
98 op += cSize; in HUF_compressWeights()
672 …{ CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, C… in HUF_compress4X_usingCTable_internal()
673 if (cSize==0) return 0; in HUF_compress4X_usingCTable_internal()
674 assert(cSize <= 65535); in HUF_compress4X_usingCTable_internal()
675 MEM_writeLE16(ostart, (U16)cSize); in HUF_compress4X_usingCTable_internal()
676 op += cSize; in HUF_compress4X_usingCTable_internal()
681 …{ CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, C… in HUF_compress4X_usingCTable_internal()
682 if (cSize==0) return 0; in HUF_compress4X_usingCTable_internal()
[all …]
Dzstdmt_compress.c606 unsigned jobID, size_t cSize) in ZSTDMT_serialState_ensureFinished() argument
610 assert(ZSTD_isError(cSize)); (void)cSize; in ZSTDMT_serialState_ensureFinished()
633 …size_t cSize; /* SHARED - set0 by mtctx, then modified by worker AND read b… member
655 job->cSize = e; \
726 assert(job->cSize == 0); in ZSTDMT_compressionJob()
728 size_t const cSize = ZSTD_compressContinue(cctx, op, oend-op, ip, chunkSize); in ZSTDMT_compressionJob() local
729 if (ZSTD_isError(cSize)) JOB_ERROR(cSize); in ZSTDMT_compressionJob()
731 op += cSize; assert(op < oend); in ZSTDMT_compressionJob()
734 job->cSize += cSize; in ZSTDMT_compressionJob()
737 (U32)cSize, (U32)job->cSize); in ZSTDMT_compressionJob()
[all …]
Dzstd_compress_superblock.c358 …{ 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 …]
Dzstd_compress.c2186 size_t const cSize = ZSTD_compressLiterals( in ZSTD_entropyCompressSequences_internal() local
2194 FORWARD_IF_ERROR(cSize, "ZSTD_compressLiterals failed"); in ZSTD_entropyCompressSequences_internal()
2195 assert(cSize <= dstCapacity); in ZSTD_entropyCompressSequences_internal()
2196 op += cSize; in ZSTD_entropyCompressSequences_internal()
2350 size_t const cSize = ZSTD_entropyCompressSequences_internal( in ZSTD_entropyCompressSequences() local
2354 if (cSize == 0) return 0; in ZSTD_entropyCompressSequences()
2358 if ((cSize == ERROR(dstSize_tooSmall)) & (srcSize <= dstCapacity)) in ZSTD_entropyCompressSequences()
2360 FORWARD_IF_ERROR(cSize, "ZSTD_entropyCompressSequences_internal failed"); in ZSTD_entropyCompressSequences()
2364 if (cSize >= maxCSize) return 0; /* block not compressed */ in ZSTD_entropyCompressSequences()
2366 DEBUGLOG(4, "ZSTD_entropyCompressSequences() cSize: %zu\n", cSize); in ZSTD_entropyCompressSequences()
[all …]
/external/lz4/programs/
Dbench.c150 size_t cSize; member
234 size_t cSize = 0; in BMK_benchMem() local
262 blockTable[blockNb].cSize = rSize; in BMK_benchMem()
278 cSize = 0; in BMK_benchMem()
279 … { U32 blockNb; for (blockNb=0; blockNb<nbBlocks; blockNb++) cSize += blockTable[blockNb].cSize; } in BMK_benchMem()
280 cSize += !cSize; /* avoid div by 0 */ in BMK_benchMem()
281 ratio = (double)srcSize / (double)cSize; in BMK_benchMem()
284 marks[markNb], displayName, (U32)srcSize, (U32)cSize, ratio, in BMK_benchMem()
301 …Table[blockNb].cPtr, blockTable[blockNb].resPtr, (int)blockTable[blockNb].cSize, (int)blockTable[b… in BMK_benchMem()
324 marks[markNb], displayName, (U32)srcSize, (U32)cSize, ratio, in BMK_benchMem()
[all …]
/external/zstd/zlibWrapper/examples/
Dzwrapbench.c143 size_t cSize; member
209 size_t cSize = 0; in BMK_benchMem() local
256 blockTable[blockNb].cSize = rSize; in BMK_benchMem()
285 blockTable[blockNb].cSize = outBuffer.pos; in BMK_benchMem()
326 blockTable[blockNb].cSize = def.total_out; in BMK_benchMem()
359 blockTable[blockNb].cSize = def.total_out; in BMK_benchMem()
370 cSize = 0; in BMK_benchMem()
371 … { U32 blockNb; for (blockNb=0; blockNb<nbBlocks; blockNb++) cSize += blockTable[blockNb].cSize; } in BMK_benchMem()
372 ratio = (double)srcSize / (double)cSize; in BMK_benchMem()
375 marks[markNb], displayName, (unsigned)srcSize, (unsigned)cSize, ratio, in BMK_benchMem()
[all …]
/external/zstd/programs/
Dbenchzstd.c154 size_t cSize; member
320 size_t cSize = 0; in BMK_benchMemAdvancedNoAlloc() local
350 cSize = srcSize; in BMK_benchMemAdvancedNoAlloc()
352 ratio = (double)srcSize / (double)cSize; in BMK_benchMemAdvancedNoAlloc()
379 benchResult.cSize = thisBlockSize; in BMK_benchMemAdvancedNoAlloc()
450 cSize = cResult.sumOfReturn; in BMK_benchMemAdvancedNoAlloc()
451 ratio = (double)srcSize / cSize; in BMK_benchMemAdvancedNoAlloc()
454 benchResult.cSize = cSize; in BMK_benchMemAdvancedNoAlloc()
462 (unsigned)srcSize, (unsigned)cSize, in BMK_benchMemAdvancedNoAlloc()
485 (unsigned)srcSize, (unsigned)cSize, in BMK_benchMemAdvancedNoAlloc()
[all …]

123