[][src]Module lzma::writer

This module implements LzmaWriter.

LzmaWriter implements the LZMA (XZ) compression/decompression algorithm as a generic Writer. In other words, it behaves similar to BufWriter. Instead of buffering the Write object passed to it, LzmaWriter applies compression or decompression to it as it's write.

Examples

use lzma::LzmaWriter;
use std::io::prelude::*;
use std::fs::File;

let f = File::create("foo.xz").unwrap();
let mut f = LzmaWriter::new_compressor(f, 6).unwrap();

write!(f, "It's a small world!").unwrap();
f.finish().unwrap();

Structs

LzmaWriter