[][src]Struct lzw::DecoderEarlyChange

pub struct DecoderEarlyChange<R: BitReader> { /* fields omitted */ }

Decoder for a LZW compressed stream using an “early change” algorithm (used in TIFF files).

The maximum supported code size is 16 bits. The decoder assumes two special code word to be present in the stream:

Furthermore the decoder expects the stream to start with a CLEAR_CODE. This corresponds to the implementation needed for en- and decoding GIF and TIFF files.

Methods

impl<R> DecoderEarlyChange<R> where
    R: BitReader
[src]

pub fn new(reader: R, min_code_size: u8) -> DecoderEarlyChange<R>[src]

Creates a new LZW decoder.

pub fn decode_bytes(&mut self, bytes: &[u8]) -> Result<(usize, &[u8])>[src]

Tries to obtain and decode a code word from bytes.

Returns the number of bytes that have been consumed from bytes. An empty slice does not indicate EOF.

Trait Implementations

impl<R: Debug + BitReader> Debug for DecoderEarlyChange<R>[src]

Auto Trait Implementations

impl<R> Send for DecoderEarlyChange<R> where
    R: Send

impl<R> Unpin for DecoderEarlyChange<R> where
    R: Unpin

impl<R> Sync for DecoderEarlyChange<R> where
    R: Sync

impl<R> UnwindSafe for DecoderEarlyChange<R> where
    R: UnwindSafe

impl<R> RefUnwindSafe for DecoderEarlyChange<R> where
    R: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]