Stefan Esser wrote:
Hi Ilia,
it is me again
- size = (bzs.total_out_hi32 << 32) + bzs.total_out_lo32;
+ size = (bzs.total_out_hi32 * (unsigned int) -1) +
bzs.total_out_lo32;
while this maybe silence the compiler I do not see how this can be
mathematically the same ;)
Stefan
That's actually the correct implementation of the code... bz2 works by
setting hi32 + 1 when lo32 overflows. So 1 in hi32 == INT_MAX, which
means total size is hi32 * INT_MAX + lo32. The documentation claimed it
was hi32 << 32, but that's not really the case.
Ilia
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php