ComponentOne Zip for UWP
deflate Method

C1.UWP.Zip Assembly > C1.C1Zip.ZLib Namespace > ZStream Class : deflate Method
Non-zero to force some data to be flushed into the output buffer.
Compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.
Syntax
'Declaration
 
Public Function deflate( _
   ByVal flush As System.Integer _
) As System.Integer
public System.int deflate( 
   System.int flush
)

Parameters

flush
Non-zero to force some data to be flushed into the output buffer.

Return Value

Zero on success, an error code on failure.
Remarks

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).

See Also

Reference

ZStream Class
ZStream Members