newnet: Use Z_PARTIAL_FLUSH instead of Z_SYNC_FLUSH to save a few bytes.
They do the same thing, except that Z_SYNC_FLUSH adds a bit of useless padding.master
parent
b704a741bf
commit
ee1ae86ea7
|
@ -680,7 +680,7 @@ void socketFlush(Socket *sock)
|
|||
sock->zDeflate.next_out = (Bytef *)&sock->zDeflateOutBuf[alreadyHave];
|
||||
sock->zDeflate.avail_out = sock->zDeflateOutBuf.size() - alreadyHave;
|
||||
|
||||
int ret = deflate(&sock->zDeflate, Z_SYNC_FLUSH);
|
||||
int ret = deflate(&sock->zDeflate, Z_PARTIAL_FLUSH);
|
||||
ASSERT(ret != Z_STREAM_ERROR, "zlib compression failed!");
|
||||
|
||||
// Remove unused part of buffer.
|
||||
|
|
Loading…
Reference in New Issue