zlib: wrap deflateBound() too

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2011-06-10 11:18:17 -07:00
parent 55bb5c9147
commit 225a6f1068
8 changed files with 17 additions and 10 deletions

9
zlib.c
View File

@ -78,6 +78,15 @@ int git_inflate(z_streamp strm, int flush)
return status;
}
#if defined(NO_DEFLATE_BOUND) || ZLIB_VERNUM < 0x1200
#define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
#endif
unsigned long git_deflate_bound(z_streamp strm, unsigned long size)
{
return deflateBound(strm, size);
}
void git_deflate_init(z_streamp strm, int level)
{
int status = deflateInit(strm, level);