ZSTD_compress method
Simple API
/
/*! ZSTD_compress() :
Compresses src
content as a single zstd compressed frame into already allocated dst
.
NOTE: Providing dstCapacity >= ZSTD_compressBound(srcSize)
guarantees that zstd will have
enough space to successfully compress the data.
@return : compressed size written into dst
(<= `dstCapacity),
or an error code if it fails (which can be tested using ZSTD_isError()).
Implementation
int ZSTD_compress(
ffi.Pointer<ffi.Void> dst,
int dstCapacity,
ffi.Pointer<ffi.Void> src,
int srcSize,
int compressionLevel,
) {
return _ZSTD_compress(
dst,
dstCapacity,
src,
srcSize,
compressionLevel,
);
}