1zzip_entry_data_offset(3) zziplib Function List zzip_entry_data_offset(3)
2
3
4
6 zzip_entry_data_offset, zzip_entry_fread_file_header,
7 zzip_entry_strdup_name - helper functions for (fseeko) zip access api
8
10 #include <zzip/fseeko.h>
11
12
13 zzip_off_t
14 zzip_entry_data_offset(ZZIP_ENTRY * entry)
15
16 static zzip_off_t
17 zzip_entry_fread_file_header(ZZIP_ENTRY * entry,
18 struct zzip_file_header *file_header)
19
20 zzip__new__ char *
21 zzip_entry_strdup_name(ZZIP_ENTRY * entry)
22
23
24
25
27 The zzip_entry_data_offset functions returns the seekval offset of the
28 data portion of the file referenced by the given zzip_entry. It
29 requires an intermediate check of the file_header structure (i.e. it
30 reads it from disk). After this call, the contained diskfile
31 readposition is already set to the data_offset returned here.
32
33 The zzip_entry_data_offset function Returns -1 on error. (errno =
34 EINVAL|EBADMSG)
35
36 The zzip_entry_fread_file_header functions read the correspoding
37 struct zzip_file_header from the zip disk of the given "entry". The
38 returned off_t points to the end of the file_header where the current
39 fseek pointer has stopped. This is used to immediately parse out any
40 filename/extras block following the file_header.
41
42 The zzip_entry_fread_file_header function Returns zero on error. (errno
43 = EINVAL|EBADMSG|EBADF|EIO)
44
45 The zzip_entry_strdup_name function is a big helper despite its little
46 name: in a zip file the encoded filenames are usually NOT zero-
47 terminated but for common usage with libc we need it that way.
48 Secondly, the filename SHOULD be present in the zip central directory
49 but if not then we fallback to the filename given in the file_header of
50 each compressed data portion.
51
52 returns: new string buffer, null on error (errno =
53 EINVAL|ENOMEM|EBADMSG)
54
55
56
58 Guido Draheim <guidod@gmx.de>
59
60
61
63 Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
64
65
66
67
68
69zziplib 0.13.72 zzip_entry_data_offset(3)