Struct arcode::ArithmeticEncoder
source · [−]pub struct ArithmeticEncoder { /* private fields */ }
Implementations
sourceimpl ArithmeticEncoder
impl ArithmeticEncoder
sourcepub fn new(precision: u64) -> Self
pub fn new(precision: u64) -> Self
Arguments
precision
is the bit precision
that the encoder should use. If the
precision is too low than symbols will not be able to be differentiated.
pub fn encode<T: Write>(
&mut self,
symbol: u32,
source_model: &Model,
output: &mut BitWriter<T>
) -> Result<(), Error>
pub fn finish_encode<T: Write>(
&mut self,
output: &mut BitWriter<T>
) -> Result<(), Error>
Auto Trait Implementations
impl RefUnwindSafe for ArithmeticEncoder
impl Send for ArithmeticEncoder
impl Sync for ArithmeticEncoder
impl Unpin for ArithmeticEncoder
impl UnwindSafe for ArithmeticEncoder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more