Name

gzgetc — Reads the next single character from the compressed file stream referenced by file.


Library

Libz.lib


Synopsis

#include <zlib.h>
int gzgetc (gzFile file);

Return Value

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


Detailed 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()).


Examples

#include <stdio.h>
#include <zlib.h>

void Gzgetc( )
{
gzFile file;
const char *s="ritesh";
const char * fname = TESTFILE ;
file = gzopen(fname, "rb");
int l= gzgetc(file);
gzclose(file);
}

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.


Feedback

For additional information or queries on this page send feedback

© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user.

Top