, "sync flush", zpipe.c zlib.
1- ,
Deflate()will be returned every time the output buffer is full or when the input buffer is empty, meanwhile adding to the compressed stream is an empty literal, also called "sync flush", except for the end, which is the flag Z_FINISH.
flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
flush = feof(source) ? Z_FINISH : Z_SYNC_FLUSH;
ret = deflate(&strm, flush);
source
share