[][src]Struct lzw::Decoder

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

Decoder for a LZW compressed stream (this algorithm is used for GIF 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> Decoder<R> where
    R: BitReader
[src]

pub fn new(reader: R, min_code_size: u8) -> Decoder<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 Decoder<R>[src]

Auto Trait Implementations

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

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

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

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

impl<R> RefUnwindSafe for Decoder<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]