[−][src]Struct compress::entropy::ari::RangeEncoder
Range Encoder basic primitive Gets probability ranges on the input, produces whole bytes of code on the output, where the code is an arbitrary fixed-ppoint value inside the resulting probability range.
Fields
threshold: Border
The minimum distance between low and hai to keep at all times, has to be at least the largest incoming 'total', and optimally many times larger
Implementations
impl RangeEncoder
[src]
pub fn new(max_range: Border) -> RangeEncoder
[src]
Create a new instance will keep the active range below 'max_range'
pub fn reset(&mut self)
[src]
Reset the current range
pub fn process(
&mut self,
total: Border,
from: Border,
to: Border,
output: &mut [Symbol]
) -> usize
[src]
&mut self,
total: Border,
from: Border,
to: Border,
output: &mut [Symbol]
) -> usize
Process a given interval [from/total,to/total) into the current range write into the output slice, and return the number of symbols produced
pub fn query(&self, total: Border, code: Border) -> Border
[src]
Query the value encoded by 'code' in range [0,total)
pub fn get_code_tail(&mut self) -> Border
[src]
Get the code tail and close the range used at the end of encoding
Auto Trait Implementations
impl RefUnwindSafe for RangeEncoder
impl Send for RangeEncoder
impl Sync for RangeEncoder
impl Unpin for RangeEncoder
impl UnwindSafe for RangeEncoder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,