Skip to content

crc32 often returns a negative value. #1

@Windows81

Description

@Windows81

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions