summaryrefslogtreecommitdiff
path: root/gzread.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix gzgetc undefine when Z_PREFIX set [Turk].Mark Adler2012-05-171-1/+5
|
* Restore gzgetc_ for backward compatibility with 1.2.6.Mark Adler2012-02-181-0/+6
|
* Replace use of memmove() with a simple copy for portability.Mark Adler2012-02-181-3/+8
| | | | | | | SunOS 4.1 doesn't have memmove(), and there may be others. memcpy() should not be used for overlapping copies, so here a simple copy is implemented that works for the particular direction of the overlap, which is where the destination precedes the source.
* zlib 1.2.6.1v1.2.6.1Mark Adler2012-02-121-1/+1
|
* Remove unnecessary gzgetc_ function.Mark Adler2012-02-101-8/+2
|
* Restore gzgetc function for binary compatibility.Mark Adler2011-12-181-4/+8
| | | | Newly compiled applications will use the gzgetc macro.
* Document gzread() capability to read concurrently written files.Mark Adler2011-12-141-2/+3
| | | | | | Also since gzread() will no longer return an error for an incomplete gzip file, have gzclose() return an error if the last gzread() ended in the middle of a gzip stream.
* Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF.Mark Adler2011-12-131-2/+2
| | | | | | | Z_BUF_ERROR was also being used for an unsuccessful gzungetc and for buffer lengths that didn't fit in an int. Those uses were changed to Z_DATA_ERROR in order to assure that Z_BUF_ERROR occurs only when a premature end of input occurs, indicating that gzclearerr() can be used.
* Fix bug in gzread.c when end-of-file is reached.Mark Adler2011-12-111-1/+1
|
* Fix gzeof() to behave just like feof() when read is not past end of file.Mark Adler2011-12-111-5/+10
| | | | | | | | Before, gzeof() would return true (accurately) when the last read request went just up to the end of the uncompressed data. In the analogous case, feof() would return false, only returning true when a read request goes past the end of the file. This patch corrects gzeof() to behave in the same way as feof(), as noted in the zlib.h documentation.
* Add a transparent write mode to gzopen() when 'T' is in the mode.Mark Adler2011-10-021-6/+2
|
* Update copyright dates on gz* source files.Mark Adler2011-09-301-1/+1
|
* Change gzgetc() to a macro for speed (~40% speedup in testing).Mark Adler2011-09-261-58/+61
|
* Simplify gzseek() now that raw after gzip is ignored.Mark Adler2011-09-261-4/+3
|
* Allow gzread() and related to continue after gzclearerr().Mark Adler2011-09-261-177/+91
| | | | | | | | | | | | | | | | | | | | | 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.
* Change gzread() and related to ignore junk after gzip streams.Mark Adler2011-09-241-0/+9
| | | | | | | | | | 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.
* Correct error in comment for gz_make().Mark Adler2011-09-241-1/+1
|
* Fix bug in gzgets() for a concatenated empty gzip stream.Mark Adler2011-09-241-6/+6
|
* Correct spelling error in gzread.cMark Adler2011-09-241-1/+1
|
* zlib 1.2.4.1v1.2.4.1Mark Adler2011-09-091-1/+2
|
* zlib 1.2.4-pre1v1.2.4-pre1Mark Adler2011-09-091-0/+1
|
* zlib 1.2.3.9v1.2.3.9Mark Adler2011-09-091-12/+4
|
* zlib 1.2.3.8v1.2.3.8Mark Adler2011-09-091-3/+4
|
* zlib 1.2.3.7v1.2.3.7Mark Adler2011-09-091-27/+37
|
* zlib 1.2.3.6v1.2.3.6Mark Adler2011-09-091-16/+32
|
* zlib 1.2.3.5v1.2.3.5Mark Adler2011-09-091-0/+632