Commit Graph

16 Commits

Author SHA1 Message Date
Mark Adler 26a99cd895 Add a transparent write mode to gzopen() when 'T' is in the mode. 2011-10-02 13:34:29 -07:00
Mark Adler a4f7c65374 Update copyright dates on gz* source files. 2011-09-30 22:26:04 -07:00
Mark Adler acfc85772a Change gzgetc() to a macro for speed (~40% speedup in testing). 2011-09-26 22:50:28 -07:00
Mark Adler 8e0d212910 Simplify gzseek() now that raw after gzip is ignored. 2011-09-26 18:34:07 -07:00
Mark Adler 5ad116abda Allow gzread() and related to continue after gzclearerr().
Before this fix, gzread() would lose data if a premature end of file
was encountered.  This prevented gzread() from being used on a file
that was being written concurrently.  Now gzread() returns all of the
data it has available before indicating a premature end of file.

This also changes the error returned on a premature end of file from
Z_DATA_ERROR to Z_BUF_ERROR.  This allows the user to determine if
the error is recoverable, which it is if Z_BUF_ERROR is returned.  If
a Z_DATA_ERROR is returned, then the error is not recoverable.

This patch replaces the functionality of a previous patch that fixed
reading through an empty gzip stream in a concatenation of gzip
streams.

To implement this fix, a noticeable rewrite of gzread.c was needed.
The patch has the added advantage of using inflate's gzip processing
instead of replicating the functionality in gzread.c.  This makes the
gz code a little simpler.
2011-09-26 00:57:26 -07:00
Mark Adler a9ae24b653 Change gzread() and related to ignore junk after gzip streams.
Previously the new gz* functions (introduced in 1.2.4) would read and
return raw data after the last gzip stream.  This is inconsistent with
the behavior of gzip and the previous versions of zlib.  Now when one
or more gzip streams have been decoded from the file, which is then
followed by data that is not a gzip stream (as detemined by not finding
the magic header), then that subsequent trailing garbage is ignored,
and no error is returned.
2011-09-24 10:26:07 -07:00
Mark Adler 8824da8f01 Correct error in comment for gz_make(). 2011-09-24 08:33:38 -07:00
Mark Adler 0a81dc026c Fix bug in gzgets() for a concatenated empty gzip stream. 2011-09-24 00:29:46 -07:00
Mark Adler f32370e542 Correct spelling error in gzread.c 2011-09-24 00:09:31 -07:00
Mark Adler 05d47d2627 zlib 1.2.4.1 2011-09-09 23:34:22 -07:00
Mark Adler 67cc20d004 zlib 1.2.4-pre1 2011-09-09 23:32:36 -07:00
Mark Adler 7751bd4c71 zlib 1.2.3.9 2011-09-09 23:27:26 -07:00
Mark Adler e0ff940e1a zlib 1.2.3.8 2011-09-09 23:27:17 -07:00
Mark Adler 7df877eccd zlib 1.2.3.7 2011-09-09 23:27:08 -07:00
Mark Adler dc5a43ebfa zlib 1.2.3.6 2011-09-09 23:26:58 -07:00
Mark Adler d004b04783 zlib 1.2.3.5 2011-09-09 23:26:49 -07:00