[][src]Struct lzzzz::lz4f::ReadCompressor

pub struct ReadCompressor<R: Read> { /* fields omitted */ }

The Read-based streaming compressor.

Example

use lzzzz::lz4f::ReadCompressor;
use std::{fs::File, io::prelude::*};

let mut f = File::open("foo.txt")?;
let mut r = ReadCompressor::new(&mut f, Default::default())?;

let mut buf = Vec::new();
r.read_to_end(&mut buf)?;

Implementations

impl<R: Read> ReadCompressor<R>[src]

pub fn new(reader: R, prefs: Preferences) -> Result<Self>[src]

Creates a new ReadCompressor<R>.

pub fn with_dict(
    reader: R,
    prefs: Preferences,
    dict: Dictionary
) -> Result<Self>
[src]

Creates a new ReadCompressor<R> with a dictionary.

pub fn into_inner(self) -> R[src]

Returns ownership of the reader.

pub fn get_mut(&mut self) -> &mut R[src]

Returns a mutable reference to the reader.

pub fn get_ref(&self) -> &R[src]

Returns a shared reference to the reader.

Trait Implementations

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

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

Auto Trait Implementations

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

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

impl<R> !Sync for ReadCompressor<R>

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

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

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.