ComponentOne Zip for .NET 2.0
C1.Zip Assembly / C1.Zip.ZLib Namespace / ZStream Class / deflate Method
Non-zero to force some data to be flushed into the output buffer.

In This Topic
    deflate Method
    In This Topic
    Compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.
    Syntax
    Public Function deflate( _
       ByVal flush As Integer _
    ) As Integer
    public int deflate( 
       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