1LIBZIP(3) BSD Library Functions Manual LIBZIP(3)
2
4 libzip — library for manipulating zip archives
5
7 libzip (-lzip)
8
10 #include <zip.h>
11
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
27 open archive
28 · [22mzip_open(3)
29 · [22mzip_fdopen(3)
30
31 find files
32 · [22mzip_name_locate(3)
33
34 read files
35 · [22mzip_fopen(3)
36 · [22mzip_fopen_encrypted(3)
37 · [22mzip_fopen_index(3)
38 · [22mzip_fopen_index_encrypted(3)
39 · [22mzip_fread(3)
40 · [22mzip_fseek(3) (uncompressed files only)
41 · [22mzip_ftell(3) (uncompressed files only)
42 · [22mzip_fclose(3)
43
44 close archive
45 · [22mzip_close(3)
46
47 miscellaneous
48 · [22mzip_stat(3)
49 · [22mzip_file_get_comment(3)
50 · [22mzip_file_get_external_attributes(3)
51 · [22mzip_get_archive_comment(3)
52 · [22mzip_get_archive_flag(3)
53 · [22mzip_get_name(3)
54 · [22mzip_get_num_entries(3)
55 · [22mzip_set_default_password(3)
56
58 create/open archive
59 · [22mzip_open(3)
60
61 add/change files and directories
62 · [22mzip_dir_add(3)
63 · [22mzip_file_add(3)
64 · [22mzip_file_replace(3)
65 · [22mzip_file_set_comment(3)
66 · [22mzip_file_set_external_attributes(3)
67 · [22mzip_file_set_encryption(3)
68 · [22mzip_file_set_mtime(3)
69 · [22mzip_set_file_compression(3)
70 · [22mzip_source_buffer(3)
71 · [22mzip_source_file(3)
72 · [22mzip_source_filep(3)
73 · [22mzip_source_free(3)
74 · [22mzip_source_function(3)
75 · [22mzip_source_zip(3)
76
77 rename files
78 · [22mzip_rename(3)
79
80 delete files
81 · [22mzip_delete(3)
82
83 revert changes
84 · [22mzip_unchange(3)
85 · [22mzip_unchange_all(3)
86 · [22mzip_unchange_archive(3)
87
88 read/modify extra fields
89 · [22mzip_file_extra_field_by_id(3)
90 · [22mzip_file_extra_field_delete(3)
91 · [22mzip_file_extra_field_delete_by_id(3)
92 · [22mzip_file_extra_field_get(3)
93 · [22mzip_file_extra_field_set(3)
94 · [22mzip_file_extra_fields_count(3)
95 · [22mzip_file_extra_fields_count_by_id(3)
96
97 close archive (writing)
98 · [22mzip_close(3)
99 · [22mzip_discard(3)
100
101 miscellaneous (writing)
102 · [22mzip_libzip_version(3)
103 · [22mzip_register_progress_callback_with_state(3)
104 · [22mzip_set_archive_comment(3)
105 · [22mzip_set_archive_flag(3)
106 · [22mzip_source(3)
107
109 · [22mzip_error_strerror(3)
110 · [22mzip_strerror(3)
111 · [22mzip_file_strerror(3)
112 · [22mzip_get_error(3)
113 · [22mzip_error_init_with_code(3)
114 · [22mzip_error_system_type(3)
115 · [22mzip_errors(3)
116
118 Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
119
120BSD September 29, 2018 BSD