summaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-11-15 20:45:01 -0700
committerMark Adler <madler@alumni.caltech.edu>2016-12-04 07:48:47 -0800
commit37281ac222ee7ceb8cc3253f13c8fa26a88dd566 (patch)
tree0ac0add0b56a769f7714e3a2af5a8b0210803f75 /zlib.h
parent001300d0d91f75f03eed5ec97eca160452f62d61 (diff)
downloadzlib-37281ac222ee7ceb8cc3253f13c8fa26a88dd566.tar.gz
Add uncompress2() function, which returns the input size used.
Diffstat (limited to 'zlib.h')
-rw-r--r--zlib.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/zlib.h b/zlib.h
index 5c99039..4544e57 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1246,7 +1246,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
uncompressed data. (The size of the uncompressed data must have been saved
previously by the compressor and transmitted to the decompressor by some
mechanism outside the scope of this compression library.) Upon exit, destLen
- is the actual size of the uncompressed buffer.
+ is the actual size of the uncompressed data.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
@@ -1255,6 +1255,14 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
buffer with the uncompressed data up to that point.
*/
+ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong *sourceLen));
+/*
+ Same as uncompress, except that sourceLen is a pointer, where the
+ length of the source is *sourceLen. On return, *sourceLen is the number of
+ source bytes consumed.
+*/
+
/* gzip file access functions */
/*