Open GoogleCodeExporter opened 9 years ago
https://code.google.com/p/zopfli/issues/detail?id=31
Original comment by alex.hel...@gmail.com
on 18 Jan 2014 at 3:29
I agree that Zopfli ought to have .ZIP file support. Currently, when running it
as a command-line utility, it says that it can output as Gzip format (default),
DEFLATE format, or ZLib format. So currently, you can use it to (re)compress
.tar.gz archives, by decompressing them back to .tar archives and then using
Zopfli to compress to .tar.gz. However, Zopfli doesn't support outputting in
.ZIP format (although standard PKzip2/InfoZip compatible .ZIP files do use the
DEFLATE compression codec). Many other types of files, like .JAR files used by
Java, the OpenDocument files used by MS Office 2007 and later, and many many
others, are actually renamed .ZIP files. So adding support for (re)compressing
.ZIP files would allow (re)compressing Java .JAR files, MS Office OpenDocument
files, and many others.
So my idea for .ZIP support is to add ZIP as a possible output format, and
either allow for inputting multiple files and/or directories (which would
require being able to process wildcards and recursively going through
subdirectories), or, alternatively, inputting a single .ZIP or .TAR or .TAR.GZ
or whichever format is easiest, and compressing it into a new .ZIP file as the
output.
Also I don't quite understand how it is supposed to work on .PNG files (if at
all). The only files I seem to be able to get it to work on (with the
command-line version) are .gz files, .tar.gz files, and so on. Anyway, I don't
have any patches to submit to implement this, this is just a feature
request/help request that is pretty similar to the above one, which is why I'm
adding it as a comment instead of as a separate bug report. Any comment by the
developers of Zopfli on how it can be used to implement .ZIP archive format
compression would also be appreciated (as would implementing said .ZIP support
in Zopfli's command-line tool).
Original comment by omi...@gmail.com
on 15 Feb 2014 at 7:44
Gzip is implemented because it is a header of a few bytes around DEFLATE. The
.ZIP file format uses DEFLATE too but has a lot of features: multiple files,
directories, encryption, ... that require a dedicated encoder/decoder.
So to implement .ZIP, an existing or new zip encoder can use Zopfli's DEFLATE
as its compression backend. It's out of scope to implement it here now though.
For PNG, the same is possible: using Zopfli as the DEFLATE/gzip backend of a
PNG encoder. This has been done several times, including in the repository of
Zopfli itself
(https://code.google.com/p/zopfli/source/browse/#git%2Fsrc%2Fzopflipng) as well
as projects which use other PNG optimizers combined with Zopfli.
Original comment by lode.van...@gmail.com
on 30 Jun 2014 at 4:07
afaict pigz supports zopfli for zip files
Original comment by alex.hel...@gmail.com
on 1 Jul 2014 at 11:05
AdvanceCOMP can recompress ZIP files with Zopfli like this:
# advzip --recompress -4 --iter 100 my.jar
http://advancemame.sourceforge.net/doc-advzip.html
Original comment by dajhorn@vanadac.com
on 13 Jul 2014 at 3:36
Original issue reported on code.google.com by
bathtub...@gmail.com
on 1 Nov 2013 at 9:26Attachments: