pub struct ByteRansEncoderMulti<const N: usize> { /* private fields */ }Expand description
Multi-stream interleaved rANS encoder - byte-aligned version.
Implementations§
Source§impl<const N: usize> ByteRansEncoderMulti<N>
impl<const N: usize> ByteRansEncoderMulti<N>
Sourcepub fn new(max_len: usize) -> Self
pub fn new(max_len: usize) -> Self
Creates a new ByteMultiRansEncoder instance that can contain max_len
bytes in the internal buffer.
Note that most of the API is inside the RansEncoderMulti trait, so
you probably want to use rans::RansEncoderMulti.
§Examples
use rans::byte_encoder::ByteRansEncoderMulti;
use rans::RansEncoderMulti;
let encoder = ByteRansEncoderMulti::<2>::new(1024);
assert_eq!(encoder.data(), []);Trait Implementations§
Source§impl<const N: usize> Debug for ByteRansEncoderMulti<N>
impl<const N: usize> Debug for ByteRansEncoderMulti<N>
Source§impl RansEncoder for ByteRansEncoderMulti<1>
impl RansEncoder for ByteRansEncoderMulti<1>
Source§impl<const N: usize> RansEncoderMulti<N> for ByteRansEncoderMulti<N>
impl<const N: usize> RansEncoderMulti<N> for ByteRansEncoderMulti<N>
Source§type Symbol = ByteRansEncSymbol
type Symbol = ByteRansEncSymbol
Type of a Symbol value that can be encoded using this encoder.
Source§fn reset(&mut self)
fn reset(&mut self)
Resets this encoder’s internal state, so that the internal buffer
becomes empty. Read more
Source§fn put_at(&mut self, channel: usize, symbol: &Self::Symbol)
fn put_at(&mut self, channel: usize, symbol: &Self::Symbol)
Puts a symbol into the specified channel. Read more
Source§fn flush_at(&mut self, channel: usize)
fn flush_at(&mut self, channel: usize)
Flushes the encoder’s intermediate data at given channel into the
buffer. Read more
Source§fn flush_all(&mut self)
fn flush_all(&mut self)
Flushes the encoder’s intermediate data at all channels into the buffer. Read more
Auto Trait Implementations§
impl<const N: usize> !Send for ByteRansEncoderMulti<N>
impl<const N: usize> !Sync for ByteRansEncoderMulti<N>
impl<const N: usize> Freeze for ByteRansEncoderMulti<N>
impl<const N: usize> RefUnwindSafe for ByteRansEncoderMulti<N>
impl<const N: usize> Unpin for ByteRansEncoderMulti<N>
impl<const N: usize> UnsafeUnpin for ByteRansEncoderMulti<N>
impl<const N: usize> UnwindSafe for ByteRansEncoderMulti<N>
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