RansWriter32

Struct RansWriter32 

Source
pub struct RansWriter32<W> { /* private fields */ }

Implementations§

Source§

impl<W: Write> RansWriter32<W>

Source

pub fn new(writer: W) -> Self

Trait Implementations§

Source§

impl<W: Write> CabacWriter<VP8Context> for RansWriter32<W>

Source§

fn put(&mut self, bit: bool, branch: &mut VP8Context) -> Result<()>

write bits using given context for probability
Source§

fn put_bypass(&mut self, bit: bool) -> Result<()>

write using bypass bin for bits that aren’t worth encoding
Source§

fn finish(&mut self) -> Result<()>

flush any remaining state
Source§

fn put_n_bits<const A: usize>( &mut self, bits: u64, num_bits: usize, contexts: &mut [Context; A], ) -> Result<()>

default implementation to write num_bits of the lower bits
Source§

fn put_unary_encoded<const A: usize>( &mut self, v: usize, contexts: &mut [Context; A], ) -> Result<()>

default implementation to write unary encoded value
Source§

fn put_branched<const A: usize, const B: usize>( &mut self, v: u8, branches: &mut [[Context; B]; A], ) -> Result<()>

default implementation to write branched value, which consists of using a context for each bit, and the value is the index of the context as it is built up Read more

Auto Trait Implementations§

§

impl<W> Freeze for RansWriter32<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for RansWriter32<W>
where W: RefUnwindSafe,

§

impl<W> Send for RansWriter32<W>
where W: Send,

§

impl<W> Sync for RansWriter32<W>
where W: Sync,

§

impl<W> Unpin for RansWriter32<W>
where W: Unpin,

§

impl<W> UnwindSafe for RansWriter32<W>
where W: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.