Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / June 2004

Tip: Looking for answers? Try searching our database.

Ant ZIP task: maximum compression

Thread view: 
Karsten Wutzke - 01 Jun 2004 14:02 GMT
Hello all!

This is not really a Java question...:

Is there a way in Ant to create an automated ZIP file with maximum
compression? The Zip file I get with WinZip is ~6MB, the Zip file with
Ant is more than 15MB in size.

Can it be done?

Karsten
Bill Karwin - 01 Jun 2004 18:08 GMT
> Is there a way in Ant to create an automated ZIP file with maximum
> compression? The Zip file I get with WinZip is ~6MB, the Zip file with
> Ant is more than 15MB in size.

Ant uses the class java.util.zip.ZipEntry from the J2SE SDK to compress
and store files in zips and jars.  The javadoc for ZipEntry seems not to
have any option for different compression levels, just DEFLATED
(compressed) and STORED (not compressed).

Ant's <zip> and <jar> tasks do have a 'compress' attribute, which can be
true (use compression) or false (use no compression).  Perhaps the
default is to use no compression?  You might try explicitly setting
compress="true" when creating an archive.

Regards,
Bill K.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.