limit zlib compression level to Z_BEST_COMPRESSION

This commit is contained in:
Przemyslaw Skibinski 2017-02-13 21:00:41 +01:00
parent 5a3bb05bb2
commit 64f7221958

View File

@ -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;