ComponentOne Zip for .NET 2.0
C1.Zip Assembly / C1.Zip.ZLib Namespace / ZStream Class / inflate Method
How to flush data into the output buffer (default value is 2).

In This Topic
    inflate Method
    In This Topic
    Decompresses as much data as possible until the input buffer is exhausted or the output buffer is full.
    Syntax
    Public Function inflate( _
       ByVal flush As Integer _
    ) As Integer
    public int inflate( 
       int flush
    )

    Parameters

    flush
    How to flush data into the output buffer (default value is 2).

    Return Value

    Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has been reached and all uncompressed output has been produced, Z_NEED_DICT if a preset dictionary is needed at this point, Z_DATA_ERROR if the input data was corrupted (input stream not conforming to the zlib format or incorrect checksum), Z_STREAM_ERROR if the stream structure was inconsistent (for example if next_in or next_out was null), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if no progress is possible or if there was not enough room in the output buffer when Z_FINISH is used.
    Remarks

    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.

    See Also