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

NAME

6       zzip_disk_entry_to_data, zzip_disk_entry_to_file_header,
7       zzip_disk_entry_strdup_name, zzip_disk_entry_strdup_comment - helper
8       functions for (mmapped) zip access api
9

SYNOPSIS

11       #include <zzip/mmapped.h>
12
13       zzip_byte_t *
14                                             zzip_disk_entry_to_data((ZZIP_DISK * disk, struct zzip_disk_entry * entry));
15
16       struct zzip_file_header *
17                                                                zzip_disk_entry_to_file_header((ZZIP_DISK * disk, struct zzip_disk_entry *entry));
18
19       zzip__new__ char *
20                                                      zzip_disk_entry_strdup_name((ZZIP_DISK * disk, struct zzip_disk_entry *entry));
21
22       zzip__new__ char *
23                                                         zzip_disk_entry_strdup_comment((ZZIP_DISK * disk, struct zzip_disk_entry *entry));
24

DESCRIPTION

26       The zzip_disk_entry_to_data function augments the other
27       zzip_disk_entry_* helpers: here we move a disk_entry pointer (as
28       returned by _find* functions) into a pointer to the data block right
29       after the file_header. Only disk->buffer would be needed to perform the
30       seek but we check the mmapped range end as well.
31
32       The zzip_disk_entry_to_data function returns a pointer into
33       disk->buffer or 0 on error (errno).
34
35       The zzip_disk_entry_to_file_header function does half the job of
36       zzip_disk_entry_to_data where it can augment with
37       zzip_file_header_to_data helper from format/fetch.h
38
39       The zzip_disk_entry_to_file_header function returns a pointer into
40       disk->buffer or 0 on error (errno).
41
42       The zzip_disk_entry_strdup_name function is a big helper despite its
43       little name: in a zip file the encoded filenames are usually NOT
44       zero-terminated but for common usage with libc we need it that way.
45       Secondly, the filename SHOULD be present in the zip central directory
46       but if not then we fallback to the filename given in the file_header of
47       each compressed data portion.
48
49       The zzip_disk_entry_strdup_name function returns a new string buffer,
50       or null on error. If no name can be found then an empty string is
51       returned.
52
53       The zzip_disk_entry_strdup_comment function is similar creating a
54       reference to a zero terminated string but it can only exist in the zip
55       central directory entry.
56
57       The zzip_disk_entry_strdup_comment function returns a new string
58       buffer, or null on error (errno). If no name can be found then an empty
59       string is returned.
60

AUTHOR

62       ยท   Guido Draheim <guidod@gmx.de>
63
65       Copyright (c)Guido Draheim, use under copyleft (LGPL,MPL)
66
67
68
69zziplib                             0.13.71            ZZIP_DISK_ENTRY_TO_D(3)
Impressum