]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
zlibWrapper: compress uses ZWRAP_DEFAULT_CLEVEL 198/head
authorinikep <inikep@gmail.com>
Fri, 3 Jun 2016 17:44:03 +0000 (19:44 +0200)
committerinikep <inikep@gmail.com>
Fri, 3 Jun 2016 17:44:03 +0000 (19:44 +0200)
zlibWrapper/zstd_zlibwrapper.c

index 42ac5c04e115d74b0111984a28f885f258d44160..6bd820452b3e61e26e46872b447d0dae175369bd 100644 (file)
     - zstd source repository : https://github.com/Cyan4973/zstd
 */
 
-#include <stdarg.h>          /* va_list */
+#include <stdarg.h>            /* va_list */
 #include <zlib.h>
 #include "zstd_zlibwrapper.h"
 #include "zstd.h"
-#include "zstd_static.h"      /* ZSTD_MAGICNUMBER */
+#include "zstd_static.h"       /* ZSTD_MAGICNUMBER */
 #include "zbuff.h"
 #include "zbuff_static.h"      /* ZBUFF_createCCtx_advanced */
 #include "zstd_internal.h"     /* defaultCustomMem */
@@ -693,7 +693,7 @@ ZEXTERN int ZEXPORT z_compress OF((Bytef *dest,   uLongf *destLen,
         return compress(dest, destLen, source, sourceLen);
 
     { size_t dstCapacity = *destLen; 
-      size_t const errorCode = ZSTD_compress(dest, dstCapacity, source, sourceLen, -1);
+      size_t const errorCode = ZSTD_compress(dest, dstCapacity, source, sourceLen, ZWRAP_DEFAULT_CLEVEL);
       LOG_WRAPPER("z_compress sourceLen=%d dstCapacity=%d\n", (int)sourceLen, (int)dstCapacity);
       if (ZSTD_isError(errorCode)) return Z_MEM_ERROR;
       *destLen = errorCode;