Parameters
- flush
- How to flush data into the output buffer (default value is 2).
inflate performs one or both of the following actions:
1. Decompress more input starting at next_in and update next_in and avail_in accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in is updated and processing will resume at this point for the next call to inflate.
2. Provide more output starting at next_out and update next_out and avail_out accordingly. inflate provides as much output as possible, until there is no more input data or no more space in the output buffer.
Before the call to inflate, the application should ensure that at least one of the actions is possible, by providing more input and/or consuming more output, and updating the next_* and avail_* values accordingly.
If inflate returns Zero and avail_out == 0, it must be called again after making room in the output buffer because there might be more output pending.
The application can consume the uncompressed output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of inflate.
This method may introduce some output latency (reading input without producing any output) except when forced to flush.