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

NAME

6       zzip_entry_data_offset, zzip_entry_fread_file_header,
7       zzip_entry_strdup_name - helper functions for (fseeko) zip access api
8

SYNOPSIS

10       #include <zzip/fseeko.h>
11
12       zzip_off_t zzip_entry_data_offset((ZZIP_ENTRY * entry));
13
14       static zzip_off_t
15                                                      zzip_entry_fread_file_header((ZZIP_ENTRY * entry, struct zzip_file_header *file_header));
16
17       zzip__new__ char * zzip_entry_strdup_name((ZZIP_ENTRY * entry));
18

DESCRIPTION

20       The zzip_entry_data_offset functions returns the seekval offset of the
21       data portion of the file referenced by the given zzip_entry. It
22       requires an intermediate check of the file_header structure (i.e. it
23       reads it from disk). After this call, the contained diskfile
24       readposition is already set to the data_offset returned here.
25
26       The zzip_entry_data_offset function Returns -1 on error. (errno =
27       EINVAL|EBADMSG)
28
29       The zzip_entry_fread_file_header functions read the correspoding struct
30       zzip_file_header from the zip disk of the given "entry". The returned
31       off_t points to the end of the file_header where the current fseek
32       pointer has stopped. This is used to immediately parse out any
33       filename/extras block following the file_header.
34
35       The zzip_entry_fread_file_header function Returns zero on error. (errno
36       = EINVAL|EBADMSG|EBADF|EIO)
37
38       The zzip_entry_strdup_name function is a big helper despite its little
39       name: in a zip file the encoded filenames are usually NOT
40       zero-terminated but for common usage with libc we need it that way.
41       Secondly, the filename SHOULD be present in the zip central directory
42       but if not then we fallback to the filename given in the file_header of
43       each compressed data portion.
44
45       returns: new string buffer, null on error (errno =
46       EINVAL|ENOMEM|EBADMSG)
47

AUTHOR

49       ยท   Guido Draheim <guidod@gmx.de>
50
52       Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
53
54
55
56zziplib                             0.13.69            ZZIP_ENTRY_DATA_OFFS(3)
Impressum