diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2016-11-15 20:45:01 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2016-12-04 07:48:47 -0800 |
commit | 37281ac222ee7ceb8cc3253f13c8fa26a88dd566 (patch) | |
tree | 0ac0add0b56a769f7714e3a2af5a8b0210803f75 /zlib.h | |
parent | 001300d0d91f75f03eed5ec97eca160452f62d61 (diff) | |
download | zlib-37281ac222ee7ceb8cc3253f13c8fa26a88dd566.tar.gz zlib-37281ac222ee7ceb8cc3253f13c8fa26a88dd566.tar.bz2 zlib-37281ac222ee7ceb8cc3253f13c8fa26a88dd566.zip |
Add uncompress2() function, which returns the input size used.
Diffstat (limited to 'zlib.h')
-rw-r--r-- | zlib.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1246,7 +1246,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, | |||
1246 | uncompressed data. (The size of the uncompressed data must have been saved | 1246 | uncompressed data. (The size of the uncompressed data must have been saved |
1247 | previously by the compressor and transmitted to the decompressor by some | 1247 | previously by the compressor and transmitted to the decompressor by some |
1248 | mechanism outside the scope of this compression library.) Upon exit, destLen | 1248 | mechanism outside the scope of this compression library.) Upon exit, destLen |
1249 | is the actual size of the uncompressed buffer. | 1249 | is the actual size of the uncompressed data. |
1250 | 1250 | ||
1251 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not | 1251 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not |
1252 | enough memory, Z_BUF_ERROR if there was not enough room in the output | 1252 | 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, | |||
1255 | buffer with the uncompressed data up to that point. | 1255 | buffer with the uncompressed data up to that point. |
1256 | */ | 1256 | */ |
1257 | 1257 | ||
1258 | ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, | ||
1259 | const Bytef *source, uLong *sourceLen)); | ||
1260 | /* | ||
1261 | Same as uncompress, except that sourceLen is a pointer, where the | ||
1262 | length of the source is *sourceLen. On return, *sourceLen is the number of | ||
1263 | source bytes consumed. | ||
1264 | */ | ||
1265 | |||
1258 | /* gzip file access functions */ | 1266 | /* gzip file access functions */ |
1259 | 1267 | ||
1260 | /* | 1268 | /* |