Expand description
Differential comparison of two byte streams.
All functions operate on raw &[u8] — no session I/O, no formatting.
The CLI layer handles loading, printing, and serialization.
§Two-sample philosophy
Per-stream metrics (Shannon H, autocorrelation, etc.) are computed by
analysis::full_analysis and displayed side-by-side by the CLI.
This module adds cross-stream statistics that directly test whether
two byte streams differ: two-sample KS, chi-squared homogeneity,
Cliff’s delta, and Mann-Whitney U.
Structs§
- Aggregate
Delta - Aggregate statistics delta between two streams.
- Comparison
Result - Full comparison result between two byte streams.
- Digram
Analysis - Digram (byte bigram) chi-squared uniformity.
- Markov
Analysis - Per-bit Markov transition probabilities.
- Multi
LagAnalysis - Autocorrelation at multiple lags.
- RunLength
Comparison - Byte run-length distributions.
- Temporal
Analysis - Sliding-window temporal anomaly detection using theoretical parameters.
- TwoSample
Tests - Two-sample statistical tests that directly compare stream A against stream B.
- Window
Anomaly - A single anomalous window detected during temporal analysis.
Functions§
- aggregate_
delta - Compute aggregate statistics for both streams and Cohen’s d effect size.
- cliffs_
delta - Cliff’s delta: non-parametric effect size for ordinal data.
- compare
- Compare two byte streams and produce a full differential report.
- compare_
with_ analysis - Compare two byte streams, reusing pre-computed
SourceAnalysisresults. - digram_
analysis - Compute digram chi-squared statistics for both streams.
- markov_
analysis - Per-bit first-order Markov transition probabilities.
- multi_
lag_ analysis - Autocorrelation at standard lags for both streams.
- run_
length_ comparison - Byte run-length distributions for both streams.
- temporal_
analysis - Sliding-window anomaly detection over both streams.
- two_
sample_ tests - Run proper two-sample statistical tests comparing stream A directly to stream B.