mirror of
https://github.com/facebook/zstd.git
synced 2025-07-29 11:21:22 +03:00
zlibWrapper\README.md: minor tweaks
This commit is contained in:
@ -25,20 +25,8 @@
|
||||
#define LOG_WRAPPERC(...) /* printf(__VA_ARGS__) */
|
||||
#define LOG_WRAPPERD(...) /* printf(__VA_ARGS__) */
|
||||
|
||||
|
||||
#define FINISH_WITH_GZ_ERR(msg) { \
|
||||
(void)msg; \
|
||||
return Z_STREAM_ERROR; \
|
||||
}
|
||||
|
||||
#define FINISH_WITH_NULL_ERR(msg) { \
|
||||
(void)msg; \
|
||||
return NULL; \
|
||||
}
|
||||
|
||||
const char * zstdVersion(void) { return ZSTD_VERSION_STRING; }
|
||||
|
||||
ZEXTERN const char * ZEXPORT z_zlibVersion OF((void)) { return zlibVersion(); }
|
||||
#define FINISH_WITH_GZ_ERR(msg) { (void)msg; return Z_STREAM_ERROR; }
|
||||
#define FINISH_WITH_NULL_ERR(msg) { (void)msg; return NULL; }
|
||||
|
||||
|
||||
|
||||
@ -62,6 +50,11 @@ ZWRAP_decompress_type ZWRAP_getDecompressionType(void) { return g_ZWRAPdecompres
|
||||
|
||||
|
||||
|
||||
const char * zstdVersion(void) { return ZSTD_VERSION_STRING; }
|
||||
|
||||
ZEXTERN const char * ZEXPORT z_zlibVersion OF((void)) { return zlibVersion(); }
|
||||
|
||||
|
||||
|
||||
static void* ZWRAP_allocFunction(void* opaque, size_t size)
|
||||
{
|
||||
@ -257,7 +250,6 @@ ZEXTERN int ZEXPORT z_deflate OF((z_streamp strm, int flush))
|
||||
int res;
|
||||
LOG_WRAPPERC("- deflate1 flush=%d avail_in=%d avail_out=%d total_in=%d total_out=%d\n", (int)flush, (int)strm->avail_in, (int)strm->avail_out, (int)strm->total_in, (int)strm->total_out);
|
||||
res = deflate(strm, flush);
|
||||
LOG_WRAPPERC("- deflate2 flush=%d avail_in=%d avail_out=%d total_in=%d total_out=%d\n", (int)flush, (int)strm->avail_in, (int)strm->avail_out, (int)strm->total_in, (int)strm->total_out);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -397,6 +389,7 @@ void ZWRAP_initDCtx(ZWRAP_DCtx* zwd)
|
||||
zwd->outBuffer.size = 0;
|
||||
}
|
||||
|
||||
|
||||
ZWRAP_DCtx* ZWRAP_createDCtx(z_streamp strm)
|
||||
{
|
||||
ZWRAP_DCtx* zwd;
|
||||
@ -585,8 +578,7 @@ ZEXTERN int ZEXPORT z_inflate OF((z_streamp strm, int flush))
|
||||
|
||||
if (strm->avail_in <= 0) return Z_OK;
|
||||
|
||||
{
|
||||
size_t errorCode, srcSize;
|
||||
{ size_t errorCode, srcSize;
|
||||
zwd = (ZWRAP_DCtx*) strm->state;
|
||||
LOG_WRAPPERD("- inflate1 flush=%d avail_in=%d avail_out=%d total_in=%d total_out=%d\n", (int)flush, (int)strm->avail_in, (int)strm->avail_out, (int)strm->total_in, (int)strm->total_out);
|
||||
|
||||
@ -762,6 +754,7 @@ ZEXTERN int ZEXPORT z_inflateSync OF((z_streamp strm))
|
||||
|
||||
|
||||
|
||||
|
||||
/* Advanced compression functions */
|
||||
ZEXTERN int ZEXPORT z_deflateCopy OF((z_streamp dest,
|
||||
z_streamp source))
|
||||
|
Reference in New Issue
Block a user