1ZIP_GET_ARCHIVE_COMME... BSD Library Functions Manual ZIP_GET_ARCHIVE_COMME...
2

NAME

4     zip_get_archive_comment — get zip archive comment
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

10     #include <zip.h>
11
12     const char *
13     zip_get_archive_comment(zip_t *archive, int *lenp, zip_flags_t flags);
14

DESCRIPTION

16     The zip_get_archive_comment() function returns the comment for the entire
17     zip archive.  The return value is in UTF-8 encoding unless ZIP_FL_ENC_RAW
18     was specified (see below).  This pointer should not be modified or
19     free(3)'d, and becomes invalid when archive is closed.  If lenp is not
20     NULL, the integer to which it points will be set to the length of the
21     comment.  If flags is set to ZIP_FL_UNCHANGED, the original unchanged
22     comment is returned.
23
24     Additionally, the following flags are supported:
25
26           ZIP_FL_ENC_RAW       Return the unmodified archive comment as it is
27                                in the ZIP archive.
28
29           ZIP_FL_ENC_GUESS     (Default.)  Guess the encoding of the archive
30                                comment in the ZIP archive and convert it to
31                                UTF-8, if necessary.
32
33           ZIP_FL_ENC_STRICT    Follow the ZIP specification for file names
34                                and extend it to the archive comment, thus
35                                also expecting it in CP-437 encoding.  Convert
36                                it to UTF-8.
37     Note: ASCII is a subset of both CP-437 and UTF-8.
38

RETURN VALUES

40     Upon successful completion, a pointer to the comment is returned, or NULL
41     if there is no comment.
42

SEE ALSO

44     libzip(3), zip_file_get_comment(3)
45

HISTORY

47     zip_get_archive_comment() was added in libzip 0.7.  In libzip 0.11 the
48     type of flags was changed from int to zip_flags_t.
49

AUTHORS

51     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
52
53BSD                              July 22, 2018                             BSD
Impressum