inflateSync

Name

inflateSync -- advance compression stream to next sync point

Synopsis

#include <zlib.h>

int inflateSync(z_streamp stream);

Description

The inflateSync() function shall advance through the compressed data in stream, skipping any invalid compressed data, until the next full flush point is reached, or all input is exhausted. See the description for deflate() with flush level Z_FULL_FLUSH. No output is placed in next_out.

Return Value

On success, inflateSync() shall return Z_OK, and update the next_in, avail_in, and total_in fields of stream to reflect the number of bytes of compressed data that have been skipped. Otherwise, inflateSync() shall return a value as described below to indicate the error.

Errors

On error, inflateSync() shall return a value as described below:

Z_STREAM_ERROR 

The state (as represented in stream) is inconsistent, or stream was NULL.

Z_BUF_ERROR 

There is no data available to skip over.

Z_DATA_ERROR 

No sync point was found.