zlib: wrap inflateInit2 used to accept only for gzip format

http-backend.c uses inflateInit2() to tell the library that it wants to
accept only gzip format. Wrap it in a helper function so that readers do
not have to wonder what the magic numbers 15 and 16 are for.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2011-06-10 10:45:29 -07:00
parent 9e7e5ca372
commit 5e86c1fb86
3 changed files with 17 additions and 4 deletions

View File

@ -21,6 +21,7 @@
#endif
void git_inflate_init(z_streamp strm);
void git_inflate_init_gzip_only(z_streamp strm);
void git_inflate_end(z_streamp strm);
int git_inflate(z_streamp strm, int flush);