Function ZSTD_compress

unsafe extern C { unwind: false } fn ZSTD_compress(dst: *mut c_void, dstCapacity: usize, src: *const c_void, srcSize: usize, compressionLevel: c_int) -> usize

Simple Core 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()).