deflateEnd

Name

deflateEnd -- free compression stream state

Synopsis

#include <zlib.h>

int deflateEnd(z_streamp stream);

Description

The deflateEnd() function shall free all allocated state information referenced by stream. All pending output is discarded, and unprocessed input is ignored.

Return Value

On success, deflateEnd() shall return Z_OK, or Z_DATA_ERROR if there was pending output discarded or input unprocessed. Otherwise it shall return Z_STREAM_ERROR to indicate the error.

Errors

On error, deflateEnd() shall return Z_STREAM_ERROR. The following conditions shall be treated as an error: