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.  (Only CP-437 and UTF-8
32                                are recognized.)
33
34           ZIP_FL_ENC_STRICT    Follow the ZIP specification for file names
35                                and extend it to the archive comment, thus
36                                also expecting it in CP-437 encoding.  Convert
37                                it to UTF-8.
38     Note: ASCII is a subset of both CP-437 and UTF-8.
39

RETURN VALUES

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

SEE ALSO

45     libzip(3), zip_file_get_comment(3)
46

HISTORY

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

AUTHORS

52     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
53
54BSD                           September 22, 2020                           BSD
Impressum