Expand description
LZ4 Frame Format
As defined in https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md
Example: compress data on stdin
with frame format
This program reads data from stdin
, compresses it and emits it to stdout
.
This example can be found in examples/compress.rs
:
use std::io;
let stdin = io::stdin();
let stdout = io::stdout();
let mut rdr = stdin.lock();
// Wrap the stdout writer in a LZ4 Frame writer.
let mut wtr = lz4_flex::frame::FrameEncoder::new(stdout.lock());
io::copy(&mut rdr, &mut wtr).expect("I/O operation failed");
wtr.finish().unwrap();
Structs
A reader for decompressing the LZ4 frame format
A writer for compressing a LZ4 stream.