This implies it might use compression based on examining the
jar contents as a whole so for example it need only one dictionary
entry for a string that occurs once in each member, rather than just
compressing the compressed jar file which really only would manage to
compress the uncompressed directory entries and the manifest.
I discovered:
"It merges and sorts the constant-pool data in the class files and
co-locates them in the archive. It removes redundant class
attributes."
The constant pool is the place where compression can really go to
town. By merging the constant pools of all the classes, that is
pretty heavy duty compression to start with, then adding compression
of that as a whole is heavy duty stuff. Compression can do much better
on a single large block of text than a number of small independent
ones.
I also discovered that signed jars once packed have to be unpacked
with the UNPACK200 utility before they can be verified. They cannot be
used directly. Thankfully unpack200 is part of the JRE even if there
are no unpack200 java classes.
Sun has decided to try to make the .gz or .pack.gz compression
transparent by fancy pants stuff in the client and server to ask for
all three flavours and be given one of the three flavours. The net
results is at first only Sun servers will be able to deal with
..pack.gz files and everyone else will continue to use .jar. It
requires special code in your HTTP server to deal with this. Sun did
something similar with JAWS.. Almost nothing but Sun implements the
efficient protocol.
It occurred that pack200 might make the JRE download much smaller next
time out.