1 .TH "ZIPTOOL" "1" "January 19, 2016" "NiH" "General Commands Manual"
12 \fBcommand\fR\ [\fIcommand-args\ ...\fR]
13 [\fBcommand\fR\ [\fIcommand-args\ ...\fR]\ ...]
16 modifies the zip archive
25 Check zip archive consistency when opening it.
28 Error if archive already exists (only useful with
32 Guess file name encoding (for
40 In other words, when the modified zip archive contains long runs of zeroes,
41 write a basic run-length encoded block instead.
43 This command is for internal testing of
45 and will usually create invalid zip archives.
51 Read archive into memory, and modify there; write out at end.
53 This command is for internal testing of
57 Create archive if it doesn't exist.
62 Print raw file name encoding without translation (for
67 Follow file name convention strictly (for
72 Disregard current file contents, if any.
74 use this with care, it deletes all existing file contents when
75 you modify the archive.
77 For all commands below, the index is zero-based.
78 In other words, the first entry in the zip archive has index 0.
80 Supported commands and arguments are:
82 \fBadd\fR \fIname content\fR
87 from the command line as data.
89 \fBadd_dir\fR \fIname\fR
93 \fBadd_file\fR \fIname file_to_add offset len\fR
100 as input data, starting at
103 \fBadd_from_zip\fR \fIname archivename index offset len\fR
106 to archive using data from another zip archive
108 using the entry with index
115 \fBadd_nul\fR \fIname length\fR
121 (Mostly useful for testing.)
123 \fBcat\fR \fIindex\fR
124 Output file contents for entry
128 \fBcount_extra\fR \fIindex flags\fR
129 Print the number of extra fields for archive entry
134 \fBcount_extra_by_id\fR \fIindex extra_id flags\fR
135 Print number of extra fields of type
142 \fBdelete\fR \fIindex\fR
147 \fBdelete_extra\fR \fIindex extra_idx flags\fR
148 Remove extra field number
155 \fBdelete_extra_by_id\fR \fIindex extra_id extra_index flags\fR
156 Remove extra field number
165 \fBget_archive_comment\fR
166 Print archive comment.
168 \fBget_extra\fR \fIindex extra_index flags\fR
176 \fBget_extra_by_id\fR \fIindex extra_id extra_index flags\fR
186 \fBget_file_comment\fR \fIindex\fR
187 Get file comment for archive entry
190 \fBget_num_entries\fR \fIflags\fR
191 Print number of entries in archive using
194 \fBname_locate\fR \fIname flags\fR
195 Find entry in archive with the filename
201 \fBrename\fR \fIindex name\fR
207 \fBreplace_file_contents\fR \fIindex data\fR
208 Replace file contents for archive entry
213 \fBset_archive_comment\fR \fIcomment\fR
214 Set archive comment to
217 \fBset_extra\fR \fIindex extra_id extra_index flags value\fR
218 Set extra field number
229 \fBset_file_comment\fR \fIindex comment\fR
230 Set file comment for archive entry
235 \fBset_file_compression\fR \fIindex method compression_flags\fR
236 Set file compression method for archive entry
241 \fIcompression_flags\fR.
244 \fIcompression_flags\fR
247 \fBset_file_mtime\fR \fIindex timestamp\fR
248 Set file modification time for archive entry
253 \fBset_file_mtime_all\fR \fItimestamp\fR
254 Set file modification time for all archive entries to UNIX mtime
257 \fBset_password\fR \fIpassword\fR
258 Set default password for encryption/decryption to
261 \fBstat\fR \fIindex\fR
262 Print information about archive entry
266 Revert all changes up to that point.
267 Mostly useful for testing.
269 \fBzin_close\fR \fIindex\fR
270 Close input zip_source
272 For internal tests only.
274 Some commands take flag arguments.
292 \fRZIP_FL_UNCHANGED\fR
295 .SS "Compression Methods"
296 Some commands take compression method arguments.
297 Supported methods are:
313 The \fBziptool\fR utility exits\~0 on success, and\~>0 if an error occurs.
320 \(LqThis is a test.\en\(Rq
323 is replaced with a newline character:
327 ziptool testbuffer.zip add teststring.txt \\"This is a test.\en\\"
331 Delete the first file from the zip archive
336 ziptool testfile.zip delete 0
344 Dieter Baron <\fIdillo@nih.at\fR>
346 Thomas Klausner <\fItk@giga.or.at\fR>