1 .TH ARCHIVE_WRITE_OPTIONS 3 "January 31, 2020" ""
4 \fB\%archive_write_set_filter_option\fP,
5 \fB\%archive_write_set_format_option\fP,
6 \fB\%archive_write_set_option\fP,
7 \fB\%archive_write_set_options\fP
8 \- functions controlling options for writing archives
11 Streaming Archive Library (libarchive, -larchive)
17 \fB\%archive_write_set_filter_option\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ char\ *module\fP, \fI\%const\ char\ *option\fP, \fI\%const\ char\ *value\fP);
21 \fB\%archive_write_set_format_option\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ char\ *module\fP, \fI\%const\ char\ *option\fP, \fI\%const\ char\ *value\fP);
25 \fB\%archive_write_set_option\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ char\ *module\fP, \fI\%const\ char\ *option\fP, \fI\%const\ char\ *value\fP);
29 \fB\%archive_write_set_options\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ char\ *options\fP);
32 These functions provide a way for libarchive clients to configure
33 specific write modules.
36 \fB\%archive_write_set_filter_option\fP(),
37 \fB\%archive_write_set_format_option\fP()
38 Specifies an option that will be passed to the currently-registered
39 filters (including decompression filters) or format readers.
47 these functions will do nothing and
56 is not, these functions will do nothing and
67 will be provided to the filter or reader named
69 The return value will be either
71 if the option was successfully handled or
73 if the option was unrecognized by the module or could otherwise
75 If there is no such module,
86 will be provided to every registered module.
89 this value will be returned immediately.
92 will be returned if any module accepts the option, and
96 \fB\%archive_write_set_option\fP()
98 \fB\%archive_write_set_format_option\fP(),
100 \fB\%archive_write_set_filter_option\fP().
101 If either function returns
106 Otherwise, the greater of the two values will be returned.
108 \fB\%archive_write_set_options\fP()
110 is a comma-separated list of options.
117 will be returned immediately.
119 Individual options have one of the following forms:
123 The option/value pair will be provided to every module.
124 Modules that do not accept an option with this name will ignore it.
127 The option will be provided to every module with a value of
131 The option will be provided to every module with a NULL value.
133 \fImodule:option=value\fP, \fImodule:option\fP, \fImodule:!option\fP
134 As above, but the corresponding option and value will be provided
135 only to modules whose name matches
147 The value is interpreted as octal digits specifying the file mode.
150 The value specifies the file name.
156 \fBcompression-level\fP
157 The value is interpreted as a decimal integer specifying the
158 bzip2 compression level. Supported values are from 1 to 9.
164 \fBcompression-level\fP
165 The value is interpreted as a decimal integer specifying the
166 gzip compression level. Supported values are from 0 to 9.
169 Store timestamp. This is enabled by default.
175 \fBcompression\fP=\fItype\fP
178 as compression method.
186 (best, extremely slow.)
188 \fBcompression-level\fP
189 The value is interpreted as a decimal integer specifying the
190 lrzip compression level. Supported values are from 1 to 9.
196 \fBcompression-level\fP
197 The value is interpreted as a decimal integer specifying the
198 lz4 compression level. Supported values are from 0 to 9.
200 \fBstream-checksum\fP
201 Enable stream checksum. This is enabled by default.
204 Enable block checksum. This is disabled by default.
207 The value is interpreted as a decimal integer specifying the
208 lz4 compression block size. Supported values are from 4 to 7
211 \fBblock-dependence\fP
212 Use the previous block of the block being compressed for
213 a compression dictionary to improve compression ratio.
214 This is disabled by default.
220 \fBcompression-level\fP
221 The value is interpreted as a decimal integer specifying the
222 lzop compression level. Supported values are from 1 to 9.
229 The value is interpreted as octal digits specifying the file mode.
232 The value specifies the file name.
238 \fBcompression-level\fP
239 The value is interpreted as a decimal integer specifying the
240 compression level. Supported values are from 0 to 9.
243 The value is interpreted as a decimal integer specifying the
244 number of threads for multi-threaded lzma compression.
245 If supported, the default value is read from
246 \fB\%lzma_cputhreads\fP().
252 \fBcompression-level\fP
253 The value is interpreted as a decimal integer specifying the
254 compression level. Supported values are from 1 to 22.
269 to indicate how the following entries should be compressed.
270 Note that this setting is ignored for directories, symbolic links,
271 and other special entries.
273 \fBcompression-level\fP
274 The value is interpreted as a decimal integer specifying the
276 Values between 0 and 9 are supported.
277 The interpretation of the compression level depends on the chosen
285 The value is used as a character set name that will be
286 used when translating file names.
293 The value is used as a character set name that will be
294 used when translating file, group and user names.
297 Format iso9660 - volume metadata
298 These options are used to set standard ISO9660 metadata.
301 \fBabstract-file\fP=\fIfilename\fP
302 The file with the specified name will be identified in the ISO9660 metadata
303 as holding the abstract for this volume.
306 \fBapplication-id\fP=\fIfilename\fP
307 The file with the specified name will be identified in the ISO9660 metadata
308 as holding the application identifier for this volume.
311 \fBbiblio-file\fP=\fIfilename\fP
312 The file with the specified name will be identified in the ISO9660 metadata
313 as holding the bibliography for this volume.
316 \fBcopyright-file\fP=\fIfilename\fP
317 The file with the specified name will be identified in the ISO9660 metadata
318 as holding the copyright for this volume.
321 \fBpublisher\fP=\fIfilename\fP
322 The file with the specified name will be identified in the ISO9660 metadata
323 as holding the publisher information for this volume.
326 \fBvolume-id\fP=\fIstring\fP
327 The specified string will be used as the Volume Identifier in the ISO9660 metadata.
328 It is limited to 32 bytes.
332 Format iso9660 - boot support
333 These options are used to make an ISO9660 image that can be directly
334 booted on various systems.
337 \fBboot\fP=\fIfilename\fP
338 The file matching this name will be used as the El Torito boot image file.
340 \fBboot-catalog\fP=\fIname\fP
341 The name that will be used for the El Torito boot catalog.
345 \fBboot-info-table\fP
346 The boot image file provided by the
347 \fBboot\fP=\fIfilename\fP
348 option will be edited with appropriate boot information in bytes 8 through 64.
351 \fBboot-load-seg\fP=\fIhexadecimal-number\fP
352 The load segment for a no-emulation boot image.
354 \fBboot-load-size\fP=\fIdecimal-number\fP
355 The number of "virtual" 512-byte sectors to be loaded from a no-emulation boot image.
356 Some very old BIOSes can only load very small images, setting this
357 value to 4 will often allow such BIOSes to load the first part of
358 the boot image (which will then need to be intelligent enough to
359 load the rest of itself).
360 This should not be needed unless you are trying to support systems with very old BIOSes.
361 This defaults to the full size of the image.
363 \fBboot-type\fP=\fIvalue\fP
364 Specifies the boot semantics used by the El Torito boot image:
369 then the boot image is assumed to be a bootable floppy image.
374 then the boot image is assumed to be a bootable hard disk image.
379 the boot image is used without floppy or hard disk emulation.
380 If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then
383 otherwise the default is
387 Format iso9660 - filename and size extensions
388 Various extensions to the base ISO9660 format.
392 If enabled, allows filenames to begin with a leading period.
393 If disabled, filenames that begin with a leading period will have
394 that period replaced by an underscore character in the standard ISO9660
396 This does not impact names stored in the Rockridge or Joliet extension area.
399 \fBallow-lowercase\fP
400 If enabled, allows filenames to contain lowercase characters.
401 If disabled, filenames will be forced to uppercase.
402 This does not impact names stored in the Rockridge or Joliet extension area.
406 If enabled, allows filenames to contain multiple period characters, in violation of the ISO9660 specification.
407 If disabled, additional periods will be converted to underscore characters.
408 This does not impact names stored in the Rockridge or Joliet extension area.
412 If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification.
413 If disabled, trailing periods will be converted to underscore characters.
414 This does not impact names stored in the Rockridge or Joliet extension area.
417 \fBallow-pvd-lowercase\fP
418 If enabled, the Primary Volume Descriptor may contain lowercase ASCII characters, in violation of the ISO9660 specification.
419 If disabled, characters will be converted to uppercase ASCII.
422 \fBallow-sharp-tilde\fP
423 If enabled, sharp and tilde characters will be permitted in filenames, in violation if the ISO9660 specification.
424 If disabled, such characters will be converted to underscore characters.
428 If enabled, version numbers will be included with files.
429 If disabled, version numbers will be suppressed, in violation of the ISO9660 standard.
430 This does not impact names stored in the Rockridge or Joliet extension area.
434 This enables support for file size and file name extensions in the
436 The name extensions specified here do not affect the names stored in the Rockridge or Joliet extension areas.
440 The most compliant form of ISO9660 image.
441 Filenames are limited to 8.3 uppercase format,
442 directory names are limited to 8 uppercase characters,
443 files are limited to 4 GiB,
444 the complete ISO9660 image cannot exceed 4 GiB.
447 Filenames are limited to 30 uppercase characters with a 30-character extension,
448 directory names are limited to 30 characters,
449 files are limited to 4 GiB.
454 except that files may exceed 4 GiB.
459 except that filenames may be up to 193 characters
460 and may include arbitrary 8-bit characters.
464 Microsoft's Joliet extensions store a completely separate set of directory information about each file.
465 In particular, this information includes Unicode filenames of up to 255 characters.
469 If enabled, libarchive will use directory relocation records to ensure that
470 no pathname exceeds the ISO9660 limit of 8 directory levels.
471 If disabled, no relocation will occur.
475 If enabled, libarchive will cause an error if there are more than
477 If disabled, there is no limit on the number of directories.
481 If enabled, 300 kiB of zero bytes will be appended to the end of the archive.
484 \fBrelaxed-filenames\fP
485 If enabled, all 7-bit ASCII characters are permitted in filenames
486 (except lowercase characters unless
487 \fBallow-lowercase\fP
489 This violates ISO9660 standards.
490 This does not impact names stored in the Rockridge or Joliet extension area.
494 The Rockridge extensions store an additional set of POSIX-style file
495 information with each file, including mtime, atime, ctime, permissions,
496 and long filenames with arbitrary 8-bit characters.
497 These extensions also support symbolic links and other POSIX file types.
501 Format iso9660 - zisofs support
502 The zisofs extensions permit each file to be independently compressed
503 using a gzip-compatible compression.
504 This can provide significant size savings, but requires the reading
505 system to have support for these extensions.
506 These extensions are disabled by default.
509 \fBcompression-level\fP=number
510 The compression level used by the deflate compressor.
511 Ranges from 0 (least effort) to 9 (most effort).
519 Compress each file in the archive.
521 \fBzisofs=indirect\fP,
522 this is handled entirely within libarchive and does not require a
524 For best results, libarchive tests each file and will store
525 the file uncompressed if the compression does not actually save any space.
526 In particular, files under 2k will never be compressed.
527 Note that boot image files are never compressed.
529 \fBzisofs=indirect\fP
530 Recognizes files that have already been compressed with the
532 utility and sets up the necessary file metadata so that
533 readers will correctly identify these as zisofs-compressed files.
535 \fBzisofs-exclude\fP=\fIfilename\fP
536 Specifies a filename that should not be compressed when using
538 This option can be provided multiple times to suppress compression
545 \fBcksum\fP, \fBdevice\fP, \fBflags\fP, \fBgid\fP, \fBgname\fP, \fBindent\fP, \fBlink\fP, \fBmd5\fP, \fBmode\fP, \fBnlink\fP, \fBrmd160\fP, \fBsha1\fP, \fBsha256\fP, \fBsha384\fP, \fBsha512\fP, \fBsize\fP, \fBtime\fP, \fBuid\fP, \fBuname\fP
546 Enable a particular keyword in the mtree output.
547 Prefix with an exclamation mark to disable the corresponding keyword.
548 The default is equivalent to
549 ``device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname''.
552 Enables all of the above keywords.
555 Enables generation of
557 lines that specify default values for the following files and/or directories.
560 XXX needs explanation XXX
567 The value is used as a character set name that will be
568 used when translating file names.
575 The value is used as a character set name that will be
576 used when translating file, group and user names.
583 there is no character conversion, with
585 names are converted to UTF-8.
588 When storing extended attributes, this option configures which
589 headers should be written. The value is one of
605 The value is used as a character set name that will be
606 used when translating file, group and user names.
613 The value is used as a character set name that will be
614 used when translating file, group and user names.
623 to disable output of the warcinfo record.
629 \fBchecksum\fP=\fItype\fP
632 as file checksum method.
640 \fBcompression\fP=\fItype\fP
643 as compression method.
653 \fBcompression_level\fP
654 The value is a decimal integer from 1 to 9 specifying the compression level.
656 \fBtoc-checksum\fP=\fItype\fP
659 as table of contents checksum method.
676 to indicate how the following entries should be compressed.
677 Note that this setting is ignored for directories, symbolic links,
678 and other special entries.
680 \fBcompression-level\fP
681 The value is interpreted as a decimal integer specifying the
683 Values between 0 and 9 are supported.
684 A compression level of 0 switches the compression method to
686 other values will enable
688 compression with the given level.
691 Enable encryption using traditional zip encryption.
693 \fBencryption\fP=\fItype\fP
699 (traditional zip encryption,)
701 (WinZip AES-128 encryption)
704 (WinZip AES-256 encryption.)
707 This boolean option enables or disables experimental Zip features
708 that may not be compatible with other Zip implementations.
711 This boolean option disables CRC calculations.
712 All CRC fields are set to zero.
713 It should not be used except for testing purposes.
716 The value is used as a character set name that will be
717 used when translating file names.
720 Zip64 extensions provide additional file size information
721 for entries larger than 4 GiB.
722 They also provide extended file offset and archive size information
723 when archives exceed 4 GiB.
724 By default, the Zip writer selectively enables these extensions only as needed.
725 In particular, if the file size is unknown, the Zip writer will
726 include Zip64 extensions to guard against the possibility that the
727 file might be larger than 4 GiB.
729 Setting this boolean option will force the writer to use Zip64 extensions
730 even for small files that would not otherwise require them.
731 This is primarily useful for testing.
733 Disabling this option with
735 will force the Zip writer to avoid Zip64 extensions:
736 It will reject files with size greater than 4 GiB,
737 it will reject any new entries once the total archive size reaches 4 GiB,
738 and it will not use Zip64 extensions for files with unknown size.
739 In particular, this can improve compatibility when generating archives
740 where the entry sizes are not known in advance.
745 The following example creates an archive write handle to
746 create a gzip-compressed ISO9660 format image.
747 The two options here specify that the ISO9660 archive will use
749 as the boot image for El Torito booting, and that the gzip
750 compressor should use the maximum compression level.
753 a = archive_write_new();
754 archive_write_add_filter_gzip(a);
755 archive_write_set_format_iso9660(a);
756 archive_write_set_options(a, "boot=kernel.img,compression=9");
757 archive_write_open_filename(a, filename, blocksize);
761 More detailed error codes and textual descriptions are available from the
762 \fB\%archive_errno\fP()
764 \fB\%archive_error_string\fP()
769 \fBarchive_read_set_options\fP(3),
770 \fBarchive_write\fP(3),
776 library first appeared in
781 The options support for libarchive was originally implemented by