ZSTD_DCtx_refPrefix method

int ZSTD_DCtx_refPrefix(
  1. Pointer<ZSTD_DCtx> dctx,
  2. Pointer<Void> prefix,
  3. int prefixSize
)

! ZSTD_DCtx_refPrefix() : Requires v1.4.0+ Reference a prefix (single-usage dictionary) to decompress next frame. This is the reverse operation of ZSTD_CCtx_refPrefix(), and must use the same prefix as the one used during compression. Prefix is only used once. Reference is discarded at end of frame. End of frame is reached when ZSTD_decompressStream() returns 0. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary Note 2 : Prefix buffer is referenced. It must outlive decompression. Prefix buffer must remain unmodified up to the end of frame, reached when ZSTD_decompressStream() returns 0. Note 3 : By default, the prefix is treated as raw content (ZSTD_dct_rawContent). Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section) Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost. A full dictionary is more costly, as it requires building tables.

Implementation

int ZSTD_DCtx_refPrefix(
  ffi.Pointer<ZSTD_DCtx> dctx,
  ffi.Pointer<ffi.Void> prefix,
  int prefixSize,
) {
  return _ZSTD_DCtx_refPrefix(
    dctx,
    prefix,
    prefixSize,
  );
}