ZSTD_compress method

int ZSTD_compress(
  1. Pointer<Void> dst,
  2. int dstCapacity,
  3. Pointer<Void> src,
  4. int srcSize,
  5. int compressionLevel,
)

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,
  );
}