Skip to content
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

crc32 often returns a negative value. #1

Open
Windows81 opened this issue Dec 15, 2019 · 0 comments
Open

crc32 often returns a negative value. #1

Windows81 opened this issue Dec 15, 2019 · 0 comments

Comments

@Windows81
Copy link

Windows81 commented Dec 15, 2019

This is problematic because your zip() treats that as an error and throws an (although accurate) exception. For my current project, my work-around would be:

const buffer = fs.readFileSync('themes/themelist.xml');
const zip = nodezip.create();
zip.add(zipName, buffer);
if (zip[zipName].crc32 < 0) zip[zipName].crc32 += Math.pow(2, 32);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant