Function zstd_sys::ZSTD_compress
source ยท pub unsafe extern "C" fn ZSTD_compress(
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
compressionLevel: c_int,
) -> usize
Expand description
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()).