Skip to content

Expand create parity support - #2

Merged
mjc merged 35 commits into
mainfrom
feature/create-parity
Apr 22, 2026
Merged

mjc merged 35 commits into
mainfrom
feature/create-parity

Conversation

@mjc

@mjc mjc commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • add create parity audit coverage for p7zip compression knobs, split volumes, and link behavior
  • add public compression, streaming spool, split volume, and symlink metadata APIs
  • wire compression knobs into LZMA/LZMA2 encoding and document limitations around hard links and split-volume reads

Verification

  • cargo fmt
  • git diff --check
  • cargo test
  • nix-shell -p p7zip --run "cargo test interop"
  • nix-shell -p p7zip --run "cargo test create_parity"

Copilot AI review requested due to automatic review settings April 22, 2026 03:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands r7z’s “create parity” with p7zip by introducing a new writer implementation and public option types (compression tuning, streaming spool, split volumes, encryption, and symlink metadata), and by extending interop/audit tests to validate the behavior against p7zip.

Changes:

  • Replace the old builder/writer implementation with a new write module that supports codecs, header modes, encryption, solid modes, streaming/spooling, and split volumes.
  • Extend archive reading APIs with seek-backed open modes, metadata limits, and symlink metadata helpers.
  • Add/expand tests and benches covering p7zip create-parity, streaming, metadata, encryption, split volumes, and file-backed open behavior.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/support/mod.rs Disable clippy pedantic for shared test support.
tests/read_parity_test.rs Disable clippy pedantic for parity tests.
tests/p7zip_extract_parity_test.rs Update tests for new writer/builder options + ArchiveWriter::new(out, options) signature.
tests/lzma_perf_test.rs Disable clippy pedantic for perf test.
tests/interop_write_test.rs Large interop expansion: metadata, header modes, encryption, streaming, split volumes, symlink behavior.
tests/interop_test.rs Disable clippy pedantic for interop tests.
tests/file_backed_open_test.rs New tests for seek-backed open, metadata limits, and bounded extraction behavior.
tests/create_parity_audit_test.rs New p7zip create-parity audit coverage for compression knobs, split volumes, and link behavior.
src/write/model.rs New public option/model types (ArchiveOptions, CompressionOptions, EntryMeta, etc.).
src/write/mod.rs New builder/writer implementation + streaming/spooling/volumes entrypoints.
src/write/header.rs New header encoding (files info + metadata properties).
src/write/encode.rs Archive encoding, option validation, encryption wrapping, LZMA/LZMA2 tuning.
src/lib.rs Public API re-exports updated; new open options + write APIs exposed.
src/files_info.rs Add ctime/atime/start_pos fields + EntryType and symlink classification; refactor property parsing.
src/error.rs Add InvalidOptions and LimitExceeded error variants.
src/codec.rs Add size-aware decompression chain API and AES truncation support.
src/builder.rs Remove legacy builder/writer implementation.
src/bin/build_n64.rs Update docs to reflect new creation approach.
src/bcj.rs Add streaming BCJ writer + tests for streaming vs batch equivalence.
src/archive.rs Add seek-backed storage mode + metadata limits; refactor to ArchiveSource for ranged reads.
src/aes.rs Add AES property encoding + AES-CBC encryption helper; small doc updates.
benches/parse_bench.rs Add benchmarks for seek vs mmap open + extraction; create sparse fixture.
README.md Update docs for new APIs/options, seek-backed open, encryption, volumes, metadata, link semantics.
Cargo.toml Add getrandom dependency for writer/encryption/spooling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/write/encode.rs
Comment thread src/archive.rs
Comment thread src/aes.rs Outdated
@mjc
mjc merged commit b852ed2 into main Apr 22, 2026
2 checks passed
@mjc
mjc deleted the feature/create-parity branch April 22, 2026 20:02
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