updated ZSTD_DCtx_reset()
signature and behavior is now the same as ZSTD_CCtx_reset()
This commit is contained in:
+9
-10
@@ -609,12 +609,12 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
|
||||
</p></pre><BR>
|
||||
|
||||
<pre><b>typedef enum {
|
||||
ZSTD_CCtx_reset_session_only = 1,
|
||||
ZSTD_CCtx_reset_parameters = 2,
|
||||
ZSTD_CCtx_reset_session_and_parameters = 3
|
||||
} ZSTD_CCtx_reset_directive;
|
||||
ZSTD_reset_session_only = 1,
|
||||
ZSTD_reset_parameters = 2,
|
||||
ZSTD_reset_session_and_parameters = 3
|
||||
} ZSTD_reset_directive;
|
||||
</b></pre><BR>
|
||||
<pre><b>size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_CCtx_reset_directive zcrd);
|
||||
<pre><b>size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_reset_directive reset);
|
||||
</b><p> 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.
|
||||
@@ -734,12 +734,11 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
|
||||
|
||||
</p></pre><BR>
|
||||
|
||||
<pre><b>void ZSTD_DCtx_reset(ZSTD_DCtx* dctx); </b>/* <==== There is a discrepancy with ZSTD_CCtx_reset(): here it necessarily resets everything (context and parameters) */<b>
|
||||
<pre><b>size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_reset_directive reset);
|
||||
</b><p> Return a DCtx to clean state.
|
||||
If a decompression was ongoing, any internal data not yet flushed is cancelled.
|
||||
All parameters are back to default values, including sticky ones.
|
||||
Dictionary (if any) is dropped.
|
||||
Parameters can be modified again after a reset.
|
||||
Session and parameters can be reset jointly or separately
|
||||
Parameters can only be reset when no active frame is being decompressed.
|
||||
@return : 0, or an error code, which can be tested with ZSTD_isError()
|
||||
|
||||
</p></pre><BR>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user