pub struct ByteAnalyzer { /* private fields */ }Expand description
Single-byte and double-byte statistical analyzer
Implementations§
Source§impl ByteAnalyzer
impl ByteAnalyzer
Sourcepub fn new() -> ByteAnalyzer
pub fn new() -> ByteAnalyzer
Creates a new ByteAnalyzer instance.
Initializes empty frequency maps and resets counters.
Sourcepub fn analyze(&mut self, data: &[u8]) -> Result<AnalysisResult, SubXError>
pub fn analyze(&mut self, data: &[u8]) -> Result<AnalysisResult, SubXError>
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§
Source§impl Default for ByteAnalyzer
impl Default for ByteAnalyzer
Source§fn default() -> ByteAnalyzer
fn default() -> ByteAnalyzer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ByteAnalyzer
impl RefUnwindSafe for ByteAnalyzer
impl Send for ByteAnalyzer
impl Sync for ByteAnalyzer
impl Unpin for ByteAnalyzer
impl UnsafeUnpin 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