ZSTD_CCtx_refCDict method

int ZSTD_CCtx_refCDict(
  1. Pointer<ZSTD_CCtx> cctx,
  2. Pointer<ZSTD_CDict> cdict
)

! ZSTD_CCtx_refCDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used for all future compressed frames. Note that compression parameters are enforced from within CDict, and supersede any compression parameter previously set within CCtx. The parameters ignored are labelled as "superseded-by-cdict" in the ZSTD_cParameter enum docs. The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. The dictionary will remain valid for future compressed frames using same CCtx. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : Referencing a NULL CDict means "return to no-dictionary mode". Note 1 : Currently, only one dictionary can be managed. Referencing a new dictionary effectively "discards" any previous one. Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx.

Implementation

int ZSTD_CCtx_refCDict(
  ffi.Pointer<ZSTD_CCtx> cctx,
  ffi.Pointer<ZSTD_CDict> cdict,
) {
  return _ZSTD_CCtx_refCDict(
    cctx,
    cdict,
  );
}