Skip to main content

Module comparison

Module comparison 

Source
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§

AggregateDelta
Aggregate statistics delta between two streams.
ComparisonResult
Full comparison result between two byte streams.
DigramAnalysis
Digram (byte bigram) chi-squared uniformity.
MarkovAnalysis
Per-bit Markov transition probabilities.
MultiLagAnalysis
Autocorrelation at multiple lags.
RunLengthComparison
Byte run-length distributions.
TemporalAnalysis
Sliding-window temporal anomaly detection using theoretical parameters.
TwoSampleTests
Two-sample statistical tests that directly compare stream A against stream B.
WindowAnomaly
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 SourceAnalysis results.
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.