summaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-12-04 18:29:43 -0800
committerMark Adler <madler@alumni.caltech.edu>2016-12-04 18:47:34 -0800
commit77bc4f8944c0e1a1fd4689eddbcead6e93bef58a (patch)
tree4de4ee562e63d8ec74878d58041b53a291ffc443 /zlib.h
parent44dfd831d24f9b627ab666cf0973b0dce98fabba (diff)
downloadzlib-77bc4f8944c0e1a1fd4689eddbcead6e93bef58a.tar.gz
Add gzfwrite(), duplicating the interface of fwrite().
Diffstat (limited to 'zlib.h')
-rw-r--r--zlib.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/zlib.h b/zlib.h
index ff4469d..053e6e2 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1427,6 +1427,20 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
error.
*/
+ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
+ z_size_t nitems, gzFile file));
+/*
+ gzfwrite() writes nitems items of size size from buf to file, duplicating
+ the interface of stdio's fwrite(), with size_t request and return types. If
+ the library defines size_t, then z_size_t is identical to size_t. If not,
+ then z_size_t is an unsigned integer type that can contain a pointer.
+
+ gzfwrite() returns the number of full items written of size size, or zero
+ if there was an error. If the multiplication of size and nitems overflows,
+ i.e. the product does not fit in a z_size_t, then nothing is written, zero
+ is returned, and the error state is set to Z_STREAM_ERROR.
+*/
+
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
/*
Converts, formats, and writes the arguments to the compressed file under