1zzip_disk_entry_to_data(3)   zziplib Function List  zzip_disk_entry_to_data(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
14       zzip_byte_t *
15       zzip_disk_entry_to_data(ZZIP_DISK * disk, struct zzip_disk_entry * entry)
16
17       struct zzip_file_header *
18       zzip_disk_entry_to_file_header(ZZIP_DISK * disk, struct zzip_disk_entry *entry)
19
20       zzip__new__ char *
21       zzip_disk_entry_strdup_name(ZZIP_DISK * disk, struct zzip_disk_entry *entry)
22
23       zzip__new__ char *
24       zzip_disk_entry_strdup_comment(ZZIP_DISK * disk, struct zzip_disk_entry *entry)
25
26
27
28

DESCRIPTION

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

AUTHOR

68        Guido Draheim <guidod@gmx.de>
69
70
71
73        Copyright (c)Guido Draheim, use under copyleft (LGPL,MPL)
74
75
76
77
78
79zziplib                             0.13.72         zzip_disk_entry_to_data(3)
Impressum