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

7-zip 9.20 fails to extract zip produced by yazl #11

Closed
joaomoreno opened this issue Mar 19, 2015 · 5 comments
Closed

7-zip 9.20 fails to extract zip produced by yazl #11

joaomoreno opened this issue Mar 19, 2015 · 5 comments

Comments

@joaomoreno
Copy link
Contributor

My script creates the simplest zip file possible:

var yazl = require('yazl');
var fs = require('fs');

var zipfile = new yazl.ZipFile();

var ostream = fs.createWriteStream('out.zip');
zipfile.outputStream.pipe(ostream);

zipfile.addBuffer(new Buffer('hello'), 'hello.txt');
zipfile.end();

I cannot extract this file with 7-zip 9.20 (its latest stable release). This application has a feature that verifies an archive and with the produced zip I get:

screen shot 2015-03-19 at 16 01 09

I can successfully extract it using the native Windows Extract... context menu action. I can also extract it using 7-zip 9.38 (their latest beta release).

@thejoshwolfe
Copy link
Owner

I've reproduced this issue. It is difficult to be motivated to do anything in response to this, knowing that the next version of 7-zip fixes what appears to be their incompatibility with the zip file spec.

I'll play around with the old (stable) version of 7-zip to see if there's something easy to be done about it.

@joaomoreno
Copy link
Contributor Author

Thanks, I'd be awesome to nail it, since many users are still on 9.20 and there's no automatic update feature in that app. 👍

@thejoshwolfe
Copy link
Owner

I've determined that 7-zip 9.20 does not support general purpose bit 3. see https://github.com/thejoshwolfe/yazl/blob/master/README.md#general-purpose-bit-flag for why yazl relies on general purpose bit 3 being supported. See also #13 (opened in response to this issue).

@thejoshwolfe
Copy link
Owner

here was my test to determine that 7-zip 9.20 does not support general purpose bit 3:

http://wolfesoftware.com/zip_without_general_purpose_bit_3.zip

http://wolfesoftware.com/zip_with_general_purpose_bit_3.zip

@thejoshwolfe
Copy link
Owner

version 2.2.0 is published. see the note here for how to create zip files with yazl that 7-Zip 9.20 can read: https://github.com/thejoshwolfe/yazl/blob/master/README.md#addbufferbuffer-metadatapath-options

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

2 participants