Function decompress

fn decompress(r: &mut DecompressorOxide, in_buf: &[u8], out: &mut [u8], out_pos: usize, flags: u32) -> (TINFLStatus, usize, usize)

Main decompression function. Keeps decompressing data from in_buf until the in_buf is empty, out is full, the end of the deflate stream is hit, or there is an error in the deflate stream.

Arguments

r is a DecompressorOxide struct with the state of this stream.

in_buf is a reference to the compressed data that is to be decompressed. The decompressor will start at the first byte of this buffer.

out is a reference to the buffer that will store the decompressed data, and that stores previously decompressed data if any.

flags indicates settings and status to the decompression function.

Returns

Returns a tuple containing the status of the compressor, the number of input bytes read, and the number of bytes output to out.