Struct stream_vbyte::DecodeCursor
[−]
[src]
pub struct DecodeCursor<'a> { /* fields omitted */ }
Decode in user-selectable batch sizes. Also allows skipping numbers that you don't care about.
Methods
impl<'a> DecodeCursor<'a>
[src]
fn new(input: &'a [u8], count: usize) -> DecodeCursor<'a>
[src]
Create a new cursor.
fn skip(&mut self, to_skip: usize)
[src]
Skip to_skip
numbers. to_skip
must be a multiple of 4, and must not be greater than the
count of remaining numbers that are in complete blocks of 4. In other words, if you have
7 numbers remaining (a block of 4 and a partial block of 3), the only count you can skip is
4.
Skipping numbers is faster than decoding them.
fn decode<D: Decoder>(&mut self, output: &mut [u32]) -> usize
[src]
Decode into the output
buffer. The buffer must be at least of size 4.
Returns the number of numbers decoded by this invocation, which may be less than the size of the buffer.
fn input_consumed(&self) -> usize
[src]
Returns the total length of input scanned so far: the complete block of control bytes, plus any encoded numbers decoded.
fn has_more(&self) -> bool
[src]
Returns true iff there are more numbers to be decoded.