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

out of range error at 2.5MB #536

Open
Calemy opened this issue Sep 2, 2024 · 1 comment
Open

out of range error at 2.5MB #536

Calemy opened this issue Sep 2, 2024 · 1 comment

Comments

@Calemy
Copy link

Calemy commented Sep 2, 2024

    const zip = new AdmZip(`file.osz`) //please rename attatched .zip to .osz
    const nvZip = new AdmZip()
    const entries = zip.getEntries()
    for(const entry of entries) {
        if(entry.entryName.includes(".avi") || entry.entryName.includes(".mp4") || entry.entryName.includes(".flv")) continue;
        console.log(entry.entryName) //<- watch how it get stuck at audio.mp3
        nvZip.addFile(entry.entryName, entry.getData()) //<- out of range error at 2643799 bytes (2.5MB?)
    }

    console.log(nvZip.getEntryCount()) //<- this never runs

    const buffer = await nvZip.toBufferPromise()

file.zip

@Calemy
Copy link
Author

Calemy commented Sep 2, 2024

okay i figured it out. The zip is corrupted. But why does it not detect this before because usually it already throws an invalid header error.

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