Trait stream_vbyte::Decoder
[−]
[src]
pub trait Decoder {
fn decode_quads(
control_bytes: &[u8],
encoded_nums: &[u8],
output: &mut [u32],
control_bytes_to_decode: usize
) -> (usize, usize);
}Decode bytes to numbers.
Required Methods
fn decode_quads(
control_bytes: &[u8],
encoded_nums: &[u8],
output: &mut [u32],
control_bytes_to_decode: usize
) -> (usize, usize)
control_bytes: &[u8],
encoded_nums: &[u8],
output: &mut [u32],
control_bytes_to_decode: usize
) -> (usize, usize)
Decode encoded numbers in complete quads.
Only control bytes with 4 corresponding encoded numbers will be provided as input (i.e. no trailing partial quad).
control_bytes are the control bytes that correspond to encoded_nums.
output is the buffer to write decoded numbers into, and must be at least
control_bytes_to_decode * 4 in length.
control_bytes_to_decode * 4 may be greater than the number of control bytes remaining.
Implementations may decode at most control_bytes_to_decode control bytes, but may decode
fewer.
Implementations must not write to output outside of the area that will be populated by
decoded numbers when all control bytes are processed..
Returns the number of numbers decoded into output and the number of bytes read from
encoded_nums.