1LIBZIP(3)                BSD Library Functions Manual                LIBZIP(3)
2

NAME

4     libzip — library for manipulating zip archives
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

10     #include <zip.h>
11

DESCRIPTION

13     libzip is a library for reading, creating, and modifying zip archives.
14
15     The main design criteria for libzip were:
16     Do not create corrupt files, even in case of errors.
17     Do not delete data.
18     Be efficient.
19
20     For this reason, when modifying zip archives, libzip writes to a tempo‐
21     rary file and replaces the original zip archive atomically.
22
23     Below there are two sections listing functions: one for how to read from
24     zip archives and one for how to create/modify them.
25
26   THREAD SAFETY
27     In general, different zip archives opened by libzip are independent of
28     each other and can be used by parallel-running threads without locking.
29     If you want to use an archive from multiple threads, you have to synchro‐
30     nize access to it yourself.  If you use an archive as a source for
31     zip_file_add(3) or zip_file_replace(3), access to the target archive must
32     be synchronized with access to the source archive as well.
33

READING ZIP ARCHIVES

35   open archive
36     •   zip_open(3)
37     •   zip_fdopen(3)
38
39   find files
40     •   zip_name_locate(3)
41
42   read files
43     •   zip_fopen(3)
44     •   zip_fopen_encrypted(3)
45     •   zip_fopen_index(3)
46     •   zip_fopen_index_encrypted(3)
47     •   zip_fread(3)
48     •   zip_fseek(3) (uncompressed files only)
49     •   zip_ftell(3) (uncompressed files only)
50     •   zip_fclose(3)
51
52   close archive
53     •   zip_close(3)
54
55   miscellaneous
56     •   zip_stat(3)
57     •   zip_compression_method_supported(3)
58     •   zip_encryption_method_supported(3)
59     •   zip_file_get_comment(3)
60     •   zip_file_get_external_attributes(3)
61     •   zip_get_archive_comment(3)
62     •   zip_get_archive_flag(3)
63     •   zip_get_name(3)
64     •   zip_get_num_entries(3)
65     •   zip_set_default_password(3)
66

CREATING/MODIFYING ZIP ARCHIVES

68   create/open archive
69     •   zip_open(3)
70
71   add/change files and directories
72     •   zip_dir_add(3)
73     •   zip_file_add(3)
74     •   zip_file_replace(3)
75     •   zip_file_set_comment(3)
76     •   zip_file_set_dostime(3)
77     •   zip_file_set_external_attributes(3)
78     •   zip_file_set_encryption(3)
79     •   zip_file_set_mtime(3)
80     •   zip_set_file_compression(3)
81     •   zip_source_buffer(3)
82     •   zip_source_file(3)
83     •   zip_source_filep(3)
84     •   zip_source_free(3)
85     •   zip_source_function(3)
86     •   zip_source_zip(3)
87
88   rename files
89     •   zip_rename(3)
90
91   delete files
92     •   zip_delete(3)
93
94   revert changes
95     •   zip_unchange(3)
96     •   zip_unchange_all(3)
97     •   zip_unchange_archive(3)
98
99   read/modify extra fields
100     •   zip_file_extra_field_by_id(3)
101     •   zip_file_extra_field_delete(3)
102     •   zip_file_extra_field_delete_by_id(3)
103     •   zip_file_extra_field_get(3)
104     •   zip_file_extra_field_set(3)
105     •   zip_file_extra_fields_count(3)
106     •   zip_file_extra_fields_count_by_id(3)
107
108   close archive (writing)
109     •   zip_close(3)
110     •   zip_discard(3)
111
112   miscellaneous (writing)
113     •   zip_file_attributes_init(3)
114     •   zip_libzip_version(3)
115     •   zip_register_cancel_callback_with_state(3)
116     •   zip_register_progress_callback_with_state(3)
117     •   zip_set_archive_comment(3)
118     •   zip_set_archive_flag(3)
119     •   zip_source(3)
120

ERROR HANDLING

122     •   zip_error_strerror(3)
123     •   zip_strerror(3)
124     •   zip_file_strerror(3)
125     •   zip_file_get_error(3)
126     •   zip_get_error(3)
127     •   zip_error_init_with_code(3)
128     •   zip_error_system_type(3)
129     •   zip_errors(3)
130

AUTHORS

132     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
133
134BSD                              April 6, 2021                             BSD
Impressum