Struct CompressedInput

Source
pub struct CompressedInput<R: Read> { /* private fields */ }
Expand description

Read compressed ADΔER data from a stream.

Implementations§

Source§

impl<R: Read> CompressedInput<R>

Source

pub fn new( delta_t_max: DeltaT, ref_interval: DeltaT, adu_interval: usize, ) -> Self
where Self: Sized,

Create a new compressed input stream.

Trait Implementations§

Source§

impl<R: Read + Seek> ReadCompression<R> for CompressedInput<R>

Source§

fn magic(&self) -> [u8; 5]

Returns the magic number for the codec
Source§

fn meta(&self) -> &CodecMetadata

Returns a reference to the metadata
Source§

fn meta_mut(&mut self) -> &mut CodecMetadata

Returns a mutable reference to the metadata
Source§

fn read_bytes( &mut self, bytes: &mut [u8], reader: &mut BitReader<R, BigEndian>, ) -> Result<()>

Read a certain number of bytes from the stream, indicated by the size of the buffer passed.
Source§

fn digest_event( &mut self, reader: &mut BitReader<R, BigEndian>, ) -> Result<Event, CodecError>

Read the next event from the stream. Returns None if the stream is exhausted.
Source§

fn set_input_stream_position( &mut self, reader: &mut BitReader<R, BigEndian>, pos: u64, ) -> Result<(), CodecError>

Set the input stream position to the given byte offset.

Auto Trait Implementations§

§

impl<R> Freeze for CompressedInput<R>

§

impl<R> RefUnwindSafe for CompressedInput<R>
where R: RefUnwindSafe,

§

impl<R> Send for CompressedInput<R>
where R: Send,

§

impl<R> Sync for CompressedInput<R>
where R: Sync,

§

impl<R> Unpin for CompressedInput<R>
where R: Unpin,

§

impl<R> UnwindSafe for CompressedInput<R>
where R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.