pub struct ByteAnalyzer { /* private fields */ }Expand description
Single-byte and double-byte statistical analyzer
Implementations§
Source§impl ByteAnalyzer
impl ByteAnalyzer
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ByteAnalyzer instance.
Initializes empty frequency maps and resets counters.
Sourcepub fn analyze(&mut self, data: &[u8]) -> Result<AnalysisResult>
pub fn analyze(&mut self, data: &[u8]) -> Result<AnalysisResult>
Analyzes the given byte data and returns encoding analysis results.
§Arguments
data- The byte data to analyze for encoding detection
§Returns
Returns an AnalysisResult containing statistical information about
the data that can be used for encoding detection.
§Errors
Returns an error if the analysis cannot be completed due to insufficient data or computational issues.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ByteAnalyzer
impl RefUnwindSafe for ByteAnalyzer
impl Send for ByteAnalyzer
impl Sync for ByteAnalyzer
impl Unpin for ByteAnalyzer
impl UnwindSafe for ByteAnalyzer
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