Skip to content

ewf: extract EWF implementation into dedicated crate#144

Merged
omerbenamram merged 5 commits intomasterfrom
ewf-crate-extraction
Dec 27, 2025
Merged

ewf: extract EWF implementation into dedicated crate#144
omerbenamram merged 5 commits intomasterfrom
ewf-crate-extraction

Conversation

@omerbenamram
Copy link
Copy Markdown
Owner

@omerbenamram omerbenamram commented Dec 27, 2025

Summary

  • Adds a new crates/ewf crate implementing EWF1/EWF2 readers/writers, LEF reading, and a copy-on-write delta overlay.
  • Updates crates/ntfs to use ewf::EwfReader while preserving the existing ntfs::image::EwfImage API.
  • Pins the libyal/libewf reference commit (without vendoring a full snapshot) for parity work.

Test plan

  • cargo test -p ewf -p ntfs

Note

Adds a spec-driven crates/ewf crate and integrates it into the workspace.

  • Implements EwfReader (EWF1/EWF2), EwfWriter (E01/S01, Ex01), LefReader (.L01/.Lx01), and EwfDelta (copy‑on‑write overlay); includes chunk decompression/checksums, sector tables, section parsing, ADCRYPT rejection, and verification helpers with extensive tests
  • Adds crates/ewf/README.md and COMPAT.md (libewf parity checklist)
  • Updates workspace Cargo.toml to include crates/ewf; minor docs link in aff README
  • Refines .gitignore to track curated external/refs (including repos/*.commit) and ignore tmp artifacts

Written by Cursor Bugbot for commit 6150d05. This will update automatically on new commits. Configure here.

Comment thread crates/ewf/src/reader.rs Outdated
Comment thread crates/ewf/src/reader.rs
Base automatically changed from ntfs to master December 27, 2025 11:06
Adds a new `ewf` crate with EWF1/EWF2 readers and writers, LEF read support, and a delta overlay.
The `ntfs` image backend now wraps `ewf::EwfReader` while preserving the existing `EwfImage` API.

Pins the libewf reference commit (without vendoring a full snapshot) for parity work.
Use the bounded section data length to avoid over-reading malformed sections, and add a regression test that corrupts the descriptor-reported size.
Reject bp=0/sb=0 early to prevent chunk_size=0 division-by-zero panics, and add regression tests for Ex01/Lx01.
Document supported AFFLIBv3 behaviors and pin upstream reference commits for parity work.
@omerbenamram omerbenamram merged commit 7295954 into master Dec 27, 2025
4 checks passed
@omerbenamram omerbenamram deleted the ewf-crate-extraction branch December 27, 2025 12:21
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.

1 participant