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
12       zzip_off_t
13       zzip_seek(ZZIP_FILE * fp, zzip_off_t offset, int whence)
14
15       long
16       zzip_seek32(ZZIP_FILE * fp, long offset, int whence)
17
18
19
20

DESCRIPTION

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

AUTHOR

42        Guido Draheim <guidod@gmx.de> Tomi Ollila <Tomi.Ollila@iki.fi>
43
44
45
47        Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
48
49
50
51
52
53zziplib                             0.13.72                       zzip_seek(3)
Impressum