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
Cyp 2010-07-17 02:01:08 +02:00
parent b704a741bf
commit ee1ae86ea7
1 changed files with 1 additions and 1 deletions

View File

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