[][src]Function compu_brotli_sys::BrotliDecoderDecompressStream

pub unsafe extern "C" fn BrotliDecoderDecompressStream(
    state: *mut BrotliDecoderState,
    available_in: *mut usize,
    next_in: *mut *const u8,
    available_out: *mut usize,
    next_out: *mut *mut u8,
    total_out: *mut usize
) -> BrotliDecoderResult

Decompresses the input stream to the output stream.

The values @p *available_in and @p *available_out must specify the number of bytes addressable at @p *next_in and @p *next_out respectively. When @p *available_out is @c 0, @p next_out is allowed to be @c NULL.

After each call, @p *available_in will be decremented by the amount of input bytes consumed, and the @p *next_in pointer will be incremented by that amount. Similarly, @p *available_out will be decremented by the amount of output bytes written, and the @p *next_out pointer will be incremented by that amount.

@p total_out, if it is not a null-pointer, will be set to the number of bytes decompressed since the last @p state initialization.

@note Input is never overconsumed, so @p next_in and @p available_in could be passed to the next consumer after decoding is complete.

@param state decoder instance @param[in, out] available_in @b in: amount of available input; \n @b out: amount of unused input @param[in, out] next_in pointer to the next compressed byte @param[in, out] available_out @b in: length of output buffer; \n @b out: remaining size of output buffer @param[in, out] next_out output buffer cursor; can be @c NULL if @p available_out is @c 0 @param[out] total_out number of bytes decompressed so far; can be @c NULL @returns ::BROTLI_DECODER_RESULT_ERROR if input is corrupted, memory allocation failed, arguments were invalid, etc.; use ::BrotliDecoderGetErrorCode to get detailed error code @returns ::BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT decoding is blocked until more input data is provided @returns ::BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT decoding is blocked until more output space is provided @returns ::BROTLI_DECODER_RESULT_SUCCESS decoding is finished, no more input might be consumed and no more output will be produced