Struct bzip2_rs::decoder::DecoderReader[][src]

pub struct DecoderReader<R> { /* fields omitted */ }

A high-level decoder that wraps a Read and implements Read, yielding decompressed bytes

use std::fs::File;
use std::io;

use bzip2_rs::DecoderReader;

let mut compressed_file = File::open("tests/samplefiles/sample1.bz2")?;
let mut output = File::create("output.ref")?;

let mut reader = DecoderReader::new(compressed_file);
io::copy(&mut reader, &mut output)?;

Implementations

impl<R> DecoderReader<R>[src]

pub fn new(reader: R) -> Self[src]

Construct a new decoder from something implementing Read

Trait Implementations

impl<R: Read> Read for DecoderReader<R>[src]

fn read(&mut self, buf: &mut [u8]) -> Result<usize>[src]

Decompress bzip2 data from the underlying reader

Auto Trait Implementations

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

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

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

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

impl<R> UnwindSafe for DecoderReader<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.