Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 224
mirekbarton Avatar asked Mar 24 '15 14:03

mirekbarton


People also ask

How do I create a 0 KB zip file?

1) Locate the place you want to create a ZIP File. Right-click on the blank space. Then click New > Compressed(zipped) Folder. 2) Now a new blank ZIP File is created, you can rename it and add the file or folder you want to compress into it by easy copy-paste.

How big is an empty zip file?

Empty zip file size shows 22 bytes size.

Can a zip file be empty?

If you are getting a message that the zip file is empty when you try to extract the files, it probably means the file was corrupted during download. This can sometimes happen when you are using certain browser versions that handle file downloads differently from most other browsers.

What method does the zip command use to make the files smaller?

The gzip command is very simple to use. You just type "gzip" followed by the name of the file you want to compress. Unlike the commands described above, gzip will encrypt the files "in place". In other words, the original file will be replaced by the encrypted file.


1 Answers

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.

like image 186
Mark Adler Avatar answered Sep 24 '22 02:09

Mark Adler