pub struct GorillaDecoder<'a> { /* private fields */ }Expand description
Gorilla XOR decoder for (timestamp, f64) sample streams.
Implementations§
Source§impl<'a> GorillaDecoder<'a>
impl<'a> GorillaDecoder<'a>
Sourcepub fn new(buf: &'a [u8]) -> Self
pub fn new(buf: &'a [u8]) -> Self
Create a decoder from compressed bytes.
Expects a 4-byte LE sample count header followed by the bitstream.
Sourcepub fn next_sample(&mut self) -> Option<(i64, f64)>
pub fn next_sample(&mut self) -> Option<(i64, f64)>
Decode the next sample, or None if all samples decoded.
Sourcepub fn decode_all(&mut self) -> Vec<(i64, f64)>
pub fn decode_all(&mut self) -> Vec<(i64, f64)>
Decode all remaining samples.
Auto Trait Implementations§
impl<'a> Freeze for GorillaDecoder<'a>
impl<'a> RefUnwindSafe for GorillaDecoder<'a>
impl<'a> Send for GorillaDecoder<'a>
impl<'a> Sync for GorillaDecoder<'a>
impl<'a> Unpin for GorillaDecoder<'a>
impl<'a> UnsafeUnpin for GorillaDecoder<'a>
impl<'a> UnwindSafe for GorillaDecoder<'a>
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