Lines Matching refs:zcs

187 size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs)  in ZSTD_sizeof_CStream()  argument
189 return ZSTD_sizeof_CCtx(zcs); /* same object */ in ZSTD_sizeof_CStream()
3937 size_t ZSTD_freeCStream(ZSTD_CStream* zcs) in ZSTD_freeCStream() argument
3939 return ZSTD_freeCCtx(zcs); /* same object */ in ZSTD_freeCStream()
3963 size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pss) in ZSTD_resetCStream() argument
3971 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_resetCStream()
3972 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_resetCStream()
3980 size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs, in ZSTD_initCStream_internal() argument
3986 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_initCStream_internal()
3987 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_internal()
3989 zcs->requestedParams = *params; in ZSTD_initCStream_internal()
3992 FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); in ZSTD_initCStream_internal()
3995 FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); in ZSTD_initCStream_internal()
4002 size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, in ZSTD_initCStream_usingCDict_advanced() argument
4008 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_initCStream_usingCDict_advanced()
4009 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_usingCDict_advanced()
4010 zcs->requestedParams.fParams = fParams; in ZSTD_initCStream_usingCDict_advanced()
4011 FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); in ZSTD_initCStream_usingCDict_advanced()
4016 size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict) in ZSTD_initCStream_usingCDict() argument
4019 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_initCStream_usingCDict()
4020 FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); in ZSTD_initCStream_usingCDict()
4029 size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs, in ZSTD_initCStream_advanced() argument
4039 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_initCStream_advanced()
4040 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_advanced()
4042 ZSTD_CCtxParams_setZstdParams(&zcs->requestedParams, &params); in ZSTD_initCStream_advanced()
4043 FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); in ZSTD_initCStream_advanced()
4047 size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compres… in ZSTD_initCStream_usingDict() argument
4050 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_initCStream_usingDict()
4051 FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); in ZSTD_initCStream_usingDict()
4052 FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); in ZSTD_initCStream_usingDict()
4056 size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigned long long pss) in ZSTD_initCStream_srcSize() argument
4064 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_initCStream_srcSize()
4065 FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); in ZSTD_initCStream_srcSize()
4066 FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); in ZSTD_initCStream_srcSize()
4067 FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); in ZSTD_initCStream_srcSize()
4071 size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel) in ZSTD_initCStream() argument
4074 FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); in ZSTD_initCStream()
4075 FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); in ZSTD_initCStream()
4076 FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); in ZSTD_initCStream()
4093 static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, in ZSTD_compressStream_generic() argument
4108 if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) { in ZSTD_compressStream_generic()
4109 assert(zcs->inBuff != NULL); in ZSTD_compressStream_generic()
4110 assert(zcs->inBuffSize > 0); in ZSTD_compressStream_generic()
4112 if (zcs->appliedParams.outBufferMode == ZSTD_bm_buffered) { in ZSTD_compressStream_generic()
4113 assert(zcs->outBuff != NULL); in ZSTD_compressStream_generic()
4114 assert(zcs->outBuffSize > 0); in ZSTD_compressStream_generic()
4121 switch(zcs->streamStage) in ZSTD_compressStream_generic()
4129 …|| zcs->appliedParams.outBufferMode == ZSTD_bm_stable) /* OR we are allowed to return dstSizeTooS… in ZSTD_compressStream_generic()
4130 && (zcs->inBuffPos == 0) ) { in ZSTD_compressStream_generic()
4132 size_t const cSize = ZSTD_compressEnd(zcs, in ZSTD_compressStream_generic()
4138 zcs->frameEnded = 1; in ZSTD_compressStream_generic()
4139 ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); in ZSTD_compressStream_generic()
4143 if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) { in ZSTD_compressStream_generic()
4144 size_t const toLoad = zcs->inBuffTarget - zcs->inBuffPos; in ZSTD_compressStream_generic()
4146 zcs->inBuff + zcs->inBuffPos, toLoad, in ZSTD_compressStream_generic()
4148 zcs->inBuffPos += loaded; in ZSTD_compressStream_generic()
4152 && (zcs->inBuffPos < zcs->inBuffTarget) ) { in ZSTD_compressStream_generic()
4157 && (zcs->inBuffPos == zcs->inToCompress) ) { in ZSTD_compressStream_generic()
4164 { int const inputBuffered = (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered); in ZSTD_compressStream_generic()
4169 ? zcs->inBuffPos - zcs->inToCompress in ZSTD_compressStream_generic()
4170 : MIN((size_t)(iend - ip), zcs->blockSize); in ZSTD_compressStream_generic()
4171 … if (oSize >= ZSTD_compressBound(iSize) || zcs->appliedParams.outBufferMode == ZSTD_bm_stable) in ZSTD_compressStream_generic()
4174 cDst = zcs->outBuff, oSize = zcs->outBuffSize; in ZSTD_compressStream_generic()
4178 ZSTD_compressEnd(zcs, cDst, oSize, in ZSTD_compressStream_generic()
4179 zcs->inBuff + zcs->inToCompress, iSize) : in ZSTD_compressStream_generic()
4180 ZSTD_compressContinue(zcs, cDst, oSize, in ZSTD_compressStream_generic()
4181 zcs->inBuff + zcs->inToCompress, iSize); in ZSTD_compressStream_generic()
4183 zcs->frameEnded = lastBlock; in ZSTD_compressStream_generic()
4185 zcs->inBuffTarget = zcs->inBuffPos + zcs->blockSize; in ZSTD_compressStream_generic()
4186 if (zcs->inBuffTarget > zcs->inBuffSize) in ZSTD_compressStream_generic()
4187 zcs->inBuffPos = 0, zcs->inBuffTarget = zcs->blockSize; in ZSTD_compressStream_generic()
4189 (unsigned)zcs->inBuffTarget, (unsigned)zcs->inBuffSize); in ZSTD_compressStream_generic()
4191 assert(zcs->inBuffTarget <= zcs->inBuffSize); in ZSTD_compressStream_generic()
4192 zcs->inToCompress = zcs->inBuffPos; in ZSTD_compressStream_generic()
4197 ZSTD_compressEnd(zcs, cDst, oSize, ip, iSize) : in ZSTD_compressStream_generic()
4198 ZSTD_compressContinue(zcs, cDst, oSize, ip, iSize); in ZSTD_compressStream_generic()
4203 zcs->frameEnded = lastBlock; in ZSTD_compressStream_generic()
4209 if (zcs->frameEnded) { in ZSTD_compressStream_generic()
4212 ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); in ZSTD_compressStream_generic()
4216 zcs->outBuffContentSize = cSize; in ZSTD_compressStream_generic()
4217 zcs->outBuffFlushedSize = 0; in ZSTD_compressStream_generic()
4218 zcs->streamStage = zcss_flush; /* pass-through to flush stage */ in ZSTD_compressStream_generic()
4223 assert(zcs->appliedParams.outBufferMode == ZSTD_bm_buffered); in ZSTD_compressStream_generic()
4224 { size_t const toFlush = zcs->outBuffContentSize - zcs->outBuffFlushedSize; in ZSTD_compressStream_generic()
4226 zcs->outBuff + zcs->outBuffFlushedSize, toFlush); in ZSTD_compressStream_generic()
4231 zcs->outBuffFlushedSize += flushed; in ZSTD_compressStream_generic()
4238 zcs->outBuffContentSize = zcs->outBuffFlushedSize = 0; in ZSTD_compressStream_generic()
4239 if (zcs->frameEnded) { in ZSTD_compressStream_generic()
4242 ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); in ZSTD_compressStream_generic()
4245 zcs->streamStage = zcss_load; in ZSTD_compressStream_generic()
4256 if (zcs->frameEnded) return 0; in ZSTD_compressStream_generic()
4257 return ZSTD_nextInputSizeHint(zcs); in ZSTD_compressStream_generic()
4266 size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input) in ZSTD_compressStream() argument
4268 FORWARD_IF_ERROR( ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue) , ""); in ZSTD_compressStream()
4269 return ZSTD_nextInputSizeHint_MTorST(zcs); in ZSTD_compressStream()
4840 size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) in ZSTD_flushStream() argument
4843 return ZSTD_compressStream2(zcs, output, &input, ZSTD_e_flush); in ZSTD_flushStream()
4847 size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) in ZSTD_endStream() argument
4850 size_t const remainingToFlush = ZSTD_compressStream2(zcs, output, &input, ZSTD_e_end); in ZSTD_endStream()
4852 if (zcs->appliedParams.nbWorkers > 0) return remainingToFlush; /* minimal estimation */ in ZSTD_endStream()
4854 { size_t const lastBlockSize = zcs->frameEnded ? 0 : ZSTD_BLOCKHEADERSIZE; in ZSTD_endStream()
4855 …size_t const checksumSize = (size_t)(zcs->frameEnded ? 0 : zcs->appliedParams.fParams.checksumFlag… in ZSTD_endStream()