简体   繁体   中英

gzip maximum compression using ant

The GZip task in ant works no problem, but is there a way to get it to use maximum compression - the equivalent of gzip -9 ?

I don't want to just use the native exec task because then I'll lose cross platform compatibility.

The reason I ask is because I need to compress the changelog with gzip to include in a debian package (also generated via ant) and unless it uses maximum comrpession lintian spouts out a warning (which I'd obviously like to avoid.)

Why cant you create a small program with this http://commons.apache.org/compress/

try this .. http://bytemycode.com/snippets/snippet/178 for setting compression level feature to GZipOut Stream

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM