pub struct DgramCompEncoder { /* private fields */ }Expand description
Incremental single-pass encoder for one self-contained DATA_COMP UDP
datagram payload (docs/extensions.md, section comp).
Layout of the payload after the 23-byte DATA_COMP header:
u8 flags: bit 0 (0x01) = sample 0 stored as raw little-endian bytes.u64 ts0(little-endianf64bits of sample 0).- If
flags & 0x01 != 0:channels * widthraw little-endian bytes of sample 0, followed by the LSB-first bitstream for samples1..count. - If
flags & 0x01 == 0: LSB-first bitstream starting with Rice-coded sample 0, followed by samples1..count. - For each sample
i >= 1in the bitstream:- 2nd-order
f64_to_ordtimestamp delta (adaptive Rice, 64-bit) - all
channels1st-order value deltas (adaptive Rice,width-bit)
- 2nd-order
Implementations§
Source§impl DgramCompEncoder
impl DgramCompEncoder
Sourcepub fn new(format: Format, channels: usize) -> Self
pub fn new(format: Format, channels: usize) -> Self
Create a reusable datagram block encoder for a numeric stream.
Trait Implementations§
Source§impl Clone for DgramCompEncoder
impl Clone for DgramCompEncoder
Auto Trait Implementations§
impl Forget for DgramCompEncoder
impl Freeze for DgramCompEncoder
impl Move for DgramCompEncoder
impl RefUnwindSafe for DgramCompEncoder
impl Send for DgramCompEncoder
impl Sync for DgramCompEncoder
impl Unpin for DgramCompEncoder
impl UnsafeUnpin for DgramCompEncoder
impl UnwindSafe for DgramCompEncoder
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