Function miniz_oxide::inflate::core::decompress[][src]

pub 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_cur is full, the end of the deflate stream is hit, or there is an error in the deflate stream.

Arguments

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_cur is a mutable cursor into the buffer that will store the decompressed data, and that stores previously decompressed data if any.

flags Flags to indicate 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_cur. Updates the position of out_cur to point to the next free spot in the output buffer.

This function shouldn’t panic pending any bugs.