Lines Matching refs:pledgedSrcSize

1166 size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize)  in ZSTD_CCtx_setPledgedSrcSize()  argument
1168 DEBUGLOG(4, "ZSTD_CCtx_setPledgedSrcSize to %llu bytes", pledgedSrcSize); in ZSTD_CCtx_setPledgedSrcSize()
1171 cctx->pledgedSrcSizePlusOne = pledgedSrcSize+1; in ZSTD_CCtx_setPledgedSrcSize()
1645 const U64 pledgedSrcSize, in ZSTD_estimateCCtxSize_usingCCtxParams_internal() argument
1649 size_t const windowSize = (size_t) BOUNDED(1ULL, 1ULL << cParams->windowLog, pledgedSrcSize); in ZSTD_estimateCCtxSize_usingCCtxParams_internal()
2028 U64 const pledgedSrcSize, in ZSTD_resetCCtx_internal() argument
2035 …(U32)pledgedSrcSize, params->cParams.windowLog, (int)params->useRowMatchFinder, (int)params->postB… in ZSTD_resetCCtx_internal()
2057 …ze_t const windowSize = MAX(1, (size_t)MIN(((U64)1 << params->cParams.windowLog), pledgedSrcSize)); in ZSTD_resetCCtx_internal()
2076 … buffInSize, buffOutSize, pledgedSrcSize, ZSTD_hasExtSeqProd(params), params->maxBlockSize); in ZSTD_resetCCtx_internal()
2120 zc->pledgedSrcSizePlusOne = pledgedSrcSize+1; in ZSTD_resetCCtx_internal()
2123 if (pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN) in ZSTD_resetCCtx_internal()
2126 (unsigned)pledgedSrcSize, zc->appliedParams.fParams.contentSizeFlag); in ZSTD_resetCCtx_internal()
2237 U64 pledgedSrcSize) in ZSTD_shouldAttachDict() argument
2242 || ( ( pledgedSrcSize <= cutoff in ZSTD_shouldAttachDict()
2243 || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN in ZSTD_shouldAttachDict()
2254 U64 pledgedSrcSize, in ZSTD_resetCCtx_byAttachingCDict() argument
2258 (unsigned long long)pledgedSrcSize); in ZSTD_resetCCtx_byAttachingCDict()
2271 params.cParams = ZSTD_adjustCParams_internal(adjusted_cdict_cParams, pledgedSrcSize, in ZSTD_resetCCtx_byAttachingCDict()
2276 FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, &params, pledgedSrcSize, in ZSTD_resetCCtx_byAttachingCDict()
2331 U64 pledgedSrcSize, in ZSTD_resetCCtx_byCopyingCDict() argument
2338 (unsigned long long)pledgedSrcSize); in ZSTD_resetCCtx_byCopyingCDict()
2346 FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, &params, pledgedSrcSize, in ZSTD_resetCCtx_byCopyingCDict()
2416 U64 pledgedSrcSize, in ZSTD_resetCCtx_usingCDict() argument
2421 (unsigned)pledgedSrcSize); in ZSTD_resetCCtx_usingCDict()
2423 if (ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) { in ZSTD_resetCCtx_usingCDict()
2425 cctx, cdict, *params, pledgedSrcSize, zbuff); in ZSTD_resetCCtx_usingCDict()
2428 cctx, cdict, *params, pledgedSrcSize, zbuff); in ZSTD_resetCCtx_usingCDict()
2442 U64 pledgedSrcSize, in ZSTD_copyCCtx_internal() argument
2460 ZSTD_resetCCtx_internal(dstCCtx, &params, pledgedSrcSize, in ZSTD_copyCCtx_internal()
2517 …ze_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx, unsigned long long pledgedSrcSize) in ZSTD_copyCCtx() argument
2522 if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN; in ZSTD_copyCCtx()
2523 fParams.contentSizeFlag = (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN); in ZSTD_copyCCtx()
2526 fParams, pledgedSrcSize, in ZSTD_copyCCtx()
4611 U64 pledgedSrcSize, U32 dictID) in ZSTD_writeFrameHeader() argument
4618 U32 const singleSegment = params->fParams.contentSizeFlag && (windowSize >= pledgedSrcSize); in ZSTD_writeFrameHeader()
4621 …(pledgedSrcSize>=256) + (pledgedSrcSize>=65536+256) + (pledgedSrcSize>=0xFFFFFFFFU) : 0; /* 0-3 */ in ZSTD_writeFrameHeader()
4625 assert(!(params->fParams.contentSizeFlag && pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN)); in ZSTD_writeFrameHeader()
4651 case 0 : if (singleSegment) op[pos++] = (BYTE)(pledgedSrcSize); break; in ZSTD_writeFrameHeader()
4652 case 1 : MEM_writeLE16(op+pos, (U16)(pledgedSrcSize-256)); pos+=2; break; in ZSTD_writeFrameHeader()
4653 case 2 : MEM_writeLE32(op+pos, (U32)(pledgedSrcSize)); pos+=4; break; in ZSTD_writeFrameHeader()
4654 case 3 : MEM_writeLE64(op+pos, (U64)(pledgedSrcSize)); pos+=8; break; in ZSTD_writeFrameHeader()
5157 const ZSTD_CCtx_params* params, U64 pledgedSrcSize, in ZSTD_compressBegin_internal() argument
5167 && ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF in ZSTD_compressBegin_internal()
5168 || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER in ZSTD_compressBegin_internal()
5169 || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN in ZSTD_compressBegin_internal()
5172 return ZSTD_resetCCtx_usingCDict(cctx, cdict, params, pledgedSrcSize, zbuff); in ZSTD_compressBegin_internal()
5175 FORWARD_IF_ERROR( ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize, in ZSTD_compressBegin_internal()
5202 unsigned long long pledgedSrcSize) in ZSTD_compressBegin_advanced_internal() argument
5210 params, pledgedSrcSize, in ZSTD_compressBegin_advanced_internal()
5218 ZSTD_parameters params, unsigned long long pledgedSrcSize) in ZSTD_compressBegin_advanced() argument
5225 &cctxParams, pledgedSrcSize); in ZSTD_compressBegin_advanced()
5711 ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) in ZSTD_compressBegin_usingCDict_internal() argument
5720 params.cParams = ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF in ZSTD_compressBegin_usingCDict_internal()
5721 … || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER in ZSTD_compressBegin_usingCDict_internal()
5722 || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN in ZSTD_compressBegin_usingCDict_internal()
5726 pledgedSrcSize, in ZSTD_compressBegin_usingCDict_internal()
5734 if (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN) { in ZSTD_compressBegin_usingCDict_internal()
5735 U32 const limitedSrcSize = (U32)MIN(pledgedSrcSize, 1U << 19); in ZSTD_compressBegin_usingCDict_internal()
5742 &cctxParams, pledgedSrcSize, in ZSTD_compressBegin_usingCDict_internal()
5752 ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) in ZSTD_compressBegin_usingCDict_advanced() argument
5754 return ZSTD_compressBegin_usingCDict_internal(cctx, cdict, fParams, pledgedSrcSize); in ZSTD_compressBegin_usingCDict_advanced()
5845 …e_e ZSTD_getCParamMode(ZSTD_CDict const* cdict, ZSTD_CCtx_params const* params, U64 pledgedSrcSize) in ZSTD_getCParamMode() argument
5847 if (cdict != NULL && ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) in ZSTD_getCParamMode()
5861 U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; in ZSTD_resetCStream() local
5862 DEBUGLOG(4, "ZSTD_resetCStream: pledgedSrcSize = %u", (unsigned)pledgedSrcSize); in ZSTD_resetCStream()
5864 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_resetCStream()
5875 unsigned long long pledgedSrcSize) in ZSTD_initCStream_internal() argument
5879 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_internal()
5897 unsigned long long pledgedSrcSize) in ZSTD_initCStream_usingCDict_advanced() argument
5901 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_usingCDict_advanced()
5929 …U64 const pledgedSrcSize = (pss==0 && params.fParams.contentSizeFlag==0) ? ZSTD_CONTENTSIZE_UNKNOW… in ZSTD_initCStream_advanced() local
5932 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_advanced()
5954 U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; in ZSTD_initCStream_srcSize() local
5959 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_srcSize()
6264 { U64 const pledgedSrcSize = cctx->pledgedSrcSizePlusOne - 1; in ZSTD_CCtx_init_compressStream2() local
6269 &params, pledgedSrcSize, in ZSTD_CCtx_init_compressStream2()
6278 cctx->inBuffTarget = cctx->blockSizeMax + (cctx->blockSizeMax == pledgedSrcSize); in ZSTD_CCtx_init_compressStream2()