pub type Lz4BlockInput<R> = Lz4BlockInputBase<R, Context>;
Expand description
Wrapper around a Read
object to decompress data.
The data read from Lz4BlockInput
is first read from the wrapped Read
, decompressed and then returned.
§Example
use lz4_java_wrc::Lz4BlockInput;
use std::io::Read;
// &[u8] implements the Read trait
const D: [u8; 24] = [
76, 90, 52, 66, 108, 111, 99, 107, 16, 3, 0, 0, 0, 3, 0, 0, 0, 82, 228, 119, 6, 46, 46, 46,
];
fn main() -> std::io::Result<()> {
let mut output = String::new();
Lz4BlockInput::new(&D[..]).read_to_string(&mut output)?;
println!("{}", output);
Ok(())
}
Aliased Type§
pub struct Lz4BlockInput<R> { /* private fields */ }
Implementations§
Source§impl<R: Read> Lz4BlockInput<R>
impl<R: Read> Lz4BlockInput<R>
Sourcepub fn new(r: R) -> Self
pub fn new(r: R) -> Self
Create a new Lz4BlockInput
with the default Compression
implementation.