Re: cvs: php-src /ext/bz2 bz2.c
| From: | Ilia Alshanetsky | Date: | Fri, 10 Jun 2005 15:47:11 +0000 |
| Subject: | Re: cvs: php-src /ext/bz2 bz2.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-32214@lists.php.net to get a copy of this message | ||
Stefan Esser wrote:
Hi Ilia, it is me againThat'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. Iliawhile this maybe silence the compiler I do not see how this can be mathematically the same ;) Stefan- size = (bzs.total_out_hi32 << 32) + bzs.total_out_lo32; + size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32;