thejoshwolfe/yazl

Avoid using general purpose bit 3 when possible

thejoshwolfe opened this issue · 4 comments

7-zip 9.20 seems to not support general purpose bit 3. It wouldn't be too difficult to avoid relying on general purpose bit 3 sometimes, for example when a file is added with addBuffer().

Enhancing addBuffer() to avoid general purpose bit 3 will enable users to have compatibility with 7-zip 9.20 by buffering their files in ram and using addBuffer() exclusively.

Great stuff! 👍

@thejoshwolfe

Mac's Archive Utility requires File Descriptors to include the optional signature, so yazl includes the optional file descriptor signature.

It appears that it's not possible to create an archive with yazl that can be extracted by both Mac's Archive Utility and 7-Zip 9.20. Is this correct?

How could we make this work for both applications?

If you use the addBuffer API, it avoids using general purpose bit 3, which works around the bug in 7-Zip 9.20. This is unrelated to the optional file descriptor signature and unrelated to Mac's Archive Utility.

Then unfortunately there might've been an oversight on the latest release. I've created #14 to track this.