Lines Matching full:srcsize
220 size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr)
232 if (srcSize <= maxBlockSize)
244 streamSize = LZ4F_compressBound(srcSize, &prefs);
259 size_t LZ4F_compressFrame(void* dstBuffer, size_t dstMaxSize, const void* srcBuffer, size_t srcSize, const LZ4F_preferences_t* preferencesPtr)
279 if (srcSize <= maxBlockSize)
289 if (srcSize <= LZ4F_getBlockSize(prefs.frameInfo.blockSizeID))
294 if (dstMaxSize < LZ4F_compressFrameBound(srcSize, &prefs))
302 errorCode = LZ4F_compressUpdate(&cctxI, dstPtr, dstMaxSize, srcBuffer, srcSize, &options);
433 /* LZ4F_compressBound() : gives the size of Dst buffer given a srcSize to handle worst case situations.
437 size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr)
443 unsigned nbBlocks = (unsigned)(srcSize / blockSize) + 1;
444 size_t lastBlockSize = prefsPtr->autoFlush ? srcSize % blockSize : blockSize;
453 typedef int (*compressFunc_t)(void* ctx, const char* src, char* dst, int srcSize, int dstSize, int level);
455 static size_t LZ4F_compressBlock(void* dst, const void* src, size_t srcSize, compressFunc_t compress, void* lz4ctx, int level)
460 cSize = (U32)compress(lz4ctx, (const char*)src, (char*)(cSizePtr+4), (int)(srcSize), (int)(srcSize-1), level);
464 cSize = (U32)srcSize;
466 memcpy(cSizePtr+4, src, srcSize);
472 static int LZ4F_localLZ4_compress_limitedOutput_withState(void* ctx, const char* src, char* dst, int srcSize, int dstSize, int level)
475 return LZ4_compress_limitedOutput_withState(ctx, src, dst, srcSize, dstSize);
478 static int LZ4F_localLZ4_compress_limitedOutput_continue(void* ctx, const char* src, char* dst, int srcSize, int dstSize, int level)
481 return LZ4_compress_limitedOutput_continue((LZ4_stream_t*)ctx, src, dst, srcSize, dstSize);
484 static int LZ4F_localLZ4_compressHC_limitedOutput_continue(void* ctx, const char* src, char* dst, int srcSize, int dstSize, int level)
487 return LZ4_compressHC_limitedOutput_continue((LZ4_streamHC_t*)ctx, src, dst, srcSize, dstSize);
519 size_t LZ4F_compressUpdate(LZ4F_compressionContext_t compressionContext, void* dstBuffer, size_t dstMaxSize, const void* srcBuffer, size_t srcSize, const LZ4F_compressOptions_t* compressOptionsPtr)
525 const BYTE* const srcEnd = srcPtr + srcSize;
533 if (dstMaxSize < LZ4F_compressBound(srcSize, &(cctxPtr->prefs))) return (size_t)-ERROR_dstMaxSize_tooSmall;
543 if (sizeToCopy > srcSize)
546 memcpy(cctxPtr->tmpIn + cctxPtr->tmpInSize, srcBuffer, srcSize);
548 cctxPtr->tmpInSize += srcSize;
614 XXH32_update(&(cctxPtr->xxh), srcBuffer, (unsigned)srcSize);
735 static size_t LZ4F_decodeHeader(LZ4F_dctx_internal_t* dctxPtr, const BYTE* srcPtr, size_t srcSize)
742 if (srcSize < 7) return (size_t)-ERROR_GENERIC; /* minimal header size */
822 * The function result is an hint of the better srcSize to use for next call to LZ4F_decompress,
942 * The function result is an hint of the better srcSize to use for next call to LZ4F_decompress.
945 * Note that this is just a hint, you can always provide any srcSize you want.