This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: "compile-file" not use compression?
- From: Per Bothner <per at bothner dot com>
- To: Yaroslav Kavenchuk <kavenchuk at gmail dot com>
- Cc: kawa at sourceware dot org
- Date: Mon, 17 Mar 2008 08:23:07 -0700
- Subject: Re: "compile-file" not use compression?
- References: <47DE69A6.5080006@gmail.com>
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();