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