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§
pub struct Lz4BlockOutput<'a, R> { /* private fields */ }Implementations§
Source§impl<'a, W: Write> Lz4BlockOutput<'a, W>
impl<'a, W: Write> Lz4BlockOutput<'a, W>
Sourcepub fn new(w: &'a mut W) -> Self
pub fn new(w: &'a mut W) -> Self
Create a new Lz4BlockOutput with the default parameters.