diff options
Diffstat (limited to 'gzseek.3')
-rw-r--r-- | gzseek.3 | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gzseek.3 b/gzseek.3 index cf1bc71..dd69a5c 100644 --- a/gzseek.3 +++ b/gzseek.3 @@ -4,7 +4,8 @@ . .Sh NAME .Nm gzseek , -.Nm gzrewind +.Nm gzrewind , +.Nm gztell .Nd seek compressed file . .Sh LIBRARY @@ -16,6 +17,8 @@ .Fn gzseek "gzFile file" "z_off_t offset" "int whence" .Ft int .Fn gzrewind "gzFile file" +.Ft z_off_t +.Fn gztell "gzFile file" . .Sh DESCRIPTION Sets the starting position @@ -58,6 +61,26 @@ only for reading. is equivalent to .Li (int) Ns Fn gzseek file 0L SEEK_SET . . +.Pp +.Fn gztell +returns the starting position +for the next +.Xr gzread 3 +or +.Xr gzwrite 3 +on the given compressed file. +This position represents a number of bytes +in the uncompressed data stream, +and is zero when starting, +even if appending or reading +a gzip stream from the middle of a file using +.Xr gzdopen 3 . +. +.Pp +.Fn gztell file +is equivalent to +.Fn gzseek file 0L SEEK_CUR . +. .Sh RETURN VALUES .Fn gzseek returns the resulting offset location |