Skip to content

Conversation

@Nanook
Copy link
Collaborator

@Nanook Nanook commented Feb 2, 2023

Split archives using SourceStream.cs were not moving on to the next part when a call Read() spanned 2 parts.

XZ stream support added to zip and zipx. (Which are created by WinZip)

The XZ decoder had a bug that was corrupting data sometimes without error. This was noticed when adding the unit test for WinZip27.XZ.zipx. The previous code fails with this zip (2 bytes in the middle of the exe are invalid). The fix was to re-port X86Converter() in BranchExecFilter.cs. I used a version from https://github.com/torvalds/linux/blob/master/lib/xz/xz_dec_bcj.c

I will also submit a PR that adds Zstandard to zip/zipx and 7zip. Currently this uses a 3rd party nuget package, I don't expect it to be merged, but it might serve as a reference.

@adamhathcock adamhathcock merged commit 9ecf652 into adamhathcock:master Mar 1, 2023
@Nanook Nanook deleted the fixes-XZ-zip branch July 23, 2025 08:45
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

Successfully merging this pull request may close these issues.

2 participants