Skip to content

Part 2: Warnings about "Header Error" when creating large zip files with ZIP64 #627

@Rai-Rai

Description

@Rai-Rai

I do not have permission to reopen this issue (#625), so I've created a new one.

Thanks for the quick fix.
I've tested it and it looked fine on the first try. Then I started to remove all the test parameters that I've used over time and suddenly the error was back, but only in my project, the test.html worked fine.

The test.html file created exactly 4GB of data, and with that 2.8.13 works fine.
But as soon as it goes above 4GB AND the parameter "zip64: true" is not set manually in ZipWriter Constructor the header error is back.

According to the docu, the parameter should be set automatically if required: https://gildas-lormeau.github.io/zip.js/api/interfaces/ZipWriterConstructorOptions.html#zip64
zip64 is automatically set to true when necessary (e.g. compressed data larger than 4GB or with unknown size).

Here' an updated testfile, it now creates 5GB of data, starting with file 41 the header error appears.
Line 14-18 (commented out): works as long as zip64:true is set manually
Line 21+22: header error is back, but zip64 should be set automatically according to docs
test-zip64-issue.html

I've also removed the zip:64 parameter from the zipWriter.add section, this apparently makes no difference with the 100MB testfiles.
In my case I don't have a single file with more than 4GB so I didn't test this, but the docu is the same about automatically adding the parameter if required. It's quit likely that the same problem happens here as well.

(Note: I've also removed the keepOrder:true (this is the default value either way))

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