implemented deflateReset

This commit is contained in:
inikep
2016-09-20 12:54:26 +02:00
parent 18f66459d5
commit c038c30048
2 changed files with 12 additions and 3 deletions
+2 -2
View File
@@ -73,10 +73,12 @@ Supported methods:
- deflate (with exception of Z_FULL_FLUSH) - deflate (with exception of Z_FULL_FLUSH)
- deflateSetDictionary - deflateSetDictionary
- deflateEnd - deflateEnd
- deflateReset
- deflateBound - deflateBound
- inflateInit - inflateInit
- inflate - inflate
- inflateSetDictionary - inflateSetDictionary
- inflateReset
- compress - compress
- compress2 - compress2
- compressBound - compressBound
@@ -88,7 +90,6 @@ Ignored methods (they do nothing):
Unsupported methods: Unsupported methods:
- gzip file access functions - gzip file access functions
- deflateCopy - deflateCopy
- deflateReset
- deflateTune - deflateTune
- deflatePending - deflatePending
- deflatePrime - deflatePrime
@@ -96,7 +97,6 @@ Unsupported methods:
- inflateGetDictionary - inflateGetDictionary
- inflateCopy - inflateCopy
- inflateSync - inflateSync
- inflateReset
- inflateReset2 - inflateReset2
- inflatePrime - inflatePrime
- inflateMark - inflateMark
+10 -1
View File
@@ -173,7 +173,16 @@ ZEXTERN int ZEXPORT z_deflateReset OF((z_streamp strm))
if (!g_useZSTD) if (!g_useZSTD)
return deflateReset(strm); return deflateReset(strm);
FINISH_WITH_ERR(strm, "deflateReset is not supported!"); { ZWRAP_CCtx* zwc = (ZWRAP_CCtx*) strm->state;
LOG_WRAPPER("- z_deflateReset\n");
if (zwc == NULL) return Z_STREAM_ERROR;
{ size_t const errorCode = ZSTD_resetCStream(zwc->zbc, 0);
if (ZSTD_isError(errorCode)) return ZWRAPC_finish_with_error(zwc, strm, 0); }
}
strm->total_in = 0;
strm->total_out = 0;
return Z_OK;
} }