Skip to content

Support LZMA (method 14) compression in zip archives - #180

Open
jonnyyu wants to merge 2 commits into
facebook:mainfrom
jonnyyu:wip/yujo/zip-lzma
Open

jonnyyu wants to merge 2 commits into
facebook:mainfrom
jonnyyu:wip/yujo/zip-lzma

Conversation

@jonnyyu

@jonnyyu jonnyyu commented Oct 17, 2026

Copy link
Copy Markdown

Summary

Enable the lzma feature of the zip crate so that zip archives with LZMA-compressed entries (zip compression method 14) can be unpacked. Before this change, such archives failed with compression method not supported: 14.

  • Cargo.toml: add lzma to the zip features. This adds the pure-Rust lzma-rust2 dependency.
  • src/util/unarchive.rs: add a unit test that unpacks src/util/testdata/lzma.zip. The file was created with 7z a -tzip -mm=LZMA. The test fails without the lzma feature.
  • dotslash-file.md: document the zip compression methods that are supported (store, deflate, LZMA).

Test plan

  • cargo test passes.
  • cargo clippy shows no new warnings compared to main.
  • cargo build --release succeeds.
  • Manually verified on Windows: a DotSlash file with "format": "zip" that points to an LZMA zip built with 7-Zip fails on main and runs with this change.

🤖 Generated with Claude Code

jonnyyu and others added 2 commits October 16, 2026 23:00
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@meta-cla meta-cla Bot added the cla signed label Oct 17, 2026
@meta-codesync

meta-codesync Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D125825860. (Because this pull request was imported automatically, there will not be any future comments.)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant