From: Hans Kristian Rosbach Date: Tue, 12 May 2015 20:22:03 +0000 (+0200) Subject: Minigzip: Set compression level to default when compiling without ZLIB_COMPAT. X-Git-Tag: 1.9.9-b1~834 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=357e26025a2b5755ef45ce765ee57fbb4cc55379;p=thirdparty%2Fzlib-ng.git Minigzip: Set compression level to default when compiling without ZLIB_COMPAT. (level is available in mode[2], needs to be parsed) --- diff --git a/test/minigzip.c b/test/minigzip.c index 8fb028803..4ba062ef8 100644 --- a/test/minigzip.c +++ b/test/minigzip.c @@ -100,6 +100,7 @@ gzFile gz_open(const char *path, int fd, const char *mode) { gzFile gz; int ret; + int level = Z_DEFAULT_COMPRESSION; gz = malloc(sizeof(struct gzFile_s)); if (gz == NULL) @@ -109,7 +110,7 @@ gzFile gz_open(const char *path, int fd, const char *mode) gz->strm.zfree = myfree; gz->strm.opaque = Z_NULL; if (gz->write) - ret = deflateInit2(&(gz->strm), -1, 8, 15 + 16, 8, 0); + ret = deflateInit2(&(gz->strm), level, 8, 15 + 16, 8, 0); else { gz->strm.next_in = 0; gz->strm.avail_in = Z_NULL;