Module frame

Source
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§

AutoFinishEncoder
A wrapper around an FrameEncoder<W> that finishes the stream on drop.
FrameDecoder
A reader for decompressing the LZ4 frame format
FrameEncoder
A writer for compressing a LZ4 stream.
FrameInfo
The metadata for de/compressing with lz4 frame format.

Enums§

BlockMode
The two BlockMode operations that can be set on (FrameInfo)FrameInfo
BlockSize
Different predefines blocksizes to choose when compressing data.
Error
Errors that can occur when de/compressing lz4.