[][src]Function nintendo_lz::compress

pub fn compress(
    inp: &[u8],
    out: &mut Write,
    level: CompressionLevel
) -> Result<(), Box<Error>>

Compresses data to LZ10/LZ11. It returns an error when:

Example

let mut f = File::create("Archive.bin.cmp");
let data = b"This is an example text. This is an example text";
nintendo_lz::compress(&data, &mut f, nintendo_lz::CompressionLevel::LZ11(65809)).unwrap();