Lines Matching refs:dstCapacity
366 * Provides dstCapacity given a srcSize to guarantee operation success in worst case situations.
421 void* dstBuffer, size_t dstCapacity,
430 BYTE* const dstEnd = dstStart + dstCapacity;
447 RETURN_ERROR_IF(dstCapacity < LZ4F_compressFrameBound(srcSize, &prefs), dstMaxSize_tooSmall);
449 { size_t const headerSize = LZ4F_compressBegin_usingCDict(cctx, dstBuffer, dstCapacity, cdict, &prefs); /* write header */
475 size_t LZ4F_compressFrame(void* dstBuffer, size_t dstCapacity,
502 result = LZ4F_compressFrame_usingCDict(cctxPtr, dstBuffer, dstCapacity,
673 * @dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes.
678 void* dstBuffer, size_t dstCapacity,
686 RETURN_ERROR_IF(dstCapacity < maxFHSize, dstMaxSize_tooSmall);
790 * @dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes.
796 void* dstBuffer, size_t dstCapacity,
799 return LZ4F_compressBegin_usingCDict(cctxPtr, dstBuffer, dstCapacity,
853 static int LZ4F_compressBlock(void* ctx, const char* src, char* dst, int srcSize, int dstCapacity, int level, const LZ4F_CDict* cdict)
859 return LZ4_compress_fast_continue((LZ4_stream_t*)ctx, src, dst, srcSize, dstCapacity, acceleration);
861 return LZ4_compress_fast_extState_fastReset(ctx, src, dst, srcSize, dstCapacity, acceleration);
865 static int LZ4F_compressBlock_continue(void* ctx, const char* src, char* dst, int srcSize, int dstCapacity, int level, const LZ4F_CDict* cdict)
870 return LZ4_compress_fast_continue((LZ4_stream_t*)ctx, src, dst, srcSize, dstCapacity, acceleration);
873 static int LZ4F_compressBlockHC(void* ctx, const char* src, char* dst, int srcSize, int dstCapacity, int level, const LZ4F_CDict* cdict)
877 return LZ4_compress_HC_continue((LZ4_streamHC_t*)ctx, src, dst, srcSize, dstCapacity);
879 return LZ4_compress_HC_extStateHC_fastReset(ctx, src, dst, srcSize, dstCapacity, level);
882 static int LZ4F_compressBlockHC_continue(void* ctx, const char* src, char* dst, int srcSize, int dstCapacity, int level, const LZ4F_CDict* cdict)
885 return LZ4_compress_HC_continue((LZ4_streamHC_t*)ctx, src, dst, srcSize, dstCapacity);
888 static int LZ4F_doNotCompressBlock(void* ctx, const char* src, char* dst, int srcSize, int dstCapacity, int level, const LZ4F_CDict* cdict)
890 (void)ctx; (void)src; (void)dst; (void)srcSize; (void)dstCapacity; (void)level; (void)cdict;
924 * @dstCapacity MUST be >= LZ4F_compressBound(srcSize, preferencesPtr) when block compression is turned on.
931 void* dstBuffer, size_t dstCapacity,
947 if (dstCapacity < LZ4F_compressBound_internal(srcSize, &(cctxPtr->prefs), cctxPtr->tmpInSize))
950 if (blockCompression == LZ4B_UNCOMPRESSED && dstCapacity < srcSize)
955 bytesWritten = LZ4F_flush(cctxPtr, dstBuffer, dstCapacity, compressOptionsPtr);
1054 * @dstCapacity MUST be >= LZ4F_compressBound(srcSize, preferencesPtr).
1061 void* dstBuffer, size_t dstCapacity,
1066 dstBuffer, dstCapacity,
1078 * @dstCapacity MUST be >= LZ4F_compressBound(srcSize, preferencesPtr).
1085 void* dstBuffer, size_t dstCapacity,
1090 dstBuffer, dstCapacity,
1105 void* dstBuffer, size_t dstCapacity,
1114 RETURN_ERROR_IF(dstCapacity < (cctxPtr->tmpInSize + BHSize + BFSize), dstMaxSize_tooSmall);
1126 assert(((void)"flush overflows dstBuffer!", (size_t)(dstPtr - dstStart) <= dstCapacity));
1152 void* dstBuffer, size_t dstCapacity,
1158 size_t const flushSize = LZ4F_flush(cctxPtr, dstBuffer, dstCapacity, compressOptionsPtr);
1159 DEBUGLOG(5,"LZ4F_compressEnd: dstCapacity=%u", (unsigned)dstCapacity);
1163 assert(flushSize <= dstCapacity);
1164 dstCapacity -= flushSize;
1166 RETURN_ERROR_IF(dstCapacity < 4, dstMaxSize_tooSmall);
1172 RETURN_ERROR_IF(dstCapacity < 8, dstMaxSize_tooSmall);