The value of the last error code, negative integer\&. All other error code values are in the range from \fBBROTLI_LAST_ERROR_CODE\fP to \fC-1\fP\&. There are also 4 other possible non-error codes \fC0\fP\&.\&. \fC3\fP in \fBBrotliDecoderErrorCode\fP enumeration\&.
Callback to fire on metadata block chunk becomes available\&. This function can be invoked multiple times per metadata block; block should be considered finished when sum of \fCsize\fP matches the announced metadata block size\&. Chunks contents pointed by \fCdata\fP are transient and shouln not be accessed after leaving the callback\&.
.PP
\fBParameters:\fP
.RS4
\fIopaque\fP callback handle
.br
\fIdata\fP pointer to metadata contents
.br
\fIsize\fP size of metadata block chunk, at least \fC1\fP
Callback to fire on metadata block start\&. After this callback is fired, if \fCsize\fP is not \fC0\fP, it is followed by \fBbrotli_decoder_metadata_chunk_func\fP as more metadata block contents become accessible\&.
Opaque structure that holds decoder state\&. Allocated and initialized with \fBBrotliDecoderCreateInstance\fP\&. Cleaned up and deallocated with \fBBrotliDecoderDestroyInstance\fP\&.
.SH"Enumeration Type Documentation"
.PP
.SS"enum \fBBrotliDecoderErrorCode\fP"
.PP
Error code for detailed logging / production debugging\&. See \fBBrotliDecoderGetErrorCode\fP and \fBBROTLI_LAST_ERROR_CODE\fP\&.
Adds LZ77 prefix dictionary, adds or replaces built-in static dictionary and transforms\&. Attached dictionary ownership is not transferred\&. Data provided to this method should be kept accessible until decoding is finished and decoder instance is destroyed\&.
.PP
\fBNote:\fP
.RS4
Dictionaries can NOT be attached after actual decoding is started\&.
.RE
.PP
\fBParameters:\fP
.RS4
\fIstate\fP decoder instance
.br
\fItype\fP dictionary data format
.br
\fIdata_size\fP length of memory region pointed by \fCdata\fP
.br
\fIdata\fP dictionary data in format corresponding to \fCtype\fP
.RE
.PP
\fBReturns:\fP
.RS4
\fBBROTLI_FALSE\fP if dictionary is corrupted, or dictionary count limit is reached
.PP
\fBBROTLI_TRUE\fP if dictionary is accepted / attached
Creates an instance of \fBBrotliDecoderState\fP and initializes it\&. The instance can be used once for decoding and should then be destroyed with \fBBrotliDecoderDestroyInstance\fP, it cannot be reused for a new decoding session\&.
\fCalloc_func\fP and \fCfree_func\fP\fBMUST\fP be both zero or both non-zero\&. In the case they are both zero, default memory allocators are used\&. \fCopaque\fP is passed to \fCalloc_func\fP and \fCfree_func\fP when they are called\&. \fCfree_func\fP has to return without doing anything when asked to free a NULL pointer\&.
Performs one-shot memory-to-memory decompression\&. Decompresses the data in \fCencoded_buffer\fP into \fCdecoded_buffer\fP, and sets \fC*decoded_size\fP to the decompressed length\&.
.PP
\fBParameters:\fP
.RS4
\fIencoded_size\fP size of \fCencoded_buffer\fP
.br
\fIencoded_buffer\fP compressed data buffer with at least \fCencoded_size\fP addressable bytes
.br
\fIdecoded_size\fP\fBin:\fP size of \fCdecoded_buffer\fP;
.br
\fBout:\fP length of decompressed data written to \fCdecoded_buffer\fP
.br
\fIdecoded_buffer\fP decompressed data destination buffer
.RE
.PP
\fBReturns:\fP
.RS4
\fBBROTLI_DECODER_RESULT_ERROR\fP if input is corrupted, memory allocation failed, or \fCdecoded_buffer\fP is not large enough;
Decompresses the input stream to the output stream\&. The values \fC*available_in\fP and \fC*available_out\fP must specify the number of bytes addressable at \fC*next_in\fP and \fC*next_out\fP respectively\&. When \fC*available_out\fP is \fC0\fP, \fCnext_out\fP is allowed to be \fCNULL\fP\&.
.PP
After each call, \fC*available_in\fP will be decremented by the amount of input bytes consumed, and the \fC*next_in\fP pointer will be incremented by that amount\&. Similarly, \fC*available_out\fP will be decremented by the amount of output bytes written, and the \fC*next_out\fP pointer will be incremented by that amount\&.
.PP
\fCtotal_out\fP, if it is not a null-pointer, will be set to the number of bytes decompressed since the last \fCstate\fP initialization\&.
.PP
\fBNote:\fP
.RS4
Input is never overconsumed, so \fCnext_in\fP and \fCavailable_in\fP could be passed to the next consumer after decoding is complete\&.
.RE
.PP
\fBParameters:\fP
.RS4
\fIstate\fP decoder instance
.br
\fIavailable_in\fP\fBin:\fP amount of available input;
.br
\fBout:\fP amount of unused input
.br
\fInext_in\fP pointer to the next compressed byte
.br
\fIavailable_out\fP\fBin:\fP length of output buffer;
.br
\fBout:\fP remaining size of output buffer
.br
\fInext_out\fP output buffer cursor; can be \fCNULL\fP if \fCavailable_out\fP is \fC0\fP
.br
\fItotal_out\fP number of bytes decompressed so far; can be \fCNULL\fP
.RE
.PP
\fBReturns:\fP
.RS4
\fBBROTLI_DECODER_RESULT_ERROR\fP if input is corrupted, memory allocation failed, arguments were invalid, etc\&.; use \fBBrotliDecoderGetErrorCode\fP to get detailed error code
Acquires pointer to internal output buffer\&. This method is used to make language bindings easier and more efficient:
.IP"1."4
push data to \fBBrotliDecoderDecompressStream\fP, until \fBBROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT\fP is reported
.IP"2."4
use \fBBrotliDecoderTakeOutput\fP to peek bytes and copy to language-specific entity
.PP
.PP
Also this could be useful if there is an output stream that is able to consume all the provided data (e\&.g\&. when data is saved to file system)\&.
.PP
\fBAttention:\fP
.RS4
After every call to \fBBrotliDecoderTakeOutput\fP\fC*size\fP bytes of output are considered consumed for all consecutive calls to the instance methods; returned pointer becomes invalidated as well\&.
.RE
.PP
\fBNote:\fP
.RS4
Decoder output is not guaranteed to be contiguous\&. This means that after the size-unrestricted call to \fBBrotliDecoderTakeOutput\fP, immediate next call to \fBBrotliDecoderTakeOutput\fP may return more data\&.
.RE
.PP
\fBParameters:\fP
.RS4
\fIstate\fP decoder instance
.br
\fIsize\fP\fBin:\fP number of bytes caller is ready to take, \fC0\fP if any amount could be handled;
.br
\fBout:\fP amount of data pointed by returned pointer and considered consumed;
.br
out value is never greater than in value, unless it is \fC0\fP
.RE
.PP
\fBReturns:\fP
.RS4
pointer to output data
.RE
.PP
.SS"uint32_t BrotliDecoderVersion (void)"
.PP
Gets a decoder library version\&. Look at BROTLI_VERSION for more information\&.
.SH"Author"
.PP
Generated automatically by Doxygen for Brotli from the source code\&.