Lines Matching refs:dstCapacity

434 size_t ZSTD_noCompressBlock(void *dst, size_t dstCapacity, const void *src, size_t srcSize)  in ZSTD_noCompressBlock()  argument
436 if (srcSize + ZSTD_blockHeaderSize > dstCapacity) in ZSTD_noCompressBlock()
443 static size_t ZSTD_noCompressLiterals(void *dst, size_t dstCapacity, const void *src, size_t srcSiz… in ZSTD_noCompressLiterals() argument
448 if (srcSize + flSize > dstCapacity) in ZSTD_noCompressLiterals()
462 static size_t ZSTD_compressRleLiteralsBlock(void *dst, size_t dstCapacity, const void *src, size_t … in ZSTD_compressRleLiteralsBlock() argument
467 (void)dstCapacity; /* dstCapacity already guaranteed to be >=4, hence large enough */ in ZSTD_compressRleLiteralsBlock()
482 static size_t ZSTD_compressLiterals(ZSTD_CCtx *zc, void *dst, size_t dstCapacity, const void *src, … in ZSTD_compressLiterals() argument
496 return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); in ZSTD_compressLiterals()
499 if (dstCapacity < lhSize + 1) in ZSTD_compressLiterals()
506 …cLitSize = singleStream ? HUF_compress1X_repeat(ostart + lhSize, dstCapacity - lhSize, src, srcSiz… in ZSTD_compressLiterals()
508 …: HUF_compress4X_repeat(ostart + lhSize, dstCapacity - lhSize, src, srcSize, 255, 11, zc->tmpCount… in ZSTD_compressLiterals()
520 return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); in ZSTD_compressLiterals()
524 return ZSTD_compressRleLiteralsBlock(dst, dstCapacity, src, srcSize); in ZSTD_compressLiterals()
586 ZSTD_STATIC size_t ZSTD_compressSequences_internal(ZSTD_CCtx *zc, void *dst, size_t dstCapacity) in ZSTD_compressSequences_internal() argument
599 BYTE *const oend = ostart + dstCapacity; in ZSTD_compressSequences_internal()
623 size_t const cSize = ZSTD_compressLiterals(zc, op, dstCapacity, literals, litSize); in ZSTD_compressSequences_internal()
832 ZSTD_STATIC size_t ZSTD_compressSequences(ZSTD_CCtx *zc, void *dst, size_t dstCapacity, size_t srcS… in ZSTD_compressSequences() argument
834 size_t const cSize = ZSTD_compressSequences_internal(zc, dst, dstCapacity); in ZSTD_compressSequences()
841 int const uncompressibleError = cSize == ERROR(dstSize_tooSmall) && srcSize <= dstCapacity; in ZSTD_compressSequences()
2333 static size_t ZSTD_compressBlock_internal(ZSTD_CCtx *zc, void *dst, size_t dstCapacity, const void … in ZSTD_compressBlock_internal() argument
2345 return ZSTD_compressSequences(zc, dst, dstCapacity, srcSize); in ZSTD_compressBlock_internal()
2355 static size_t ZSTD_compress_generic(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src… in ZSTD_compress_generic() argument
2371 if (dstCapacity < ZSTD_blockHeaderSize + MIN_CBLOCK_SIZE) in ZSTD_compress_generic()
2403 …cSize = ZSTD_compressBlock_internal(cctx, op + ZSTD_blockHeaderSize, dstCapacity - ZSTD_blockHeade… in ZSTD_compress_generic()
2409 if (blockSize + ZSTD_blockHeaderSize > dstCapacity) in ZSTD_compress_generic()
2421 dstCapacity -= cSize; in ZSTD_compress_generic()
2431 static size_t ZSTD_writeFrameHeader(void *dst, size_t dstCapacity, ZSTD_parameters params, U64 pled… in ZSTD_writeFrameHeader() argument
2444 if (dstCapacity < ZSTD_frameHeaderSize_max) in ZSTD_writeFrameHeader()
2490 static size_t ZSTD_compressContinue_internal(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const … in ZSTD_compressContinue_internal() argument
2499 …fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, cctx->params, cctx->frameContentSize, cctx->dictI… in ZSTD_compressContinue_internal()
2502 dstCapacity -= fhSize; in ZSTD_compressContinue_internal()
2530 …size_t const cSize = frame ? ZSTD_compress_generic(cctx, dst, dstCapacity, src, srcSize, lastFrame… in ZSTD_compressContinue_internal()
2531 : ZSTD_compressBlock_internal(cctx, dst, dstCapacity, src, srcSize); in ZSTD_compressContinue_internal()
2539 size_t ZSTD_compressContinue(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_… in ZSTD_compressContinue() argument
2541 return ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 1, 0); in ZSTD_compressContinue()
2546 size_t ZSTD_compressBlock(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t s… in ZSTD_compressBlock() argument
2551 return ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 0, 0); in ZSTD_compressBlock()
2765 static size_t ZSTD_writeEpilogue(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity) in ZSTD_writeEpilogue() argument
2776 fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, cctx->params, 0, 0); in ZSTD_writeEpilogue()
2779 dstCapacity -= fhSize; in ZSTD_writeEpilogue()
2787 if (dstCapacity < 4) in ZSTD_writeEpilogue()
2791 dstCapacity -= ZSTD_blockHeaderSize; in ZSTD_writeEpilogue()
2796 if (dstCapacity < 4) in ZSTD_writeEpilogue()
2806 size_t ZSTD_compressEnd(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t src… in ZSTD_compressEnd() argument
2809 size_t const cSize = ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 1, 1); in ZSTD_compressEnd()
2812 endResult = ZSTD_writeEpilogue(cctx, (char *)dst + cSize, dstCapacity - cSize); in ZSTD_compressEnd()
2818 static size_t ZSTD_compress_internal(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *sr… in ZSTD_compress_internal() argument
2822 return ZSTD_compressEnd(cctx, dst, dstCapacity, src, srcSize); in ZSTD_compress_internal()
2825 size_t ZSTD_compress_usingDict(ZSTD_CCtx *ctx, void *dst, size_t dstCapacity, const void *src, size… in ZSTD_compress_usingDict() argument
2828 return ZSTD_compress_internal(ctx, dst, dstCapacity, src, srcSize, dict, dictSize, params); in ZSTD_compress_usingDict()
2831 size_t ZSTD_compressCCtx(ZSTD_CCtx *ctx, void *dst, size_t dstCapacity, const void *src, size_t src… in ZSTD_compressCCtx() argument
2833 return ZSTD_compress_internal(ctx, dst, dstCapacity, src, srcSize, NULL, 0, params); in ZSTD_compressCCtx()
2930 size_t ZSTD_compress_usingCDict(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, si… in ZSTD_compress_usingCDict() argument
2941 return ZSTD_compressEnd(cctx, dst, dstCapacity, src, srcSize); in ZSTD_compress_usingCDict()
3122 ZSTD_STATIC size_t ZSTD_limitCopy(void *dst, size_t dstCapacity, const void *src, size_t srcSize) in ZSTD_limitCopy() argument
3124 size_t const length = MIN(dstCapacity, srcSize); in ZSTD_limitCopy()