pub fn quick_screen(data: &[u8], threshold: f64) -> ScreenResultExpand description
Run the Shannon entropy pre-filter on data.
Builds a 256-bucket byte frequency table in one pass, computes H(X), and
compares against threshold (bits).
§Arguments
data— raw byte slice. Empty input yields H(X) = 0.0 → Skip.threshold— entropy threshold in bits. Values below this trigger Skip. A threshold of0.0means only completely constant streams are skipped.
§Complexity
O(N) in input length; O(1) in alphabet size (fixed 256 buckets).