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 wrapper around an
FrameEncoder<W>
that finishes the stream on drop. - A reader for decompressing the LZ4 frame format
- A writer for compressing a LZ4 stream.
- The metadata for de/compressing with lz4 frame format.
Enums§
- Different predefines blocksizes to choose when compressing data.
- Errors that can occur when de/compressing lz4.