Lines Matching refs:pledgedSrcSize
892 ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize) in ZSTD_CCtx_setPledgedSrcSize() argument
894 DEBUGLOG(4, "ZSTD_CCtx_setPledgedSrcSize to %u bytes", (U32)pledgedSrcSize); in ZSTD_CCtx_setPledgedSrcSize()
897 cctx->pledgedSrcSizePlusOne = pledgedSrcSize+1; in ZSTD_CCtx_setPledgedSrcSize()
1264 const U64 pledgedSrcSize) in ZSTD_estimateCCtxSize_usingCCtxParams_internal() argument
1266 size_t const windowSize = MAX(1, (size_t)MIN(((U64)1 << cParams->windowLog), pledgedSrcSize)); in ZSTD_estimateCCtxSize_usingCCtxParams_internal()
1560 U64 const pledgedSrcSize, in ZSTD_resetCCtx_internal() argument
1566 (U32)pledgedSrcSize, params.cParams.windowLog); in ZSTD_resetCCtx_internal()
1578 …ize_t const windowSize = MAX(1, (size_t)MIN(((U64)1 << params.cParams.windowLog), pledgedSrcSize)); in ZSTD_resetCCtx_internal()
1597 buffInSize, buffOutSize, pledgedSrcSize); in ZSTD_resetCCtx_internal()
1640 zc->pledgedSrcSizePlusOne = pledgedSrcSize+1; in ZSTD_resetCCtx_internal()
1643 if (pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN) in ZSTD_resetCCtx_internal()
1646 (unsigned)pledgedSrcSize, zc->appliedParams.fParams.contentSizeFlag); in ZSTD_resetCCtx_internal()
1751 U64 pledgedSrcSize) in ZSTD_shouldAttachDict() argument
1756 || ( ( pledgedSrcSize <= cutoff in ZSTD_shouldAttachDict()
1757 || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN in ZSTD_shouldAttachDict()
1768 U64 pledgedSrcSize, in ZSTD_resetCCtx_byAttachingCDict() argument
1783 params.cParams = ZSTD_adjustCParams_internal(adjusted_cdict_cParams, pledgedSrcSize, in ZSTD_resetCCtx_byAttachingCDict()
1786 FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize, in ZSTD_resetCCtx_byAttachingCDict()
1824 U64 pledgedSrcSize, in ZSTD_resetCCtx_byCopyingCDict() argument
1838 FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize, in ZSTD_resetCCtx_byCopyingCDict()
1891 U64 pledgedSrcSize, in ZSTD_resetCCtx_usingCDict() argument
1896 (unsigned)pledgedSrcSize); in ZSTD_resetCCtx_usingCDict()
1898 if (ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) { in ZSTD_resetCCtx_usingCDict()
1900 cctx, cdict, *params, pledgedSrcSize, zbuff); in ZSTD_resetCCtx_usingCDict()
1903 cctx, cdict, *params, pledgedSrcSize, zbuff); in ZSTD_resetCCtx_usingCDict()
1917 U64 pledgedSrcSize, in ZSTD_copyCCtx_internal() argument
1929 ZSTD_resetCCtx_internal(dstCCtx, params, pledgedSrcSize, in ZSTD_copyCCtx_internal()
1981 …ze_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx, unsigned long long pledgedSrcSize) in ZSTD_copyCCtx() argument
1986 if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN; in ZSTD_copyCCtx()
1987 fParams.contentSizeFlag = (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN); in ZSTD_copyCCtx()
1990 fParams, pledgedSrcSize, in ZSTD_copyCCtx()
2863 const ZSTD_CCtx_params* params, U64 pledgedSrcSize, U32 dictID) in ZSTD_writeFrameHeader() argument
2869 U32 const singleSegment = params->fParams.contentSizeFlag && (windowSize >= pledgedSrcSize); in ZSTD_writeFrameHeader()
2872 …(pledgedSrcSize>=256) + (pledgedSrcSize>=65536+256) + (pledgedSrcSize>=0xFFFFFFFFU) : 0; /* 0-3 */ in ZSTD_writeFrameHeader()
2876 assert(!(params->fParams.contentSizeFlag && pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN)); in ZSTD_writeFrameHeader()
2902 case 0 : if (singleSegment) op[pos++] = (BYTE)(pledgedSrcSize); break; in ZSTD_writeFrameHeader()
2903 case 1 : MEM_writeLE16(op+pos, (U16)(pledgedSrcSize-256)); pos+=2; break; in ZSTD_writeFrameHeader()
2904 case 2 : MEM_writeLE32(op+pos, (U32)(pledgedSrcSize)); pos+=4; break; in ZSTD_writeFrameHeader()
2905 case 3 : MEM_writeLE64(op+pos, (U64)(pledgedSrcSize)); pos+=8; break; in ZSTD_writeFrameHeader()
3321 const ZSTD_CCtx_params* params, U64 pledgedSrcSize, in ZSTD_compressBegin_internal() argument
3330 && ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF in ZSTD_compressBegin_internal()
3331 || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER in ZSTD_compressBegin_internal()
3332 || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN in ZSTD_compressBegin_internal()
3335 return ZSTD_resetCCtx_usingCDict(cctx, cdict, params, pledgedSrcSize, zbuff); in ZSTD_compressBegin_internal()
3338 FORWARD_IF_ERROR( ZSTD_resetCCtx_internal(cctx, *params, pledgedSrcSize, in ZSTD_compressBegin_internal()
3364 unsigned long long pledgedSrcSize) in ZSTD_compressBegin_advanced_internal() argument
3372 params, pledgedSrcSize, in ZSTD_compressBegin_advanced_internal()
3380 ZSTD_parameters params, unsigned long long pledgedSrcSize) in ZSTD_compressBegin_advanced() argument
3387 &cctxParams, pledgedSrcSize); in ZSTD_compressBegin_advanced()
3847 ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) in ZSTD_compressBegin_usingCDict_advanced() argument
3856 params.cParams = ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF in ZSTD_compressBegin_usingCDict_advanced()
3857 … || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER in ZSTD_compressBegin_usingCDict_advanced()
3858 || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN in ZSTD_compressBegin_usingCDict_advanced()
3862 pledgedSrcSize, in ZSTD_compressBegin_usingCDict_advanced()
3870 if (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN) { in ZSTD_compressBegin_usingCDict_advanced()
3871 U32 const limitedSrcSize = (U32)MIN(pledgedSrcSize, 1U << 19); in ZSTD_compressBegin_usingCDict_advanced()
3878 &cctxParams, pledgedSrcSize, in ZSTD_compressBegin_usingCDict_advanced()
3953 …e_e ZSTD_getCParamMode(ZSTD_CDict const* cdict, ZSTD_CCtx_params const* params, U64 pledgedSrcSize) in ZSTD_getCParamMode() argument
3955 if (cdict != NULL && ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) in ZSTD_getCParamMode()
3969 U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; in ZSTD_resetCStream() local
3970 DEBUGLOG(4, "ZSTD_resetCStream: pledgedSrcSize = %u", (unsigned)pledgedSrcSize); in ZSTD_resetCStream()
3972 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_resetCStream()
3983 unsigned long long pledgedSrcSize) in ZSTD_initCStream_internal() argument
3987 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_internal()
4005 unsigned long long pledgedSrcSize) in ZSTD_initCStream_usingCDict_advanced() argument
4009 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_usingCDict_advanced()
4037 …U64 const pledgedSrcSize = (pss==0 && params.fParams.contentSizeFlag==0) ? ZSTD_CONTENTSIZE_UNKNOW… in ZSTD_initCStream_advanced() local
4040 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_advanced()
4062 U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; in ZSTD_initCStream_srcSize() local
4067 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_srcSize()
4336 { U64 const pledgedSrcSize = cctx->pledgedSrcSizePlusOne - 1; in ZSTD_CCtx_init_compressStream2() local
4341 ¶ms, pledgedSrcSize, in ZSTD_CCtx_init_compressStream2()
4350 cctx->inBuffTarget = cctx->blockSize + (cctx->blockSize == pledgedSrcSize); in ZSTD_CCtx_init_compressStream2()