//! Shannon entropy over byte slices.
//!
//! Used to spot **hidden encrypted volumes**: a partition whose content is
//! near-maximal entropy (≈ 8 bits/byte) with no readable filesystem structure is
//! consistent with an encrypted container (`VeraCrypt` / detached LUKS).
/// Entropy (bits/byte) above which a region is treated as encrypted/random
/// rather than a structured filesystem.
pub const HIGH_ENTROPY_THRESHOLD: f64 = 7.0;
/// Compute the Shannon entropy (bits per byte, range 0.0–8.0) of `data`.
///
/// Returns `0.0` for an empty slice.
// counts/len fit f64 exactly for realistic inputs