Skip to content

ewf: make ewfinfo reporting binary-owned#145

Merged
omerbenamram merged 5 commits intomasterfrom
ewfinfo-binary-owned
Dec 28, 2025
Merged

ewf: make ewfinfo reporting binary-owned#145
omerbenamram merged 5 commits intomasterfrom
ewfinfo-binary-owned

Conversation

@omerbenamram
Copy link
Copy Markdown
Owner

@omerbenamram omerbenamram commented Dec 27, 2025

Summary

  • Move ewfinfo report/rendering into the ewfinfo binary while keeping the ewf library focused on spec-level extraction (EwfReader::image_metadata()).
  • Add schema-aligned DFXML output via new crates/dfxml (with vendored schema + validation test).
  • Factor shared EWF1/EWF2 parsing/writing primitives into dedicated modules and improve ewfinfo text output formatting.

Test plan

  • cargo test -p ewf --all-targets
  • cargo clippy -p ewf --all-targets --all-features -- -D warnings

Notes

  • Large local fixture testdata/ewf/nps-2010-emails.E01 is intentionally not included.

Note

Implements a binary-owned ewfinfo reporter and adds a minimal DFXML writer crate, while refactoring EWF internals for clarity.

  • New crates/dfxml with schema-aligned writers and vendored dfxml.xsd (+ validation test)
  • New ewfinfo binary (clap+miette): image metadata report in -f text|dfxml; supports -A/-d/-i/-m/-e, and logical -F/-H/-B (text/bodyfile) with path separator control
  • Library remains spec-focused: EwfReader::image_metadata() feeds report; no best-effort fallbacks (explicit Unsupported/TODO)
  • Refactors EWF1/EWF2 primitives into modules (ewf1::{file_header,header,runs,section,volume}, ewf2::{file_header,chunk,section})
  • Adds bodyfile/hierarchy/file-entry text renderers (binary-only) and formatting helpers; updates workspace/Cargo dependencies

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

Move ewfinfo report/rendering into the ewfinfo binary and expose spec-oriented image metadata from the ewf library.
Also add schema-aligned DFXML output via a dedicated dfxml crate and factor shared EWF1/EWF2 format primitives into documented modules.
Match libewf’s file format strings and format epoch-based header dates.
Add a fixture-backed regression test plus Cursor rule/docs for the parity work.
Plumb EWF1/EWF2 error granularity through metadata and writer so reports reflect the recorded value.
Avoid web-searching libewf; use the locally pinned commit under external/refs when working in worktrees.
Move EWF1/EWF2 headers, section descriptors, tables, and run/volume parsing to
binrw-based definitions to keep read/write logic symmetric and self-documenting.
@omerbenamram omerbenamram merged commit 6c60709 into master Dec 28, 2025
4 checks passed
@omerbenamram omerbenamram deleted the ewfinfo-binary-owned branch December 28, 2025 08:28
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