pub struct EntStats {
pub entropy: f64,
pub compression_percent: f64,
pub chisquare: f64,
pub p_value: f64,
pub mean: f64,
pub pi_estimate: f64,
pub serial_correlation: f64,
pub byte_frequencies: Option<Vec<(u8, usize, f64)>>,
pub bit_frequencies: Option<[(usize, f64); 2]>,
}Expand description
Result of statistical analysis on binary data.
Fields§
§entropy: f64Shannon entropy in bits per byte (or bit).
compression_percent: f64Ideal compression percentage based on entropy.
chisquare: f64Chi-square test value.
p_value: f64p-value of chi-square test.
mean: f64Arithmetic mean of all data bytes.
pi_estimate: f64Estimated value of Pi from Monte Carlo method.
serial_correlation: f64Serial correlation coefficient between adjacent values.
byte_frequencies: Option<Vec<(u8, usize, f64)>>Byte frequency table: (value, count, fraction).
bit_frequencies: Option<[(usize, f64); 2]>Bit frequency table: [(count, fraction) for 0, 1].
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EntStats
impl RefUnwindSafe for EntStats
impl Send for EntStats
impl Sync for EntStats
impl Unpin for EntStats
impl UnwindSafe for EntStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.