gzprintf

Name

gzprintf -- format data and compress

Synopsis

#include <zlib.h>

int gzprintf (gzFile file, const char * fmt, ...);

Description

The gzprintf() function shall format data as for fprintf(), and write the resulting string to the compressed file stream file.

Return Value

The gzprintf() function shall return the number of uncompressed bytes actually written, or a value less than or equal to 0 in the event of an error.

Errors

If file is NULL, or refers to a compressed file stream that has not been opened for writing, gzprintf() shall return Z_STREAM_ERROR. Otherwise, errors are as for gzwrite().