Type Alias lz4_java_wrc::Lz4BlockOutput

source ·
pub type Lz4BlockOutput<'a, R> = Lz4BlockOutputBase<'a, R, Context>;
Expand description

Wrapper around a Write object to compress data.

The data written to Lz4BlockOutput is be compressed and then written to the wrapped Write.

§Example

use lz4_java_wrc::Lz4BlockOutput;
use std::io::Write;

fn main() -> std::io::Result<()> {
    let mut output = Vec::new(); // Vec<u8> implements the Write trait
    Lz4BlockOutput::new(&mut output).write_all("...".as_bytes())?;
    println!("{:?}", output);
    Ok(())
}

Aliased Type§

struct Lz4BlockOutput<'a, R> { /* private fields */ }

Implementations§

source§

impl<'a, W: Write> Lz4BlockOutput<'a, W>

source

pub fn new(w: &'a mut W) -> Self

Create a new Lz4BlockOutput with the default parameters.

See Self::with_context()