[−][src]Function zstd_sys::ZSTD_compress
pub unsafe extern "C" fn ZSTD_compress(
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
compressionLevel: c_int
) -> usize
Simple API
Compresses src
content as a single zstd compressed frame into already allocated dst
.
Hint : compression runs faster if dstCapacity
>= ZSTD_compressBound(srcSize)
.
@return : compressed size written into dst
(<= `dstCapacity),
or an error code if it fails (which can be tested using ZSTD_isError()).