From: Przemyslaw Skibinski Date: Mon, 13 Feb 2017 20:00:41 +0000 (+0100) Subject: limit zlib compression level to Z_BEST_COMPRESSION X-Git-Tag: v1.1.4~1^2~65^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64f7221958084b10f9f9c8b86639a96a73b106a2;p=thirdparty%2Fzstd.git limit zlib compression level to Z_BEST_COMPRESSION --- diff --git a/programs/fileio.c b/programs/fileio.c index 430127771..9f1560b43 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -344,6 +344,8 @@ static unsigned long long FIO_compressGzFrame(cRess_t* ress, const char* srcFile z_stream strm; int ret; + if (compressionLevel > Z_BEST_COMPRESSION) compressionLevel = Z_BEST_COMPRESSION; + strm.zalloc = Z_NULL; strm.zfree = Z_NULL; strm.opaque = Z_NULL;