Struct yaz0::inflate::Yaz0Archive[][src]

pub struct Yaz0Archive<R> where
    R: Read + Seek
{ /* fields omitted */ }

Wraps a reader of Yaz0 data, providing decompression methods.

Implementations

impl<R> Yaz0Archive<R> where
    R: Read + Seek
[src]

pub fn new(mut reader: R) -> Result<Yaz0Archive<R>, Error>[src]

Creates a new Yaz0 from a reader.

pub fn expected_size(&self) -> usize[src]

Get the expected size of inflated data from parsed Yaz0Header.

pub fn decompress(&mut self) -> Result<Vec<u8>, Error>[src]

Decompresses the Yaz0 file, producing a Vec<u8> of the decompressed data.

pub fn decompress_into(&mut self, dest: &mut [u8]) -> Result<(), Error>[src]

Decompresses the Yaz0 file into a destination buffer.

Invariants

dest must have a length of at least the required size to decompress successfully (consider using Yaz0Archive::expected_size to determine this)

Trait Implementations

impl<R: Debug> Debug for Yaz0Archive<R> where
    R: Read + Seek
[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for Yaz0Archive<R> where
    R: RefUnwindSafe
[src]

impl<R> Send for Yaz0Archive<R> where
    R: Send
[src]

impl<R> Sync for Yaz0Archive<R> where
    R: Sync
[src]

impl<R> Unpin for Yaz0Archive<R> where
    R: Unpin
[src]

impl<R> UnwindSafe for Yaz0Archive<R> where
    R: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.