Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is it possible that a zip entry has no name?

When i receive a zip file, is it possible at least in theory, that an entry in the zip file has no name?

I know it is possible that zip entries have duplicate names, or whitespace names. But can the name just be empty while the content is not?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Yes, a zip file is allowed by the spec to have a file name length of zero. Depending on your interpretation that either means "no file name" or that the file name is the empty string.

The spec explicitly mentions that

If input came from standard input, the file name length is set to zero.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading