Artur Biesiadowski wrote:

> I'm just wondering how hard it would be to produce non-native version of
> java.util.zip. Not a big gain as VM would need native zlib to bootstrap
> it from jar file, but it could be interesting to see how much it would
> suck speed-wise...

It probibly wouldn't actually be all that difficult. I don't think (m)any
VMs actually use java.util.zip for bootstrap classloading. Kaffe has its
own zip code for classloading, written in C (which does not depend on zlib,
IIRC). libgcj doesn't need zip for bootstrap loading because core classes
are compiled to native code.

All you'd need to write (or port from C) is the actual inflate/deflate
algorithm itself - dealing with the zipfile headers & directory entries is
already done in Java code.

A good, pure-java zip implementation should actually perform pretty well,
and on VMs with a high native call overhead, might actually be faster.

regards

  [ bryce ]


Reply via email to