2
0

ManPageArchiveWriteSetOptions3.wiki 22 KB

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