MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ZSTD_compress

Function ZSTD_compress

freebsd/contrib/openzfs/module/zstd/lib/zstd.c:16391–16401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16389}
16390
16391size_t ZSTD_compress(void* dst, size_t dstCapacity,
16392 const void* src, size_t srcSize,
16393 int compressionLevel)
16394{
16395 size_t result;
16396 ZSTD_CCtx ctxBody;
16397 ZSTD_initCCtx(&ctxBody, ZSTD_defaultCMem);
16398 result = ZSTD_compressCCtx(&ctxBody, dst, dstCapacity, src, srcSize, compressionLevel);
16399 ZSTD_freeCCtxContent(&ctxBody); /* can't free ctxBody itself, as it's on stack; free only heap content */
16400 return result;
16401}
16402
16403
16404/* ===== Dictionary API ===== */

Callers

nothing calls this directly

Calls 3

ZSTD_initCCtxFunction · 0.70
ZSTD_compressCCtxFunction · 0.70
ZSTD_freeCCtxContentFunction · 0.70

Tested by

no test coverage detected