zlibWrapper: Z_DEFAULT_COMPRESSION is translated to ZWRAP_DEFAULT_CLEVEL for zstd
This commit is contained in:
parent
b37b79e868
commit
8b452453ce
24
appveyor.yml
24
appveyor.yml
@ -1,24 +1,24 @@
|
||||
version: 1.0.{build}
|
||||
environment:
|
||||
matrix:
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Debug"
|
||||
PLATFORM: "x64"
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Debug"
|
||||
PLATFORM: "Win32"
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Release"
|
||||
PLATFORM: "x64"
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Release"
|
||||
PLATFORM: "Win32"
|
||||
- COMPILER: "gcc"
|
||||
MAKE_PARAMS: "test"
|
||||
PLATFORM: "mingw64"
|
||||
- COMPILER: "gcc"
|
||||
MAKE_PARAMS: "test"
|
||||
PLATFORM: "mingw32"
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Release"
|
||||
PLATFORM: "Win32"
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Release"
|
||||
PLATFORM: "x64"
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Debug"
|
||||
PLATFORM: "Win32"
|
||||
- COMPILER: "visual"
|
||||
CONFIGURATION: "Debug"
|
||||
PLATFORM: "x64"
|
||||
|
||||
install:
|
||||
- ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
#define Z_INFLATE_SYNC 8
|
||||
#define ZWRAP_HEADERSIZE 4
|
||||
#define ZWRAP_DEFAULT_CLEVEL 5 /* Z_DEFAULT_COMPRESSION is translated to ZWRAP_DEFAULT_CLEVEL for zstd */
|
||||
|
||||
#define LOG_WRAPPER(...) // printf(__VA_ARGS__)
|
||||
|
||||
@ -116,6 +117,9 @@ ZEXTERN int ZEXPORT z_deflateInit_ OF((z_streamp strm, int level,
|
||||
zwc = ZWRAP_createCCtx();
|
||||
if (zwc == NULL) return Z_MEM_ERROR;
|
||||
|
||||
if (level == Z_DEFAULT_COMPRESSION)
|
||||
level = ZWRAP_DEFAULT_CLEVEL;
|
||||
|
||||
{ size_t const errorCode = ZBUFF_compressInit(zwc->zbc, level);
|
||||
if (ZSTD_isError(errorCode)) return Z_MEM_ERROR; }
|
||||
|
||||
@ -127,7 +131,7 @@ ZEXTERN int ZEXPORT z_deflateInit_ OF((z_streamp strm, int level,
|
||||
}
|
||||
|
||||
|
||||
ZEXTERN int ZEXPORT z_deflateInit2_ OF((z_streamp strm, int level, int method,
|
||||
ZEXTERN int ZEXPORT z_deflateInit2_ OF((z_streamp strm, int level, int method,
|
||||
int windowBits, int memLevel,
|
||||
int strategy, const char *version,
|
||||
int stream_size))
|
||||
|
Loading…
Reference in New Issue
Block a user