Enum constriction::stream::queue::EncoderSituation
source · pub enum EncoderSituation<Word> {
Normal,
Inverted(NonZeroUsize, Word),
}
Expand description
Keeps track of yet-to-be-finalized compressed words during encoding with a
RangeEncoder
.
This type is mostly for internal use. It is only expsed via
RangeEncoder::into_raw_parts
and RangeEncoder::from_raw_parts
.
Variants§
Normal
In the Normal
situation, all full Words
of compressed data have been written to
the backend (or “bulk”), and the internal coder state holds less than one word of
additional information content.
Inverted(NonZeroUsize, Word)
The Inverted
situation occurs only rarely. In this situation, some full words of
compressed data have been held back and not yet written to the backend (or “bulk”)
because their final values may still change depending on subsequently encoded
symbols.
More precisely, a situation of Inverted(num_subsequent, first_word)
means that the
held-back words can become either first_word + 1
followed by num_subsequent
zero
words, or first_word
followed by num_subsequent
words that have all bits set.
Trait Implementations§
source§impl<Word: Clone> Clone for EncoderSituation<Word>
impl<Word: Clone> Clone for EncoderSituation<Word>
source§fn clone(&self) -> EncoderSituation<Word>
fn clone(&self) -> EncoderSituation<Word>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<Word: Debug> Debug for EncoderSituation<Word>
impl<Word: Debug> Debug for EncoderSituation<Word>
source§impl<Word> Default for EncoderSituation<Word>
impl<Word> Default for EncoderSituation<Word>
source§impl<Word: PartialEq> PartialEq for EncoderSituation<Word>
impl<Word: PartialEq> PartialEq for EncoderSituation<Word>
source§fn eq(&self, other: &EncoderSituation<Word>) -> bool
fn eq(&self, other: &EncoderSituation<Word>) -> bool
self
and other
values to be equal, and is used
by ==
.