mhr3 / unzip-stream

node.js cross-platform unzip using streams
MIT License
78 stars 30 forks source link

Unsupported zip version #42

Open 1Map opened 2 years ago

1Map commented 2 years ago

I get error like:

Zip version 78.8 is not supported
at Immediate.<anonymous> (/myapp/node_modules/unzip-stream/lib/unzip-stream.js:355:33)
at processImmediate (node:internal/timers:464:21)
mickeyjohn commented 2 years ago

Hi @1Map , Could you please share a sample zip file for the error? Thanks

gazal-k commented 1 year ago

Sample zip to reproduce the issue: zip-78_8_not_supported.zip

Snippet for extraction:

createReadStream('/tmp/zip-78_8_not_supported.zip')
    .pipe(Parse())
    .on('entry', (entry: Entry) => {
        if (entry.type === 'Directory' || entry.path.startsWith('__MACOSX/') || entry.path.endsWith('.DS_Store')) {
            entry.autodrain();
            return;
        }
        console.log(`${entry.type} ${entry.path}`);
        entry.autodrain();
    }).on('close', () => console.log('done'));

Output:

File 63286267-IMG-000.jpg

<path>/node_modules/unzip-stream/lib/unzip-stream.js:355
            entry.emit("error", new Error(message));
                                ^
Error: Zip version 78.8 is not supported
    at Immediate.<anonymous> (<path>/node_modules/unzip-stream/lib/unzip-stream.js:355:33)
    at processImmediate (internal/timers.js:464:21)
1Map commented 1 year ago

This is now more than a year, and still getting this error

gazal-k commented 1 year ago

This repository, like many other OSS projects may not have any sponsorship / funding. Someone would need to contribute to this out of their own goodwill or their paid work would need to allow for a contribution to this.