deflateEnd — Frees all allocated state information referenced by stream .
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.
The deflateEnd() function shall free all allocated state information referenced by stream. All pending output is discarded, and unprocessed input is ignored.
To free all allocated state information referenced by c_stream:
#include <stdio.h> void Deflateend( ) { z_stream c_stream; /* compression stream */ uLong len = (uLong)strlen(hello)+1; c_stream.zalloc = (alloc_func)0; compress(compr, &comprLen, (const Bytef*)hello, len); /* Finish the stream, still forcing small buffers: */ for (;;) deflateEnd(&c_stream); |
For additional information or queries on this page send feedback
© 2007-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |