mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-27 21:06:45 -04:00
MINOR: compression: optimize memLevel to improve byte rate
Decreasing the deflateInit2's memLevel parameter from 9 to 8 does not affect the compression ratio and increases the compression speed by 12%. Lower values do not increase transfer speed but decrease the compression ratio so it looks like 8 is optimal.
This commit is contained in:
parent
05d846092f
commit
7e488d781c
1 changed files with 1 additions and 1 deletions
|
|
@ -317,7 +317,7 @@ int gzip_init(void *v, int level)
|
|||
strm->zfree = Z_NULL;
|
||||
strm->opaque = Z_NULL;
|
||||
|
||||
if (deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS + 16, 9, Z_DEFAULT_STRATEGY) != Z_OK)
|
||||
if (deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS + 16, 8, Z_DEFAULT_STRATEGY) != Z_OK)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue