pub fn optimize(src: &mut [u8], decompressed_len: usize)Expand description
Optimize compressed data given in src in terms of decompression speed.
The length of the original decompressed data should be given in decompressed_len.
This function does not change the length of the compressed data, and is likely to only improve the decompression speed around 0-3%.
§Panics
Panics if the given src does not contain valid compressed data,
or if the given decompressed_len is not large enough.
§Examples
let data = &[0xaa; 100];
let mut compressed = lzo1x::compress(data, lzo1x::CompressLevel::default());
lzo1x::optimize(&mut compressed, data.len());