Search code examples
linuxwindowscompressionzip

How to create minimum size (empty) zip file, which has 22B?


I´m trying to solve some security problem with file, whose MD5 hash is 76cdb2bad9582d23c1f6f4d868218d6c.

I don't have that file, but based on internet MD5 searches, I think, it is minimum size zip file. I found one example and its content is exactly same like minimum size zip file.

Is it possible to create such minimum size zip file (22 B) with Linux (or Windows) command?

BTW: Recently, I solved similar task with gzip file: gzip -n EmptyFileName


Solution

  • Here you go:

    50 4b 05 06 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00
    

    That has the MD5 signature you provided.

    If you have Info-ZIP's zip, you can create it thusly:

    zip empty.zip anyfile
    zip -d empty.zip anyfile
    

    That adds "anyfile" to a new zip file, and then deletes it from the zip file, leaving it empty.