Lines Matching refs:srcSize

378 static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format)  in ZSTD_frameHeaderSize_internal()  argument
381 RETURN_ERROR_IF(srcSize < minInputSize, srcSize_wrong, ""); in ZSTD_frameHeaderSize_internal()
397 size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize) in ZSTD_frameHeaderSize() argument
399 return ZSTD_frameHeaderSize_internal(src, srcSize, ZSTD_f_zstd1); in ZSTD_frameHeaderSize()
409 size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD… in ZSTD_getFrameHeader_advanced() argument
415 if (srcSize < minInputSize) return minInputSize; in ZSTD_getFrameHeader_advanced()
422 if (srcSize < ZSTD_SKIPPABLEHEADERSIZE) in ZSTD_getFrameHeader_advanced()
433 { size_t const fhsize = ZSTD_frameHeaderSize_internal(src, srcSize, format); in ZSTD_getFrameHeader_advanced()
434 if (srcSize < fhsize) return fhsize; in ZSTD_getFrameHeader_advanced()
495 size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize) in ZSTD_getFrameHeader() argument
497 return ZSTD_getFrameHeader_advanced(zfhPtr, src, srcSize, ZSTD_f_zstd1); in ZSTD_getFrameHeader()
506 unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize) in ZSTD_getFrameContentSize() argument
509 if (ZSTD_getFrameHeader(&zfh, src, srcSize) != 0) in ZSTD_getFrameContentSize()
518 static size_t readSkippableFrameSize(void const* src, size_t srcSize) in readSkippableFrameSize() argument
523 RETURN_ERROR_IF(srcSize < ZSTD_SKIPPABLEHEADERSIZE, srcSize_wrong, ""); in readSkippableFrameSize()
530 RETURN_ERROR_IF(skippableSize > srcSize, srcSize_wrong, ""); in readSkippableFrameSize()
540 unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize) in ZSTD_findDecompressedSize() argument
544 while (srcSize >= ZSTD_startingInputLength(ZSTD_f_zstd1)) { in ZSTD_findDecompressedSize()
548 size_t const skippableSize = readSkippableFrameSize(src, srcSize); in ZSTD_findDecompressedSize()
552 assert(skippableSize <= srcSize); in ZSTD_findDecompressedSize()
555 srcSize -= skippableSize; in ZSTD_findDecompressedSize()
559 { unsigned long long const ret = ZSTD_getFrameContentSize(src, srcSize); in ZSTD_findDecompressedSize()
566 { size_t const frameSrcSize = ZSTD_findFrameCompressedSize(src, srcSize); in ZSTD_findDecompressedSize()
572 srcSize -= frameSrcSize; in ZSTD_findDecompressedSize()
576 if (srcSize) return ZSTD_CONTENTSIZE_ERROR; in ZSTD_findDecompressedSize()
589 unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize) in ZSTD_getDecompressedSize() argument
591 unsigned long long const ret = ZSTD_getFrameContentSize(src, srcSize); in ZSTD_getDecompressedSize()
633 static ZSTD_frameSizeInfo ZSTD_findFrameSizeInfo(const void* src, size_t srcSize) in ZSTD_findFrameSizeInfo() argument
639 if ((srcSize >= ZSTD_SKIPPABLEHEADERSIZE) in ZSTD_findFrameSizeInfo()
641 frameSizeInfo.compressedSize = readSkippableFrameSize(src, srcSize); in ZSTD_findFrameSizeInfo()
643 frameSizeInfo.compressedSize <= srcSize); in ZSTD_findFrameSizeInfo()
648 size_t remainingSize = srcSize; in ZSTD_findFrameSizeInfo()
653 { size_t const ret = ZSTD_getFrameHeader(&zfh, src, srcSize); in ZSTD_findFrameSizeInfo()
700 size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize) in ZSTD_findFrameCompressedSize() argument
702 ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize); in ZSTD_findFrameCompressedSize()
712 unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize) in ZSTD_decompressBound() argument
716 while (srcSize > 0) { in ZSTD_decompressBound()
717 ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize); in ZSTD_decompressBound()
722 assert(srcSize >= compressedSize); in ZSTD_decompressBound()
724 srcSize -= compressedSize; in ZSTD_decompressBound()
747 const void* src, size_t srcSize) in ZSTD_copyRawBlock() argument
750 RETURN_ERROR_IF(srcSize > dstCapacity, dstSize_tooSmall, ""); in ZSTD_copyRawBlock()
752 if (srcSize == 0) return 0; in ZSTD_copyRawBlock()
755 ZSTD_memcpy(dst, src, srcSize); in ZSTD_copyRawBlock()
756 return srcSize; in ZSTD_copyRawBlock()
875 const void* src, size_t srcSize, in ZSTD_decompressMultiFrame() argument
890 while (srcSize >= ZSTD_startingInputLength(dctx->format)) { in ZSTD_decompressMultiFrame()
897 size_t const skippableSize = readSkippableFrameSize(src, srcSize); in ZSTD_decompressMultiFrame()
899 assert(skippableSize <= srcSize); in ZSTD_decompressMultiFrame()
902 srcSize -= skippableSize; in ZSTD_decompressMultiFrame()
917 &src, &srcSize); in ZSTD_decompressMultiFrame()
938 RETURN_ERROR_IF(srcSize, srcSize_wrong, "input not entirely consumed"); in ZSTD_decompressMultiFrame()
945 const void* src, size_t srcSize, in ZSTD_decompress_usingDict() argument
948 return ZSTD_decompressMultiFrame(dctx, dst, dstCapacity, src, srcSize, dict, dictSize, NULL); in ZSTD_decompress_usingDict()
969 …STD_decompressDCtx(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) in ZSTD_decompressDCtx() argument
971 return ZSTD_decompress_usingDDict(dctx, dst, dstCapacity, src, srcSize, ZSTD_getDDict(dctx)); in ZSTD_decompressDCtx()
975 size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t srcSize) in ZSTD_decompress() argument
981 regenSize = ZSTD_decompressDCtx(dctx, dst, dstCapacity, src, srcSize); in ZSTD_decompress()
987 return ZSTD_decompressDCtx(&dctx, dst, dstCapacity, src, srcSize); in ZSTD_decompress()
1047 …decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) in ZSTD_decompressContinue() argument
1049 DEBUGLOG(5, "ZSTD_decompressContinue (srcSize:%u)", (unsigned)srcSize); in ZSTD_decompressContinue()
1051 …RETURN_ERROR_IF(srcSize != ZSTD_nextSrcSizeToDecompressWithInputSize(dctx, srcSize), srcSize_wrong… in ZSTD_decompressContinue()
1054 dctx->processedCSize += srcSize; in ZSTD_decompressContinue()
1061 assert(srcSize >= ZSTD_FRAMEIDSIZE); /* to read skippable magic number */ in ZSTD_decompressContinue()
1063 ZSTD_memcpy(dctx->headerBuffer, src, srcSize); in ZSTD_decompressContinue()
1064 …dctx->expected = ZSTD_SKIPPABLEHEADERSIZE - srcSize; /* remaining to load to get full skippable f… in ZSTD_decompressContinue()
1068 dctx->headerSize = ZSTD_frameHeaderSize_internal(src, srcSize, dctx->format); in ZSTD_decompressContinue()
1070 ZSTD_memcpy(dctx->headerBuffer, src, srcSize); in ZSTD_decompressContinue()
1071 dctx->expected = dctx->headerSize - srcSize; in ZSTD_decompressContinue()
1077 ZSTD_memcpy(dctx->headerBuffer + (dctx->headerSize - srcSize), src, srcSize); in ZSTD_decompressContinue()
1119 … rSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, /* frame */ 1); in ZSTD_decompressContinue()
1123 assert(srcSize <= dctx->expected); in ZSTD_decompressContinue()
1124 rSize = ZSTD_copyRawBlock(dst, dstCapacity, src, srcSize); in ZSTD_decompressContinue()
1126 assert(rSize == srcSize); in ZSTD_decompressContinue()
1171 assert(srcSize == 4); /* guaranteed by dctx->expected */ in ZSTD_decompressContinue()
1187 assert(srcSize <= ZSTD_SKIPPABLEHEADERSIZE); in ZSTD_decompressContinue()
1188 …ZSTD_memcpy(dctx->headerBuffer + (ZSTD_SKIPPABLEHEADERSIZE - srcSize), src, srcSize); /* complet… in ZSTD_decompressContinue()
1410 unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize) in ZSTD_getDictID_fromFrame() argument
1413 size_t const hError = ZSTD_getFrameHeader(&zfp, src, srcSize); in ZSTD_getDictID_fromFrame()
1424 const void* src, size_t srcSize, in ZSTD_decompress_usingDDict() argument
1428 return ZSTD_decompressMultiFrame(dctx, dst, dstCapacity, src, srcSize, in ZSTD_decompress_usingDDict()
1727 size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize) in ZSTD_estimateDStreamSize_fromFrame() argument
1731 size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize); in ZSTD_estimateDStreamSize_fromFrame()
1785 void const* src, size_t srcSize) { in ZSTD_decompressContinueStream() argument
1790 zds->outBuff + zds->outStart, dstSize, src, srcSize); in ZSTD_decompressContinueStream()
1801 size_t const decodedSize = ZSTD_decompressContinue(zds, *op, dstSize, src, srcSize); in ZSTD_decompressContinueStream()
2076 const void* src, size_t srcSize, size_t* srcPos) in ZSTD_decompressStream_simpleArgs() argument
2079 ZSTD_inBuffer input = { src, srcSize, *srcPos }; in ZSTD_decompressStream_simpleArgs()