zip deflated 0% ? Why no compression? [closed] zip deflated 0% ? Why no compression? [closed] linux linux

zip deflated 0% ? Why no compression? [closed]


Unlike tar + gzip, zip uses a new compression table for each file, so even if the four files were identical, it would try to compress each individually.

Technically, tar also sees each file but it strings them together into one long input for gzip, so the compression step works on one huge input which is why tar + gzip usually yields a smaller result than zip.

The question is why your exe files can't be compressed. exe files usually contains large amounts of easily compressible data, so they should shrink ("deflate") by at least 30%. Maybe the files are encrypted or obfuscated; these processes make the result hard to compress.


Deflated 0% means that it did try to compress, but got effectively no compression. As noted, the zip format cannot take advantage of similarity between different entries. tar + gzip can, but even then only if the similarities end up less than 32K bytes away from each other. Other formats can exploit longer distance similarities, such as xz.

It is normal for uncompressed executables to compress by 30% to 50%, which means that your executables are either a) compressed by something like UPX, b) they are self-extracting compressed data, where the decompressor is stored ahead of the compressed data, c) they are very short executables with a lot of compressed data, or d) they are mostly encrypted.


Aaron is correct. According to Wikipedia, the ZIP format compresses before it archives, so similarities among different files doesn't help compression.

Are you really trying to compress .exe files? Somehow I doubt that's your actual file type.

See http://en.wikipedia.org/wiki/ZIP_(file_format)#Advantages_and_disadvantages .