Imported Upstream version 3.22.5
[platform/upstream/cmake.git] / Utilities / cmlibarchive / libarchive / archive_write_set_options.3
1 .\" Copyright (c) 2003-2010 Tim Kientzle
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd January 31, 2020
28 .Dt ARCHIVE_WRITE_OPTIONS 3
29 .Os
30 .Sh NAME
31 .Nm archive_write_set_filter_option ,
32 .Nm archive_write_set_format_option ,
33 .Nm archive_write_set_option ,
34 .Nm archive_write_set_options
35 .Nd functions controlling options for writing archives
36 .Sh LIBRARY
37 Streaming Archive Library (libarchive, -larchive)
38 .Sh SYNOPSIS
39 .Ft int
40 .Fo archive_write_set_filter_option
41 .Fa "struct archive *"
42 .Fa "const char *module"
43 .Fa "const char *option"
44 .Fa "const char *value"
45 .Fc
46 .Ft int
47 .Fo archive_write_set_format_option
48 .Fa "struct archive *"
49 .Fa "const char *module"
50 .Fa "const char *option"
51 .Fa "const char *value"
52 .Fc
53 .Ft int
54 .Fo archive_write_set_option
55 .Fa "struct archive *"
56 .Fa "const char *module"
57 .Fa "const char *option"
58 .Fa "const char *value"
59 .Fc
60 .Ft int
61 .Fo archive_write_set_options
62 .Fa "struct archive *"
63 .Fa "const char *options"
64 .Fc
65 .Sh DESCRIPTION
66 These functions provide a way for libarchive clients to configure
67 specific write modules.
68 .Bl -tag -width indent
69 .It Xo
70 .Fn archive_write_set_filter_option ,
71 .Fn archive_write_set_format_option
72 .Xc
73 Specifies an option that will be passed to the currently-registered
74 filters (including decompression filters) or format readers.
75 .Pp
76 If
77 .Ar option
78 and
79 .Ar value
80 are both
81 .Dv NULL ,
82 these functions will do nothing and
83 .Cm ARCHIVE_OK
84 will be returned.
85 If
86 .Ar option
87 is
88 .Dv NULL
89 but
90 .Ar value
91 is not, these functions will do nothing and
92 .Cm ARCHIVE_FAILED
93 will be returned.
94 .Pp
95 If
96 .Ar module
97 is not
98 .Dv NULL ,
99 .Ar option
100 and
101 .Ar value
102 will be provided to the filter or reader named
103 .Ar module .
104 The return value will be either
105 .Cm ARCHIVE_OK
106 if the option was successfully handled or
107 .Cm ARCHIVE_WARN
108 if the option was unrecognized by the module or could otherwise
109 not be handled.
110 If there is no such module,
111 .Cm ARCHIVE_FAILED
112 will be returned.
113 .Pp
114 If
115 .Ar module
116 is
117 .Dv NULL ,
118 .Ar option
119 and
120 .Ar value
121 will be provided to every registered module.
122 If any module returns
123 .Cm ARCHIVE_FATAL ,
124 this value will be returned immediately.
125 Otherwise,
126 .Cm ARCHIVE_OK
127 will be returned if any module accepts the option, and
128 .Cm ARCHIVE_FAILED
129 in all other cases.
130 .\"
131 .It Fn archive_write_set_option
132 Calls
133 .Fn archive_write_set_format_option ,
134 then
135 .Fn archive_write_set_filter_option .
136 If either function returns
137 .Cm ARCHIVE_FATAL ,
138 .Cm ARCHIVE_FATAL
139 will be returned
140 immediately.
141 Otherwise, the greater of the two values will be returned.
142 .\"
143 .It Fn archive_write_set_options
144 .Ar options
145 is a comma-separated list of options.
146 If
147 .Ar options
148 is
149 .Dv NULL
150 or empty,
151 .Cm ARCHIVE_OK
152 will be returned immediately.
153 .Pp
154 Individual options have one of the following forms:
155 .Bl -tag -compact -width indent
156 .It Ar option=value
157 The option/value pair will be provided to every module.
158 Modules that do not accept an option with this name will ignore it.
159 .It Ar option
160 The option will be provided to every module with a value of
161 .Dq 1 .
162 .It Ar !option
163 The option will be provided to every module with a NULL value.
164 .It Ar module:option=value , Ar module:option , Ar module:!option
165 As above, but the corresponding option and value will be provided
166 only to modules whose name matches
167 .Ar module .
168 .El
169 .El
170 .\"
171 .Sh OPTIONS
172 .Bl -tag -compact -width indent
173 .It Filter b64encode
174 .Bl -tag -compact -width indent
175 .It Cm mode
176 The value is interpreted as octal digits specifying the file mode.
177 .It Cm name
178 The value specifies the file name.
179 .El
180 .It Filter bzip2
181 .Bl -tag -compact -width indent
182 .It Cm compression-level
183 The value is interpreted as a decimal integer specifying the
184 bzip2 compression level. Supported values are from 1 to 9.
185 .El
186 .It Filter gzip
187 .Bl -tag -compact -width indent
188 .It Cm compression-level
189 The value is interpreted as a decimal integer specifying the
190 gzip compression level. Supported values are from 0 to 9.
191 .It Cm timestamp
192 Store timestamp. This is enabled by default.
193 .El
194 .It Filter lrzip
195 .Bl -tag -compact -width indent
196 .It Cm compression Ns = Ns Ar type
197 Use
198 .Ar type
199 as compression method.
200 Supported values are
201 .Dq bzip2 ,
202 .Dq gzipi ,
203 .Dq lzo
204 .Pq ultra fast ,
205 and
206 .Dq zpaq
207 .Pq best, extremely slow .
208 .It Cm compression-level
209 The value is interpreted as a decimal integer specifying the
210 lrzip compression level. Supported values are from 1 to 9.
211 .El
212 .It Filter lz4
213 .Bl -tag -compact -width indent
214 .It Cm compression-level
215 The value is interpreted as a decimal integer specifying the
216 lz4 compression level. Supported values are from 0 to 9.
217 .It Cm stream-checksum
218 Enable stream checksum. This is enabled by default.
219 .It Cm block-checksum
220 Enable block checksum. This is disabled by default.
221 .It Cm block-size
222 The value is interpreted as a decimal integer specifying the
223 lz4 compression block size. Supported values are from 4 to 7
224 .Pq default .
225 .It Cm block-dependence
226 Use the previous block of the block being compressed for
227 a compression dictionary to improve compression ratio.
228 This is disabled by default.
229 .El
230 .It Filter lzop
231 .Bl -tag -compact -width indent
232 .It Cm compression-level
233 The value is interpreted as a decimal integer specifying the
234 lzop compression level. Supported values are from 1 to 9.
235 .El
236 .It Filter uuencode
237 .Bl -tag -compact -width indent
238 .It Cm mode
239 The value is interpreted as octal digits specifying the file mode.
240 .It Cm name
241 The value specifies the file name.
242 .El
243 .It Filter xz
244 .Bl -tag -compact -width indent
245 .It Cm compression-level
246 The value is interpreted as a decimal integer specifying the
247 compression level. Supported values are from 0 to 9.
248 .It Cm threads
249 The value is interpreted as a decimal integer specifying the
250 number of threads for multi-threaded lzma compression.
251 If supported, the default value is read from
252 .Fn lzma_cputhreads .
253 .El
254 .It Filter zstd
255 .Bl -tag -compact -width indent
256 .It Cm compression-level
257 The value is interpreted as a decimal integer specifying the
258 compression level. Supported values depend on the library version,
259 common values are from 1 to 22.
260 .El
261 .It Format 7zip
262 .Bl -tag -compact -width indent
263 .It Cm compression
264 The value is one of
265 .Dq store ,
266 .Dq deflate ,
267 .Dq bzip2 ,
268 .Dq lzma1 ,
269 .Dq lzma2
270 or
271 .Dq ppmd
272 to indicate how the following entries should be compressed.
273 Note that this setting is ignored for directories, symbolic links,
274 and other special entries.
275 .It Cm compression-level
276 The value is interpreted as a decimal integer specifying the
277 compression level.
278 Values between 0 and 9 are supported.
279 The interpretation of the compression level depends on the chosen
280 compression method.
281 .El
282 .It Format bin
283 .Bl -tag -compact -width indent
284 .It Cm hdrcharset
285 The value is used as a character set name that will be
286 used when translating file names.
287 .El
288 .It Format gnutar
289 .Bl -tag -compact -width indent
290 .It Cm hdrcharset
291 The value is used as a character set name that will be
292 used when translating file, group and user names.
293 .El
294 .It Format iso9660 - volume metadata
295 These options are used to set standard ISO9660 metadata.
296 .Bl -tag -compact -width indent
297 .It Cm abstract-file Ns = Ns Ar filename
298 The file with the specified name will be identified in the ISO9660 metadata
299 as holding the abstract for this volume.
300 Default: none.
301 .It Cm application-id Ns = Ns Ar filename
302 The file with the specified name will be identified in the ISO9660 metadata
303 as holding the application identifier for this volume.
304 Default: none.
305 .It Cm biblio-file Ns = Ns Ar filename
306 The file with the specified name will be identified in the ISO9660 metadata
307 as holding the bibliography for this volume.
308 Default: none.
309 .It Cm copyright-file Ns = Ns Ar filename
310 The file with the specified name will be identified in the ISO9660 metadata
311 as holding the copyright for this volume.
312 Default: none.
313 .It Cm publisher Ns = Ns Ar filename
314 The file with the specified name will be identified in the ISO9660 metadata
315 as holding the publisher information for this volume.
316 Default: none.
317 .It Cm volume-id Ns = Ns Ar string
318 The specified string will be used as the Volume Identifier in the ISO9660 metadata.
319 It is limited to 32 bytes.
320 Default: none.
321 .El
322 .It Format iso9660 - boot support
323 These options are used to make an ISO9660 image that can be directly
324 booted on various systems.
325 .Bl -tag -compact -width indent
326 .It Cm boot Ns = Ns Ar filename
327 The file matching this name will be used as the El Torito boot image file.
328 .It Cm boot-catalog Ns = Ns Ar name
329 The name that will be used for the El Torito boot catalog.
330 Default:
331 .Ar boot.catalog
332 .It Cm boot-info-table
333 The boot image file provided by the
334 .Cm boot Ns = Ns Ar filename
335 option will be edited with appropriate boot information in bytes 8 through 64.
336 Default: disabled
337 .It Cm boot-load-seg Ns = Ns Ar hexadecimal-number
338 The load segment for a no-emulation boot image.
339 .It Cm boot-load-size Ns = Ns Ar decimal-number
340 The number of "virtual" 512-byte sectors to be loaded from a no-emulation boot image.
341 Some very old BIOSes can only load very small images, setting this
342 value to 4 will often allow such BIOSes to load the first part of
343 the boot image (which will then need to be intelligent enough to
344 load the rest of itself).
345 This should not be needed unless you are trying to support systems with very old BIOSes.
346 This defaults to the full size of the image.
347 .It Cm boot-type Ns = Ns Ar value
348 Specifies the boot semantics used by the El Torito boot image:
349 If the
350 .Ar value
351 is
352 .Cm fd ,
353 then the boot image is assumed to be a bootable floppy image.
354 If the
355 .Ar value
356 is
357 .Cm hd ,
358 then the boot image is assumed to be a bootable hard disk image.
359 If the
360 .Ar value
361 is
362 .Cm no-emulation ,
363 the boot image is used without floppy or hard disk emulation.
364 If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then
365 the default is
366 .Cm fd ,
367 otherwise the default is
368 .Cm no-emulation .
369 .El
370 .It Format iso9660 - filename and size extensions
371 Various extensions to the base ISO9660 format.
372 .Bl -tag -compact -width indent
373 .It Cm allow-ldots
374 If enabled, allows filenames to begin with a leading period.
375 If disabled, filenames that begin with a leading period will have
376 that period replaced by an underscore character in the standard ISO9660
377 namespace.
378 This does not impact names stored in the Rockridge or Joliet extension area.
379 Default: disabled.
380 .It Cm allow-lowercase
381 If enabled, allows filenames to contain lowercase characters.
382 If disabled, filenames will be forced to uppercase.
383 This does not impact names stored in the Rockridge or Joliet extension area.
384 Default: disabled.
385 .It Cm allow-multidot
386 If enabled, allows filenames to contain multiple period characters, in violation of the ISO9660 specification.
387 If disabled, additional periods will be converted to underscore characters.
388 This does not impact names stored in the Rockridge or Joliet extension area.
389 Default: disabled.
390 .It Cm allow-period
391 If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification.
392 If disabled, trailing periods will be converted to underscore characters.
393 This does not impact names stored in the Rockridge or Joliet extension area.
394 Default: disabled.
395 .It Cm allow-pvd-lowercase
396 If enabled, the Primary Volume Descriptor may contain lowercase ASCII characters, in violation of the ISO9660 specification.
397 If disabled, characters will be converted to uppercase ASCII.
398 Default: disabled.
399 .It Cm allow-sharp-tilde
400 If enabled, sharp and tilde characters will be permitted in filenames, in violation if the ISO9660 specification.
401 If disabled, such characters will be converted to underscore characters.
402 Default: disabled.
403 .It Cm allow-vernum
404 If enabled, version numbers will be included with files.
405 If disabled, version numbers will be suppressed, in violation of the ISO9660 standard.
406 This does not impact names stored in the Rockridge or Joliet extension area.
407 Default: enabled.
408 .It Cm iso-level
409 This enables support for file size and file name extensions in the
410 core ISO9660 area.
411 The name extensions specified here do not affect the names stored in the Rockridge or Joliet extension areas.
412 .Bl -tag -compact -width indent
413 .It Cm iso-level=1
414 The most compliant form of ISO9660 image.
415 Filenames are limited to 8.3 uppercase format,
416 directory names are limited to 8 uppercase characters,
417 files are limited to 4 GiB,
418 the complete ISO9660 image cannot exceed 4 GiB.
419 .It Cm iso-level=2
420 Filenames are limited to 30 uppercase characters with a 30-character extension,
421 directory names are limited to 30 characters,
422 files are limited to 4 GiB.
423 .It Cm iso-level=3
424 As with
425 .Cm iso-level=2 ,
426 except that files may exceed 4 GiB.
427 .It Cm iso-level=4
428 As with
429 .Cm iso-level=3 ,
430 except that filenames may be up to 193 characters
431 and may include arbitrary 8-bit characters.
432 .El
433 .It Cm joliet
434 Microsoft's Joliet extensions store a completely separate set of directory information about each file.
435 In particular, this information includes Unicode filenames of up to 255 characters.
436 Default: enabled.
437 .It Cm limit-depth
438 If enabled, libarchive will use directory relocation records to ensure that
439 no pathname exceeds the ISO9660 limit of 8 directory levels.
440 If disabled, no relocation will occur.
441 Default: enabled.
442 .It Cm limit-dirs
443 If enabled, libarchive will cause an error if there are more than
444 65536 directories.
445 If disabled, there is no limit on the number of directories.
446 Default: enabled
447 .It Cm pad
448 If enabled, 300 kiB of zero bytes will be appended to the end of the archive.
449 Default: enabled
450 .It Cm relaxed-filenames
451 If enabled, all 7-bit ASCII characters are permitted in filenames
452 (except lowercase characters unless
453 .Cm allow-lowercase
454 is also specified).
455 This violates ISO9660 standards.
456 This does not impact names stored in the Rockridge or Joliet extension area.
457 Default: disabled.
458 .It Cm rockridge
459 The Rockridge extensions store an additional set of POSIX-style file
460 information with each file, including mtime, atime, ctime, permissions,
461 and long filenames with arbitrary 8-bit characters.
462 These extensions also support symbolic links and other POSIX file types.
463 Default: enabled.
464 .El
465 .It Format iso9660 - zisofs support
466 The zisofs extensions permit each file to be independently compressed
467 using a gzip-compatible compression.
468 This can provide significant size savings, but requires the reading
469 system to have support for these extensions.
470 These extensions are disabled by default.
471 .Bl -tag -compact -width indent
472 .It Cm compression-level Ns = Ns number
473 The compression level used by the deflate compressor.
474 Ranges from 0 (least effort) to 9 (most effort).
475 Default: 6
476 .It Cm zisofs
477 Synonym for
478 .Cm zisofs=direct .
479 .It Cm zisofs=direct
480 Compress each file in the archive.
481 Unlike
482 .Cm zisofs=indirect ,
483 this is handled entirely within libarchive and does not require a
484 separate utility.
485 For best results, libarchive tests each file and will store
486 the file uncompressed if the compression does not actually save any space.
487 In particular, files under 2k will never be compressed.
488 Note that boot image files are never compressed.
489 .It Cm zisofs=indirect
490 Recognizes files that have already been compressed with the
491 .Cm mkzftree
492 utility and sets up the necessary file metadata so that
493 readers will correctly identify these as zisofs-compressed files.
494 .It Cm zisofs-exclude Ns = Ns Ar filename
495 Specifies a filename that should not be compressed when using
496 .Cm zisofs=direct .
497 This option can be provided multiple times to suppress compression
498 on many files.
499 .El
500 .It Format mtree
501 .Bl -tag -compact -width indent
502 .It Cm cksum , Cm device , Cm flags , Cm gid , Cm gname , Cm indent , Cm link , Cm md5 , Cm mode , Cm nlink , Cm rmd160 , Cm sha1 , Cm sha256 , Cm sha384 , Cm sha512 , Cm size , Cm time , Cm uid , Cm uname
503 Enable a particular keyword in the mtree output.
504 Prefix with an exclamation mark to disable the corresponding keyword.
505 The default is equivalent to
506 .Dq device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname .
507 .It Cm all
508 Enables all of the above keywords.
509 .It Cm use-set
510 Enables generation of
511 .Cm /set
512 lines that specify default values for the following files and/or directories.
513 .It Cm indent
514 XXX needs explanation XXX
515 .El
516 .It Format newc
517 .Bl -tag -compact -width indent
518 .It Cm hdrcharset
519 The value is used as a character set name that will be
520 used when translating file names.
521 .El
522 .It Format odc
523 .Bl -tag -compact -width indent
524 .It Cm hdrcharset
525 The value is used as a character set name that will be
526 used when translating file names.
527 .El
528 .It Format pwb
529 .Bl -tag -compact -width indent
530 .It Cm hdrcharset
531 The value is used as a character set name that will be
532 used when translating file names.
533 .El
534 .It Format pax
535 .Bl -tag -compact -width indent
536 .It Cm hdrcharset
537 The value is used as a character set name that will be
538 used when translating file, group and user names.
539 The value is one of
540 .Dq BINARY
541 or
542 .Dq UTF-8 .
543 With
544 .Dq BINARY
545 there is no character conversion, with
546 .Dq UTF-8
547 names are converted to UTF-8.
548 .It Cm xattrheader
549 When storing extended attributes, this option configures which
550 headers should be written. The value is one of
551 .Dq all ,
552 .Dq LIBARCHIVE ,
553 or
554 .Dq SCHILY .
555 By default, both
556 .Dq LIBARCHIVE.xattr
557 and
558 .Dq SCHILY.xattr
559 headers are written.
560 .El
561 .It Format ustar
562 .Bl -tag -compact -width indent
563 .It Cm hdrcharset
564 The value is used as a character set name that will be
565 used when translating file, group and user names.
566 .El
567 .It Format v7tar
568 .Bl -tag -compact -width indent
569 .It Cm hdrcharset
570 The value is used as a character set name that will be
571 used when translating file, group and user names.
572 .El
573 .It Format warc
574 .Bl -tag -compact -width indent
575 .It Cm omit-warcinfo
576 Set to
577 .Dq true
578 to disable output of the warcinfo record.
579 .El
580 .It Format xar
581 .Bl -tag -compact -width indent
582 .It Cm checksum Ns = Ns Ar type
583 Use
584 .Ar type
585 as file checksum method.
586 Supported values are
587 .Dq none ,
588 .Dq md5 ,
589 and
590 .Dq sha1
591 .Pq default .
592 .It Cm compression Ns = Ns Ar type
593 Use
594 .Ar type
595 as compression method.
596 Supported values are
597 .Dq none ,
598 .Dq bzip2 ,
599 .Dq gzip
600 .Pq default ,
601 .Dq lzma
602 and
603 .Dq xz .
604 .It Cm compression_level
605 The value is a decimal integer from 1 to 9 specifying the compression level.
606 .It Cm toc-checksum Ns = Ns Ar type
607 Use
608 .Ar type
609 as table of contents checksum method.
610 Supported values are
611 .Dq none ,
612 .Dq md5
613 and
614 .Dq sha1
615 .Pq default .
616 .El
617 .It Format zip
618 .Bl -tag -compact -width indent
619 .It Cm compression
620 The value is either
621 .Dq store
622 or
623 .Dq deflate
624 to indicate how the following entries should be compressed.
625 Note that this setting is ignored for directories, symbolic links,
626 and other special entries.
627 .It Cm compression-level
628 The value is interpreted as a decimal integer specifying the
629 compression level.
630 Values between 0 and 9 are supported.
631 A compression level of 0 switches the compression method to
632 .Dq store ,
633 other values will enable
634 .Dq deflate
635 compression with the given level.
636 .It Cm encryption
637 Enable encryption using traditional zip encryption.
638 .It Cm encryption Ns = Ns Ar type
639 Use
640 .Ar type
641 as encryption type.
642 Supported values are
643 .Dq zipcrypt
644 .Pq traditional zip encryption ,
645 .Dq aes128
646 .Pq WinZip AES-128 encryption
647 and
648 .Dq aes256
649 .Pq WinZip AES-256 encryption .
650 .It Cm experimental
651 This boolean option enables or disables experimental Zip features
652 that may not be compatible with other Zip implementations.
653 .It Cm fakecrc32
654 This boolean option disables CRC calculations.
655 All CRC fields are set to zero.
656 It should not be used except for testing purposes.
657 .It Cm hdrcharset
658 The value is used as a character set name that will be
659 used when translating file names.
660 .It Cm zip64
661 Zip64 extensions provide additional file size information
662 for entries larger than 4 GiB.
663 They also provide extended file offset and archive size information
664 when archives exceed 4 GiB.
665 By default, the Zip writer selectively enables these extensions only as needed.
666 In particular, if the file size is unknown, the Zip writer will
667 include Zip64 extensions to guard against the possibility that the
668 file might be larger than 4 GiB.
669 .Pp
670 Setting this boolean option will force the writer to use Zip64 extensions
671 even for small files that would not otherwise require them.
672 This is primarily useful for testing.
673 .Pp
674 Disabling this option with
675 .Cm !zip64
676 will force the Zip writer to avoid Zip64 extensions:
677 It will reject files with size greater than 4 GiB,
678 it will reject any new entries once the total archive size reaches 4 GiB,
679 and it will not use Zip64 extensions for files with unknown size.
680 In particular, this can improve compatibility when generating archives
681 where the entry sizes are not known in advance.
682 .El
683 .El
684 .Sh EXAMPLES
685 The following example creates an archive write handle to
686 create a gzip-compressed ISO9660 format image.
687 The two options here specify that the ISO9660 archive will use
688 .Ar kernel.img
689 as the boot image for El Torito booting, and that the gzip
690 compressor should use the maximum compression level.
691 .Bd -literal -offset indent
692 a = archive_write_new();
693 archive_write_add_filter_gzip(a);
694 archive_write_set_format_iso9660(a);
695 archive_write_set_options(a, "boot=kernel.img,compression=9");
696 archive_write_open_filename(a, filename, blocksize);
697 .Ed
698 .\"
699 .Sh ERRORS
700 More detailed error codes and textual descriptions are available from the
701 .Fn archive_errno
702 and
703 .Fn archive_error_string
704 functions.
705 .\"
706 .Sh SEE ALSO
707 .Xr tar 1 ,
708 .Xr archive_read_set_options 3 ,
709 .Xr archive_write 3 ,
710 .Xr libarchive 3
711 .Sh HISTORY
712 The
713 .Nm libarchive
714 library first appeared in
715 .Fx 5.3 .
716 .Sh AUTHORS
717 .An -nosplit
718 The options support for libarchive was originally implemented by
719 .An Michihiro NAKAJIMA .
720 .Sh BUGS