Digital Forensics / Editorial solution guide

Investigate equal record counts with different contents

Compare parser outputs by source identity and account for differences in an offline synthetic dataset.

About 3 min readContent reviewed

Read-only knowledge base ยท No public comments

Recognize the symptoms

Two parsers report the same number of records from a synthetic input, but a sample of their results differs. Equal totals can conceal a dropped record balanced by an extra duplicate or a different filtering decision. Preserve both outputs and the input before changing either parser.

Understand the likely causes

  • The parsers may select different record types, treat duplicates differently, ignore malformed rows, or assign different identities after normalization. A tool version or encoding assumption can also alter output. These possibilities require record-level comparison; the common total does not identify the cause.

1. Preserve inputs and comparison scope

Record the input identifier and digest, parser names and versions, configuration, record selection, output format and observed counts. Work on documented synthetic copies in an offline workspace and retain the original unchanged. Preserve warnings and rejected records as well as successful output. Confirm that both tools processed the same source bytes and scope. If the inputs differ, equal output counts do not form a meaningful parser comparison until that difference is explained.

2. Compare record identities rather than totals

For a small known fixture, assign each source row a stable synthetic identifier or byte offset before normalization. Compare the identifiers selected by each parser and account separately for accepted, rejected, duplicated and unmatched records. Identify the first divergence and inspect its original bytes and declared structure. Keep a mapping from derived rows back to the source; a normalized value alone may not distinguish two records. Record any assumptions about encoding, timestamps and duplicate handling.

3. Test a specific explanation

Construct separate synthetic fixtures for the suspected behavior, such as a duplicate row and a truncated record, with independently stated expected outcomes. Run both methods with the same documented scope and retain warnings. Change one parser setting at a time in the isolated workspace. If a tool cannot represent a record, report that limitation rather than silently inserting or deleting a row to force agreement. An unresolved discrepancy remains a qualification on downstream conclusions.

4. Verify accounting and report limits

Reconcile each source record with its accepted, rejected or duplicate treatment and repeat the comparison after the documented correction. Verify that the resulting identifiers and values match expectations, not just that the totals agree. Have a second analyst reproduce the small fixture and review the mapping to original bytes. Record tool versions, assumptions and remaining ambiguities in the report. Agreement on a controlled fixture supports that method for the tested formats; it does not validate every parser or source file.

Verify the fix

Each synthetic source record is accounted for, the divergent treatment is explained or explicitly unresolved, and the comparison can be replayed from preserved inputs.

Keep it from recurring

  • Maintain known fixtures with duplicates and malformed records, record parser settings and warnings, and retain source-to-output mappings when normalizing analytical data.

Official references