Function flate2::ffi::rust::inflate::decompress_slice_iter_to_slice

source ยท
pub fn decompress_slice_iter_to_slice<'out, 'inp>(
    out: &'out mut [u8],
    it: impl Iterator<Item = &'inp [u8]>,
    zlib_header: bool,
    ignore_adler32: bool,
) -> Result<usize, TINFLStatus>
Expand description

Decompress one or more source slices from an iterator into the output slice.

  • On success, returns the number of bytes that were written.
  • On failure, returns the failure status code.

This will fail if the output buffer is not large enough, but in that case the output buffer will still contain the partial decompression.

  • out the output buffer.
  • it the iterator of input slices.
  • zlib_header if the first slice out of the iterator is expected to have a Zlib header. Otherwise the slices are assumed to be the deflate data only.
  • ignore_adler32 if the adler32 checksum should be calculated or not.