Christian Schlichtherle wrote:
More specifically, the size and compressed size field in the ZipEntry class
are causing the problems as some comparisons are happening on these. The
issue is that once a big integer equal or greater than 2*1024^3 and smaller
than 4*1024^3 is stored into a Java int, it is hard to use this int as if it
were unsigned. You would have to do something like this on an int
(untested):
...
This is way too much computational overhead
To compare two unsigned ints just invert their sign bits:
I.e. (using C syntax):
unsigned int32 i, j;
signed int32 is = (signed int32) i;
signed int32 js = (signed int32) j;
Then (i COMP j) if and only if
((signed int32) (is ^ 0x800000) COMP (signed int32) (js & 0x80000000)).
Which is probably faster than:
((long) (is & 0xFFFFFFFF) COMP (long) (js & 0xFFFFFFFF))
--
--Per Bothner
[EMAIL PROTECTED] http://per.bothner.com/
_______________________________________________
Classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath