gzgetc

Name

gzgetc -- read a character from a compressed file

Synopsis

#include <zlib.h>

int gzgetc (gzFile file);

Description

The gzgetc() function shall read the next single character from the compressed file stream referenced by file, which shall have been opened in a read mode (see gzopen() and gzdopen()).

Return Value

On success, gzgetc() shall return the uncompressed character read, otherwise, on end of file or error, gzgetc() shall return -1.

Errors

On end of file or error, gzgetc() shall return -1. Further information can be found by calling gzerror() with a pointer to the compressed file stream.