summaryrefslogtreecommitdiff
path: root/gzread.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant check in gz_look().Mark Adler2022-10-061-5/+3
|
* zlib 1.2.12v1.2.12Mark Adler2022-03-271-1/+1
|
* Avoid some conversion warnings in gzread.c and gzwrite.c.Mark Adler2017-02-151-6/+4
|
* zlib 1.2.9v1.2.9Mark Adler2016-12-311-1/+1
|
* Avoid the need for ssize_t.Mark Adler2016-12-311-2/+6
| | | | | | | | Limit read() and write() requests to sizes that fit in an int. This allows storing the return value in an int, and avoiding the need to use or construct an ssize_t type. This is required for Microsoft C, whose _read and _write functions take an unsigned request and return an int.
* No need to check for NULL argument to free().Mark Adler2016-12-301-4/+2
|
* Add gzfread(), duplicating the interface of fread().Mark Adler2016-12-041-39/+97
|
* Create z_size_t and z_ssize_t types.Mark Adler2016-12-041-1/+1
| | | | | | Normally these are set to size_t and ssize_t. But if they do not exist, then they are set to the smallest integer type that can contain a pointer. size_t is unsigned and ssize_t is signed.
* Clean up type conversions.Mark Adler2016-10-111-4/+4
|
* zlib 1.2.7.1v1.2.7.1Mark Adler2013-03-241-1/+1
|
* Add casts and consts to ease user conversion to C++.Mark Adler2013-03-241-5/+5
| | | | You would still need to run zlib2ansi on all of the *.c files.
* Clean up the usage of z_const and respect const usage within zlib.Mark Adler2012-08-131-1/+2
| | | | | | | | | This patch allows zlib to compile cleanly with the -Wcast-qual gcc warning enabled, but only if ZLIB_CONST is defined, which adds const to next_in and msg in z_stream and in the in_func prototype. A --const option is added to ./configure which adds -DZLIB_CONST to the compile flags, and adds -Wcast-qual to the compile flags when ZLIBGCCWARN is set in the environment.
* 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