ZSTD_CCtx_reset method
! ZSTD_CCtx_reset() : There are 2 different things that can be reset, independently or jointly :
- The session : will stop compressing current frame, and make CCtx ready to start a new one. Useful after an error, or to interrupt any ongoing compression. Any internal data not yet flushed is cancelled. Compression parameters and dictionary remain unchanged. They will be used to compress next frame. Resetting session never fails.
- The parameters : changes all parameters back to "default". This also removes any reference to any dictionary or external sequence producer. Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing) otherwise the reset fails, and function returns an error value (which can be tested using ZSTD_isError())
- Both : similar to resetting the session, followed by resetting parameters.
Implementation
int ZSTD_CCtx_reset(
ffi.Pointer<ZSTD_CCtx> cctx,
int reset,
) {
return _ZSTD_CCtx_reset(
cctx,
reset,
);
}