gztell

Name

gztell -- find position on a compressed file stream

Synopsis

#include <zlib.h>

z_off_t gztell (gzFile file );

Description

The gztell() function shall return the starting position for the next read or write operation on compressed file stream file. This position represents the number of bytes from the beginning of file in the uncompressed data.

gztell() is equivalent to

gzseek(file, 0L, SEEK_CUR)
.

Return Value

gztell() shall return the current offset in the file expressed as a byte position in the uncompressed data stream. On error, gztell() shall return -1, and may set the error value for file accordingly.

Errors

On error, gztell() shall return -1, indicating that file is NULL, or does not represent an open compressed file stream.