Skip to content

Different md5 for the same archive #590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pippo111 opened this issue Apr 1, 2019 · 2 comments
Open

Different md5 for the same archive #590

pippo111 opened this issue Apr 1, 2019 · 2 comments
Labels

Comments

@pippo111
Copy link

pippo111 commented Apr 1, 2019

Hi,
I'm tring to get md5 of the archive, unfortunately each time I create an archive it has different md5 of the content. I thought that it was because of file creation time, so I set:

zip.file(file.path, file, { date: new Date('January 01, 2019 00:00:01') })

But unfortunately there is always small difference between archives:

Zrzut20190401152205

How to calculate md5 or crc or whatever in this case, to be sure that two archives contains the same files ?

@YukariTea
Copy link

This is a documented issue: https://stuk.github.io/jszip/documentation/limitations.html

Only the zips are different, the metadata may be different but the files' content should be the same, I think. You would have to compare the checksum of every single file between the two zips to see if they have the same files.

@ronkorving
Copy link

@YukariTea What part of that documentation explains this behavior?

The closest I see is:

Reading and generating a zip file won’t give you back the same file. Some data are discarded (file metadata) and other are added (subfolders).

But that doesn't explain how 2 runs on the same data yields different output, does it?

@jonkoops jonkoops added the bug label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants