1ZZIP_SEEK(3)                 zziplib Function List                ZZIP_SEEK(3)
2
3
4

NAME

6       zzip_seek, zzip_seek32 - seek.
7

SYNOPSIS

9       #include <zzip/lib.h>
10
11       zzip_off_t zzip_seek((ZZIP_FILE * fp, zzip_off_t offset, int whence));
12
13       long zzip_seek32((ZZIP_FILE * fp, long offset, int whence));
14

DESCRIPTION

16       The zzip_seek function will perform a lseek(2) operation on a
17       real/zipped file
18
19       It will try to seek to the offset specified by offset, relative to
20       whence, which is one of SEEK_SET, SEEK_CUR or SEEK_END.
21
22       If the file-handle is wrapping a stat'able file then it will actually
23       just perform a normal lseek(2)-call. Otherwise the relative offset is
24       calculated, negative offsets are transformed into positive ones by
25       rewinding the file, and then data is read until the offset is reached.
26       This can make the function terribly slow, but this is how gzio
27       implements it, so I'm not sure there is a better way without using the
28       internals of the algorithm.
29
30       The zzip_seek32 function is provided for users who can not use any
31       largefile-mode.
32

AUTHOR

34       ยท   Guido Draheim <guidod@gmx.de> Tomi Ollila <Tomi.Ollila@iki.fi>
35
37       Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
38
39
40
41zziplib                             0.13.71                       ZZIP_SEEK(3)
Impressum