Improve speed of gzprintf() in transparent mode.

This commit is contained in:
Mark Adler
2015-07-05 18:14:53 -07:00
parent 8a979f6c79
commit 95698093f0
4 changed files with 70 additions and 51 deletions

7
zlib.h
View File

@@ -1291,10 +1291,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
default buffer size is 8192 bytes. This function must be called after
gzopen() or gzdopen(), and before any other calls that read or write the
file. The buffer memory allocation is always deferred to the first read or
write. Two buffers are allocated, either both of the specified size when
writing, or one of the specified size and the other twice that size when
reading. A larger buffer size of, for example, 64K or 128K bytes will
noticeably increase the speed of decompression (reading).
write. Three times that size in buffer space is allocated. A larger buffer
size of, for example, 64K or 128K bytes will noticeably increase the speed
of decompression (reading).
The new buffer size also affects the maximum length for gzprintf().