ewf: make ewfinfo reporting binary-owned#145
Merged
omerbenamram merged 5 commits intomasterfrom Dec 28, 2025
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ewfinforeport/rendering into theewfinfobinary while keeping theewflibrary focused on spec-level extraction (EwfReader::image_metadata()).crates/dfxml(with vendored schema + validation test).ewfinfotext output formatting.Test plan
cargo test -p ewf --all-targetscargo clippy -p ewf --all-targets --all-features -- -D warningsNotes
testdata/ewf/nps-2010-emails.E01is intentionally not included.Note
Implements a binary-owned ewfinfo reporter and adds a minimal DFXML writer crate, while refactoring EWF internals for clarity.
crates/dfxmlwith schema-aligned writers and vendoreddfxml.xsd(+ validation test)ewfinfobinary (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 controlEwfReader::image_metadata()feeds report; no best-effort fallbacks (explicit Unsupported/TODO)ewf1::{file_header,header,runs,section,volume},ewf2::{file_header,chunk,section})Written by Cursor Bugbot for commit 3f36392. This will update automatically on new commits. Configure here.