Parameters
- flush
- Non-zero to force some data to be flushed into the output buffer.
deflate performs one or both of the following actions:
1. Compress 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 and avail_in are updated and processing will resume at this point for the next call to deflate.
2. Provide more output starting at next_out and update next_out and avail_out accordingly. This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter should be set only when necessary (in interactive applications). Some output may be provided even if flush is not set
This method may introduce some output latency (reading input without producing any output) except when forced to flush.
If deflate returns with avail_out == 0, this method must be called again with the same value of the flush parameter and more output space until the flush is complete (deflate returns with avail_out != 0).