Thank you StephR! It’s good to have this info available.
I don’t think the repack stage is required though, unless you want to sign the file. It does add a few extra bytes after all!
So my build is now;
javac -target 1.5 A.java
jar cvfM A.normal.jar A.class
java -jar jarg.jar A.normal.jar
java -jar proguard.jar -injars A.normal_s.jar -outjars A.proguard.jar -libraryjars rt.jar -keep public class A -optimizationpasses 9 -overloadaggressively
pack200 --effort=9 --strip-debug --no-keep-file-order -O --no-gzip A.proguard.pack A.proguard.jar
kzip /b96 /y A.proguard.kz.pack A.proguard.pack
java Zip2Gzip A.proguard.kz.pack A.proguard.kz.pack.gz
A.class (12059) goes down to A.proguard.kz.pack.gz (3961)
I’d only tinker with /b96 if it was very close to 4096. I haven’t yet found a case where it wasn’t optimal for 4K.
I fiddled with JoGa but didn’t get any reliable savings.