This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "compile-file" not use compression?


Yes, that is correct.  I don't quite remember why.  Originally,
I actually wrote my own code for reading and writing zip-archives,
but in 1997 (see gnu/bytecode/ChangeLog) I rewrote it to use
java.util.zip.*.  The original code didn't handle compression,
which may be why it still doesn't.

Can anyone think of a reason why we might want compile-file
to emit uncompressed .zip archives?

Could you try the attached (untested) patch?
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/
Index: gnu/expr/Compilation.java
===================================================================
--- gnu/expr/Compilation.java	(revision 6058)
+++ gnu/expr/Compilation.java	(working copy)
@@ -1007,10 +1007,7 @@
       zout = new java.util.jar.JarOutputStream(new FileOutputStream(zar_file));
     else
     /* #endif */
-      {
-	zout = new ZipOutputStream (new FileOutputStream (zar_file));
-	zout.setMethod(ZipOutputStream.STORED); // no compression
-      }
+      zout = new ZipOutputStream(new FileOutputStream(zar_file));
 
     byte[][] classBytes = new byte[numClasses][];
     CRC32 zcrc = new CRC32();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]