harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Blewitt" <alex.blew...@gmail.com>
Subject Re: Intention to work on Pack200 uncompressor/compressor
Date Fri, 26 May 2006 09:53:50 GMT
On 26/05/06, Jimmy, Jing Lv <firepure@gmail.com> wrote:

> I know little about Mac, though I love its appearance :) I wonder if you
> would write the implementation by pure java or native code. IMHO, write
> them in native may be a help in performance, and maybe easy to merge
> (And we see, RI create a excuteable pack200.exe in its jre). The code
> can be put in native-src\(win.IA32/share/Linux.IA32/Mac?)
> \archive, naming pack200.c or so.

I'm aiming to implement it in pure Java, because one of the other
goals is to allow other clients (e.g. Eclipse) to be able to bundle
the pack/unpack code.

> BTW, I don't know if Harmony can be run on Mac currently. However, that
> is an aim :)

Yes, it certainly is :-)

> You may document the interpret of the algorithm, and offer some
> testcases :)

Actually, it would be good to have some packed Jars that I could then
test my unpacking algorithm on. Does anyone know if I can run the
Sun-supplied packer to compress Jar files and then use that as an
input into my unpacker algorithm? I'm guessing it's OK to do that, but
I need to be able to demonstrate that I've not used any internal
knowledge of the implementation to achieve the goal of a clean-room
implementation. The other alternative is for others to pack some
simple Jars, and then verify that the unpacking algorithm works
independently -- but I could use some sample 'hello world' type Jars
for my own testing.

> As far as I understand the algorithm, it was a little complex and may
> take a period of time to implement. So good luck, and let's discuss on
> mailing-list if there's something hard. :)

It's certainly fun :-) Most of the encodings are variable length,
which makes it fun for trying to run through a compressed Jar (it also
means that I have to complete the unpacker for the first bits before I
can work on unpacking the remainder).

Mind you, one neat feature (which I didn't appreciate before) is that
the algorithm is designed such that you can concatenate two pack200
files together and it's still a valid file. So you can pack a bunch of
Jars independently, and then concatenate them all into one big file
for subsequent compression/transmission.

Alex.
Mime
View raw message