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

NAME

6       zzip_disk_fopen, zzip_disk_entry_fopen, zzip_disk_fread,
7       zzip_disk_fclose, zzip_disk_feof -  openening a file part wrapped
8       within a (mmapped) zip archive
9

SYNOPSIS

11       #include <zzip/mmapped.h>
12
13
14       zzip__new__ ZZIP_DISK_FILE *
15       zzip_disk_fopen(ZZIP_DISK * disk, char *filename)
16
17       zzip__new__ ZZIP_DISK_FILE *
18       zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry)
19
20       zzip_size_t
21       zzip_disk_fread(void *ptr, zzip_size_t sized, zzip_size_t nmemb,
22                       ZZIP_DISK_FILE * file)
23
24       int
25       zzip_disk_fclose(ZZIP_DISK_FILE * file)
26
27       int
28       zzip_disk_feof(ZZIP_DISK_FILE * file)
29
30
31
32

DESCRIPTION

34        The zzip_disk_fopen function opens a file found by name, so it does a
35       search into the zip central directory with zzip_disk_findfile and
36       whatever is found first is given to zzip_disk_entry_fopen
37
38        The zzip_disk_fopen function may return null on errors (errno).
39
40        the ZZIP_DISK_FILE* is rather simple in just encapsulating the
41       arguments given to the zzip_disk_entry_fopen function plus a zlib
42       deflate buffer. Note that the ZZIP_DISK pointer does already contain
43       the full mmapped file area of a zip disk, so open()ing a file part
44       within that area happens to be a lookup of its bounds and encoding.
45       That information is memorized on the ZZIP_DISK_FILE so that subsequent
46       _read() operations will be able to get the next data portion or return
47       an eof condition for that file part wrapped in the zip archive.
48
49        The zzip_disk_entry_fopen function may return null on errors (errno =
50       ENOMEM|EBADMSG).
51
52        The zzip_disk_fread function reads more bytes into the output buffer
53       specified as arguments. The return value is null on eof or error, the
54       stdio-like interface can not distinguish between these so you need to
55       check with zzip_disk_feof for the difference.
56
57        The zzip_disk_fclose function releases any zlib decoder info needed
58       for decompression and dumps the ZZIP_DISK_FILE* then.
59
60        The zzip_disk_fclose function always returns 0.
61
62        The zzip_disk_feof function allows to distinguish an error from an eof
63       condition. Actually, if we found an error but we did already reach eof
64       then we just keep on saying that it was an eof, so the app can just
65       continue.
66
67        The zzip_disk_feof function returns EOF in case and 0 when not at the
68       end of file.
69
70
71

AUTHOR

73        Guido Draheim <guidod@gmx.de>
74
75
76
78        Copyright (c)Guido Draheim, use under copyleft (LGPL,MPL)
79
80
81
82
83
84zziplib                             0.13.72                 zzip_disk_fopen(3)
Impressum