Hi

This is the change to move the implementation of De/Inflater.getBytesRead/Written() from native to Java. Current JDK implementation uses zlib's z_stream.total_in/out fields, which are "uLong" type in original zlib source code. This may limit these two counters to 4GB on 32-bit OS [1]. These two fields are currently patched to "long long" in JDK to support the > 4G counting. It is suggested that it might be better to move this > 4G counting support to java level to remove the dependency on patching the original zlib source code, which might be critical in situation that Java runtime prefers to use OS
bundled zlib, instead of the JDK bundled zlib library.

Here is the webrev

http://cr.openjdk.java.net/~sherman/7188852/webrev/

The test case attached only tests upto 128M by default (for running in auto testing). The test can be run manually with option "large" to test > 4G de/inflating. It takes > 4 minutes to compress/decompress 5G bytes on my linux box, guess it's probably not
desirable to hold each/every run for so long in auto setting.

Thanks,
Sherman

[1] http://www.zlib.net/zlib_faq.html#faq32

Reply via email to