[Zlib-devel] deflate.c and compress.c cyclic
Gilles Vollant
info at winimage.com
Tue Dec 29 06:11:29 EST 2009
hello
in older zlib, I did not included compress.c when I did not need compress /
compress2 function
I also did not like the cyclic dependencie between deflate.c and compress.c
so I suggest deflateBound in deflate.c don't uder compressBound
*** deflate1234.c Tue Dec 29 12:07:44 2009
--- deflate1234prop.c Tue Dec 29 12:09:23 2009
***************
*** 536,542 ****
return complen + wraplen;
/* default settings: return tight bound for that case */
! return compressBound(sourceLen) - 6 + wraplen;
}
/*
=========================================================================
--- 536,542 ----
return complen + wraplen;
/* default settings: return tight bound for that case */
! return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 5 +
wraplen;
}
/*
=========================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://madler.net/pipermail/zlib-devel_madler.net/attachments/20091229/d0d889f8/attachment.html>
More information about the Zlib-devel
mailing list