@papyrus-sdk/engine-native 0.2.22-beta.9.epub.2 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/PapyrusNativeEngine.podspec +45 -0
  2. package/android/build.gradle +1 -0
  3. package/android/src/main/cpp/CMakeLists.txt +137 -0
  4. package/android/src/main/cpp/PapyrusComicArchiveJni.cpp +68 -0
  5. package/android/src/main/cpp/PapyrusComicArchiveTest.cpp +55 -0
  6. package/android/src/main/cpp/papyrus_outline_loader_test.cpp +240 -0
  7. package/android/src/main/cpp/papyrus_text_word_test.cpp +72 -0
  8. package/android/src/main/java/com/papyrus/engine/PapyrusComicArchiveNative.java +14 -0
  9. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentView.java +491 -0
  10. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentViewManager.java +32 -0
  11. package/android/src/main/java/com/papyrus/engine/PapyrusComicPageLayout.java +38 -0
  12. package/android/src/main/java/com/papyrus/engine/PapyrusNativeEngineModule.java +305 -35
  13. package/android/src/main/java/com/papyrus/engine/PapyrusNativeTextModel.java +195 -0
  14. package/android/src/main/java/com/papyrus/engine/PapyrusPackage.java +3 -1
  15. package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerView.java +195 -5
  16. package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerViewManager.java +20 -1
  17. package/android/src/main/java/com/papyrus/engine/PapyrusSelectionMenuIcon.java +48 -0
  18. package/android/src/main/java/com/papyrus/engine/PapyrusTextAnnotationModel.java +22 -0
  19. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentView.java +661 -0
  20. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentViewManager.java +49 -0
  21. package/android/src/main/java/com/papyrus/engine/PapyrusTextStore.java +43 -0
  22. package/dist/index.d.mts +614 -4
  23. package/dist/index.d.ts +614 -4
  24. package/dist/index.js +484 -8
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.mjs +477 -7
  27. package/dist/index.mjs.map +1 -1
  28. package/ios/PapyrusComicDocumentView.h +21 -0
  29. package/ios/PapyrusComicDocumentView.m +554 -0
  30. package/ios/PapyrusComicDocumentViewManager.m +23 -0
  31. package/ios/PapyrusEngineStore.h +3 -0
  32. package/ios/PapyrusEngineStore.m +32 -6
  33. package/ios/PapyrusNativeEngine.m +684 -5
  34. package/ios/PapyrusPageRotationRegistry.h +29 -0
  35. package/ios/PapyrusPageRotationRegistry.m +179 -0
  36. package/ios/PapyrusPageView.m +38 -11
  37. package/ios/PapyrusPdfDocumentView.h +55 -0
  38. package/ios/PapyrusPdfDocumentView.m +2370 -0
  39. package/ios/PapyrusPdfDocumentViewManager.m +61 -0
  40. package/ios/PapyrusPdfPageTheme.h +15 -0
  41. package/ios/PapyrusPdfPageTheme.m +218 -0
  42. package/ios/PapyrusSelectionMenu.h +27 -0
  43. package/ios/PapyrusTextAnnotationRange.h +2 -0
  44. package/ios/PapyrusTextAnnotationRange.m +29 -0
  45. package/ios/PapyrusTextDocumentView.h +32 -0
  46. package/ios/PapyrusTextDocumentView.m +518 -0
  47. package/ios/PapyrusTextDocumentViewManager.m +34 -0
  48. package/ios/PapyrusTextStore.h +13 -0
  49. package/ios/PapyrusTextStore.m +73 -0
  50. package/package.json +12 -10
  51. package/react-native.config.js +1 -1
  52. package/third_party_licenses/BLAKE2-NOTICE.txt +11 -0
  53. package/third_party_licenses/libarchive-COPYING +65 -0
  54. package/vendor/libarchive/PapyrusComicArchive.cpp +376 -0
  55. package/vendor/libarchive/PapyrusComicArchive.h +30 -0
  56. package/vendor/libarchive/README.papyrus.md +15 -0
  57. package/vendor/libarchive/android.h +192 -0
  58. package/vendor/libarchive/config/PapyrusArchiveConfig.h +71 -0
  59. package/vendor/libarchive/libarchive/CMakeLists.txt +293 -0
  60. package/vendor/libarchive/libarchive/android_lf.h +36 -0
  61. package/vendor/libarchive/libarchive/archive.h +1266 -0
  62. package/vendor/libarchive/libarchive/archive_acl.c +2025 -0
  63. package/vendor/libarchive/libarchive/archive_acl_private.h +85 -0
  64. package/vendor/libarchive/libarchive/archive_blake2.h +197 -0
  65. package/vendor/libarchive/libarchive/archive_blake2_impl.h +161 -0
  66. package/vendor/libarchive/libarchive/archive_blake2s_ref.c +369 -0
  67. package/vendor/libarchive/libarchive/archive_blake2sp_ref.c +361 -0
  68. package/vendor/libarchive/libarchive/archive_check_magic.c +183 -0
  69. package/vendor/libarchive/libarchive/archive_cmdline.c +211 -0
  70. package/vendor/libarchive/libarchive/archive_cmdline_private.h +45 -0
  71. package/vendor/libarchive/libarchive/archive_crc32.h +123 -0
  72. package/vendor/libarchive/libarchive/archive_cryptor.c +534 -0
  73. package/vendor/libarchive/libarchive/archive_cryptor_private.h +199 -0
  74. package/vendor/libarchive/libarchive/archive_digest.c +1584 -0
  75. package/vendor/libarchive/libarchive/archive_digest_private.h +431 -0
  76. package/vendor/libarchive/libarchive/archive_disk_acl_darwin.c +558 -0
  77. package/vendor/libarchive/libarchive/archive_disk_acl_freebsd.c +712 -0
  78. package/vendor/libarchive/libarchive/archive_disk_acl_linux.c +760 -0
  79. package/vendor/libarchive/libarchive/archive_disk_acl_sunos.c +824 -0
  80. package/vendor/libarchive/libarchive/archive_endian.h +234 -0
  81. package/vendor/libarchive/libarchive/archive_entry.3 +147 -0
  82. package/vendor/libarchive/libarchive/archive_entry.c +2297 -0
  83. package/vendor/libarchive/libarchive/archive_entry.h +763 -0
  84. package/vendor/libarchive/libarchive/archive_entry_acl.3 +458 -0
  85. package/vendor/libarchive/libarchive/archive_entry_copy_bhfi.c +55 -0
  86. package/vendor/libarchive/libarchive/archive_entry_copy_stat.c +82 -0
  87. package/vendor/libarchive/libarchive/archive_entry_link_resolver.c +472 -0
  88. package/vendor/libarchive/libarchive/archive_entry_linkify.3 +224 -0
  89. package/vendor/libarchive/libarchive/archive_entry_locale.h +90 -0
  90. package/vendor/libarchive/libarchive/archive_entry_misc.3 +63 -0
  91. package/vendor/libarchive/libarchive/archive_entry_paths.3 +153 -0
  92. package/vendor/libarchive/libarchive/archive_entry_perms.3 +210 -0
  93. package/vendor/libarchive/libarchive/archive_entry_private.h +205 -0
  94. package/vendor/libarchive/libarchive/archive_entry_sparse.c +156 -0
  95. package/vendor/libarchive/libarchive/archive_entry_stat.3 +274 -0
  96. package/vendor/libarchive/libarchive/archive_entry_stat.c +121 -0
  97. package/vendor/libarchive/libarchive/archive_entry_strmode.c +69 -0
  98. package/vendor/libarchive/libarchive/archive_entry_time.3 +127 -0
  99. package/vendor/libarchive/libarchive/archive_entry_xattr.c +155 -0
  100. package/vendor/libarchive/libarchive/archive_hmac.c +345 -0
  101. package/vendor/libarchive/libarchive/archive_hmac_private.h +119 -0
  102. package/vendor/libarchive/libarchive/archive_integer.h +267 -0
  103. package/vendor/libarchive/libarchive/archive_match.c +1869 -0
  104. package/vendor/libarchive/libarchive/archive_openssl_evp_private.h +54 -0
  105. package/vendor/libarchive/libarchive/archive_openssl_hmac_private.h +54 -0
  106. package/vendor/libarchive/libarchive/archive_options.c +219 -0
  107. package/vendor/libarchive/libarchive/archive_options_private.h +49 -0
  108. package/vendor/libarchive/libarchive/archive_pack_dev.c +330 -0
  109. package/vendor/libarchive/libarchive/archive_pack_dev.h +49 -0
  110. package/vendor/libarchive/libarchive/archive_parse_date.c +1173 -0
  111. package/vendor/libarchive/libarchive/archive_pathmatch.c +480 -0
  112. package/vendor/libarchive/libarchive/archive_pathmatch.h +50 -0
  113. package/vendor/libarchive/libarchive/archive_platform.h +213 -0
  114. package/vendor/libarchive/libarchive/archive_platform_acl.h +53 -0
  115. package/vendor/libarchive/libarchive/archive_platform_stat.h +45 -0
  116. package/vendor/libarchive/libarchive/archive_platform_xattr.h +45 -0
  117. package/vendor/libarchive/libarchive/archive_ppmd7.c +1173 -0
  118. package/vendor/libarchive/libarchive/archive_ppmd7_private.h +119 -0
  119. package/vendor/libarchive/libarchive/archive_ppmd8.c +1293 -0
  120. package/vendor/libarchive/libarchive/archive_ppmd8_private.h +123 -0
  121. package/vendor/libarchive/libarchive/archive_ppmd_private.h +159 -0
  122. package/vendor/libarchive/libarchive/archive_private.h +209 -0
  123. package/vendor/libarchive/libarchive/archive_random.c +274 -0
  124. package/vendor/libarchive/libarchive/archive_random_private.h +36 -0
  125. package/vendor/libarchive/libarchive/archive_rb.c +709 -0
  126. package/vendor/libarchive/libarchive/archive_rb.h +113 -0
  127. package/vendor/libarchive/libarchive/archive_read.3 +250 -0
  128. package/vendor/libarchive/libarchive/archive_read.c +1814 -0
  129. package/vendor/libarchive/libarchive/archive_read_add_passphrase.3 +72 -0
  130. package/vendor/libarchive/libarchive/archive_read_add_passphrase.c +189 -0
  131. package/vendor/libarchive/libarchive/archive_read_append_filter.c +209 -0
  132. package/vendor/libarchive/libarchive/archive_read_data.3 +128 -0
  133. package/vendor/libarchive/libarchive/archive_read_data_into_fd.c +207 -0
  134. package/vendor/libarchive/libarchive/archive_read_disk.3 +422 -0
  135. package/vendor/libarchive/libarchive/archive_read_disk_entry_from_file.c +1086 -0
  136. package/vendor/libarchive/libarchive/archive_read_disk_posix.c +2639 -0
  137. package/vendor/libarchive/libarchive/archive_read_disk_private.h +97 -0
  138. package/vendor/libarchive/libarchive/archive_read_disk_set_standard_lookup.c +315 -0
  139. package/vendor/libarchive/libarchive/archive_read_disk_windows.c +2603 -0
  140. package/vendor/libarchive/libarchive/archive_read_extract.3 +135 -0
  141. package/vendor/libarchive/libarchive/archive_read_extract.c +59 -0
  142. package/vendor/libarchive/libarchive/archive_read_extract2.c +154 -0
  143. package/vendor/libarchive/libarchive/archive_read_filter.3 +163 -0
  144. package/vendor/libarchive/libarchive/archive_read_format.3 +190 -0
  145. package/vendor/libarchive/libarchive/archive_read_free.3 +91 -0
  146. package/vendor/libarchive/libarchive/archive_read_header.3 +89 -0
  147. package/vendor/libarchive/libarchive/archive_read_new.3 +57 -0
  148. package/vendor/libarchive/libarchive/archive_read_open.3 +247 -0
  149. package/vendor/libarchive/libarchive/archive_read_open_fd.c +236 -0
  150. package/vendor/libarchive/libarchive/archive_read_open_file.c +257 -0
  151. package/vendor/libarchive/libarchive/archive_read_open_filename.c +652 -0
  152. package/vendor/libarchive/libarchive/archive_read_open_memory.c +188 -0
  153. package/vendor/libarchive/libarchive/archive_read_private.h +274 -0
  154. package/vendor/libarchive/libarchive/archive_read_set_format.c +116 -0
  155. package/vendor/libarchive/libarchive/archive_read_set_options.3 +290 -0
  156. package/vendor/libarchive/libarchive/archive_read_set_options.c +132 -0
  157. package/vendor/libarchive/libarchive/archive_read_support_filter_all.c +84 -0
  158. package/vendor/libarchive/libarchive/archive_read_support_filter_by_code.c +68 -0
  159. package/vendor/libarchive/libarchive/archive_read_support_filter_bzip2.c +360 -0
  160. package/vendor/libarchive/libarchive/archive_read_support_filter_compress.c +457 -0
  161. package/vendor/libarchive/libarchive/archive_read_support_filter_grzip.c +108 -0
  162. package/vendor/libarchive/libarchive/archive_read_support_filter_gzip.c +538 -0
  163. package/vendor/libarchive/libarchive/archive_read_support_filter_lrzip.c +119 -0
  164. package/vendor/libarchive/libarchive/archive_read_support_filter_lz4.c +829 -0
  165. package/vendor/libarchive/libarchive/archive_read_support_filter_lzop.c +493 -0
  166. package/vendor/libarchive/libarchive/archive_read_support_filter_none.c +51 -0
  167. package/vendor/libarchive/libarchive/archive_read_support_filter_program.c +497 -0
  168. package/vendor/libarchive/libarchive/archive_read_support_filter_rpm.c +249 -0
  169. package/vendor/libarchive/libarchive/archive_read_support_filter_uu.c +739 -0
  170. package/vendor/libarchive/libarchive/archive_read_support_filter_xz.c +792 -0
  171. package/vendor/libarchive/libarchive/archive_read_support_filter_zstd.c +356 -0
  172. package/vendor/libarchive/libarchive/archive_read_support_format_7zip.c +4650 -0
  173. package/vendor/libarchive/libarchive/archive_read_support_format_all.c +88 -0
  174. package/vendor/libarchive/libarchive/archive_read_support_format_ar.c +597 -0
  175. package/vendor/libarchive/libarchive/archive_read_support_format_by_code.c +76 -0
  176. package/vendor/libarchive/libarchive/archive_read_support_format_cab.c +3410 -0
  177. package/vendor/libarchive/libarchive/archive_read_support_format_cpio.c +1152 -0
  178. package/vendor/libarchive/libarchive/archive_read_support_format_empty.c +95 -0
  179. package/vendor/libarchive/libarchive/archive_read_support_format_iso9660.c +3516 -0
  180. package/vendor/libarchive/libarchive/archive_read_support_format_lha.c +2931 -0
  181. package/vendor/libarchive/libarchive/archive_read_support_format_mtree.c +2113 -0
  182. package/vendor/libarchive/libarchive/archive_read_support_format_rar.c +3932 -0
  183. package/vendor/libarchive/libarchive/archive_read_support_format_rar5.c +4501 -0
  184. package/vendor/libarchive/libarchive/archive_read_support_format_raw.c +194 -0
  185. package/vendor/libarchive/libarchive/archive_read_support_format_tar.c +3785 -0
  186. package/vendor/libarchive/libarchive/archive_read_support_format_warc.c +875 -0
  187. package/vendor/libarchive/libarchive/archive_read_support_format_xar.c +3770 -0
  188. package/vendor/libarchive/libarchive/archive_read_support_format_zip.c +4710 -0
  189. package/vendor/libarchive/libarchive/archive_string.c +4391 -0
  190. package/vendor/libarchive/libarchive/archive_string.h +244 -0
  191. package/vendor/libarchive/libarchive/archive_string_composition.h +2289 -0
  192. package/vendor/libarchive/libarchive/archive_string_sprintf.c +200 -0
  193. package/vendor/libarchive/libarchive/archive_time.c +168 -0
  194. package/vendor/libarchive/libarchive/archive_time_private.h +47 -0
  195. package/vendor/libarchive/libarchive/archive_util.3 +239 -0
  196. package/vendor/libarchive/libarchive/archive_util.c +668 -0
  197. package/vendor/libarchive/libarchive/archive_version_details.c +516 -0
  198. package/vendor/libarchive/libarchive/archive_virtual.c +162 -0
  199. package/vendor/libarchive/libarchive/archive_windows.c +1035 -0
  200. package/vendor/libarchive/libarchive/archive_windows.h +332 -0
  201. package/vendor/libarchive/libarchive/archive_write.3 +266 -0
  202. package/vendor/libarchive/libarchive/archive_write.c +896 -0
  203. package/vendor/libarchive/libarchive/archive_write_add_filter.c +71 -0
  204. package/vendor/libarchive/libarchive/archive_write_add_filter_b64encode.c +329 -0
  205. package/vendor/libarchive/libarchive/archive_write_add_filter_by_name.c +76 -0
  206. package/vendor/libarchive/libarchive/archive_write_add_filter_bzip2.c +411 -0
  207. package/vendor/libarchive/libarchive/archive_write_add_filter_compress.c +459 -0
  208. package/vendor/libarchive/libarchive/archive_write_add_filter_grzip.c +143 -0
  209. package/vendor/libarchive/libarchive/archive_write_add_filter_gzip.c +493 -0
  210. package/vendor/libarchive/libarchive/archive_write_add_filter_lrzip.c +214 -0
  211. package/vendor/libarchive/libarchive/archive_write_add_filter_lz4.c +710 -0
  212. package/vendor/libarchive/libarchive/archive_write_add_filter_lzop.c +500 -0
  213. package/vendor/libarchive/libarchive/archive_write_add_filter_none.c +42 -0
  214. package/vendor/libarchive/libarchive/archive_write_add_filter_program.c +398 -0
  215. package/vendor/libarchive/libarchive/archive_write_add_filter_uuencode.c +320 -0
  216. package/vendor/libarchive/libarchive/archive_write_add_filter_xz.c +547 -0
  217. package/vendor/libarchive/libarchive/archive_write_add_filter_zstd.c +608 -0
  218. package/vendor/libarchive/libarchive/archive_write_blocksize.3 +112 -0
  219. package/vendor/libarchive/libarchive/archive_write_data.3 +88 -0
  220. package/vendor/libarchive/libarchive/archive_write_disk.3 +360 -0
  221. package/vendor/libarchive/libarchive/archive_write_disk_posix.c +4789 -0
  222. package/vendor/libarchive/libarchive/archive_write_disk_private.h +43 -0
  223. package/vendor/libarchive/libarchive/archive_write_disk_set_standard_lookup.c +265 -0
  224. package/vendor/libarchive/libarchive/archive_write_disk_windows.c +2952 -0
  225. package/vendor/libarchive/libarchive/archive_write_filter.3 +140 -0
  226. package/vendor/libarchive/libarchive/archive_write_finish_entry.3 +77 -0
  227. package/vendor/libarchive/libarchive/archive_write_format.3 +187 -0
  228. package/vendor/libarchive/libarchive/archive_write_free.3 +94 -0
  229. package/vendor/libarchive/libarchive/archive_write_header.3 +71 -0
  230. package/vendor/libarchive/libarchive/archive_write_new.3 +56 -0
  231. package/vendor/libarchive/libarchive/archive_write_open.3 +270 -0
  232. package/vendor/libarchive/libarchive/archive_write_open_fd.c +141 -0
  233. package/vendor/libarchive/libarchive/archive_write_open_file.c +102 -0
  234. package/vendor/libarchive/libarchive/archive_write_open_filename.c +272 -0
  235. package/vendor/libarchive/libarchive/archive_write_open_memory.c +110 -0
  236. package/vendor/libarchive/libarchive/archive_write_private.h +166 -0
  237. package/vendor/libarchive/libarchive/archive_write_set_format.c +124 -0
  238. package/vendor/libarchive/libarchive/archive_write_set_format_7zip.c +2571 -0
  239. package/vendor/libarchive/libarchive/archive_write_set_format_ar.c +540 -0
  240. package/vendor/libarchive/libarchive/archive_write_set_format_by_name.c +93 -0
  241. package/vendor/libarchive/libarchive/archive_write_set_format_cpio.c +11 -0
  242. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_binary.c +618 -0
  243. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_newc.c +457 -0
  244. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_odc.c +508 -0
  245. package/vendor/libarchive/libarchive/archive_write_set_format_filter_by_ext.c +141 -0
  246. package/vendor/libarchive/libarchive/archive_write_set_format_gnutar.c +790 -0
  247. package/vendor/libarchive/libarchive/archive_write_set_format_iso9660.c +8216 -0
  248. package/vendor/libarchive/libarchive/archive_write_set_format_mtree.c +2307 -0
  249. package/vendor/libarchive/libarchive/archive_write_set_format_pax.c +2249 -0
  250. package/vendor/libarchive/libarchive/archive_write_set_format_private.h +40 -0
  251. package/vendor/libarchive/libarchive/archive_write_set_format_raw.c +123 -0
  252. package/vendor/libarchive/libarchive/archive_write_set_format_shar.c +650 -0
  253. package/vendor/libarchive/libarchive/archive_write_set_format_ustar.c +768 -0
  254. package/vendor/libarchive/libarchive/archive_write_set_format_v7tar.c +648 -0
  255. package/vendor/libarchive/libarchive/archive_write_set_format_warc.c +491 -0
  256. package/vendor/libarchive/libarchive/archive_write_set_format_xar.c +3799 -0
  257. package/vendor/libarchive/libarchive/archive_write_set_format_zip.c +2548 -0
  258. package/vendor/libarchive/libarchive/archive_write_set_options.3 +779 -0
  259. package/vendor/libarchive/libarchive/archive_write_set_options.c +129 -0
  260. package/vendor/libarchive/libarchive/archive_write_set_passphrase.3 +72 -0
  261. package/vendor/libarchive/libarchive/archive_write_set_passphrase.c +95 -0
  262. package/vendor/libarchive/libarchive/archive_xxhash.h +48 -0
  263. package/vendor/libarchive/libarchive/config_freebsd.h +275 -0
  264. package/vendor/libarchive/libarchive/cpio.5 +389 -0
  265. package/vendor/libarchive/libarchive/filter_fork.h +44 -0
  266. package/vendor/libarchive/libarchive/filter_fork_posix.c +269 -0
  267. package/vendor/libarchive/libarchive/filter_fork_windows.c +270 -0
  268. package/vendor/libarchive/libarchive/libarchive-formats.5 +478 -0
  269. package/vendor/libarchive/libarchive/libarchive.3 +297 -0
  270. package/vendor/libarchive/libarchive/libarchive_changes.3 +339 -0
  271. package/vendor/libarchive/libarchive/libarchive_internals.3 +363 -0
  272. package/vendor/libarchive/libarchive/module.modulemap +34 -0
  273. package/vendor/libarchive/libarchive/mtree.5 +323 -0
  274. package/vendor/libarchive/libarchive/tar.5 +947 -0
  275. package/vendor/libarchive/libarchive/xxhash.c +531 -0
  276. package/ios/PapyrusNativeEngine.podspec +0 -15
@@ -0,0 +1,779 @@
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
+ .Dd January 31, 2020
26
+ .Dt ARCHIVE_WRITE_OPTIONS 3
27
+ .Os
28
+ .Sh NAME
29
+ .Nm archive_write_set_filter_option ,
30
+ .Nm archive_write_set_format_option ,
31
+ .Nm archive_write_set_option ,
32
+ .Nm archive_write_set_options
33
+ .Nd functions controlling options for writing archives
34
+ .Sh LIBRARY
35
+ Streaming Archive Library (libarchive, -larchive)
36
+ .Sh SYNOPSIS
37
+ .Ft int
38
+ .Fo archive_write_set_filter_option
39
+ .Fa "struct archive *"
40
+ .Fa "const char *module"
41
+ .Fa "const char *option"
42
+ .Fa "const char *value"
43
+ .Fc
44
+ .Ft int
45
+ .Fo archive_write_set_format_option
46
+ .Fa "struct archive *"
47
+ .Fa "const char *module"
48
+ .Fa "const char *option"
49
+ .Fa "const char *value"
50
+ .Fc
51
+ .Ft int
52
+ .Fo archive_write_set_option
53
+ .Fa "struct archive *"
54
+ .Fa "const char *module"
55
+ .Fa "const char *option"
56
+ .Fa "const char *value"
57
+ .Fc
58
+ .Ft int
59
+ .Fo archive_write_set_options
60
+ .Fa "struct archive *"
61
+ .Fa "const char *options"
62
+ .Fc
63
+ .Sh DESCRIPTION
64
+ These functions provide a way for libarchive clients to configure
65
+ specific write modules.
66
+ .Bl -tag -width indent
67
+ .It Xo
68
+ .Fn archive_write_set_filter_option ,
69
+ .Fn archive_write_set_format_option
70
+ .Xc
71
+ Specifies an option that will be passed to the currently-registered
72
+ filters (including decompression filters) or format readers.
73
+ .Pp
74
+ If
75
+ .Ar option
76
+ and
77
+ .Ar value
78
+ are both
79
+ .Dv NULL ,
80
+ these functions will do nothing and
81
+ .Cm ARCHIVE_OK
82
+ will be returned.
83
+ If
84
+ .Ar option
85
+ is
86
+ .Dv NULL
87
+ but
88
+ .Ar value
89
+ is not, these functions will do nothing and
90
+ .Cm ARCHIVE_FAILED
91
+ will be returned.
92
+ .Pp
93
+ If
94
+ .Ar module
95
+ is not
96
+ .Dv NULL ,
97
+ .Ar option
98
+ and
99
+ .Ar value
100
+ will be provided to the filter or reader named
101
+ .Ar module .
102
+ The return value will be either
103
+ .Cm ARCHIVE_OK
104
+ if the option was successfully handled or
105
+ .Cm ARCHIVE_WARN
106
+ if the option was unrecognized by the module or could otherwise
107
+ not be handled.
108
+ If there is no such module,
109
+ .Cm ARCHIVE_FAILED
110
+ will be returned.
111
+ .Pp
112
+ If
113
+ .Ar module
114
+ is
115
+ .Dv NULL ,
116
+ .Ar option
117
+ and
118
+ .Ar value
119
+ will be provided to every registered module.
120
+ If any module returns
121
+ .Cm ARCHIVE_FATAL ,
122
+ this value will be returned immediately.
123
+ Otherwise,
124
+ .Cm ARCHIVE_OK
125
+ will be returned if any module accepts the option, and
126
+ .Cm ARCHIVE_FAILED
127
+ in all other cases.
128
+ .\"
129
+ .It Fn archive_write_set_option
130
+ Calls
131
+ .Fn archive_write_set_format_option ,
132
+ then
133
+ .Fn archive_write_set_filter_option .
134
+ If either function returns
135
+ .Cm ARCHIVE_FATAL ,
136
+ .Cm ARCHIVE_FATAL
137
+ will be returned
138
+ immediately.
139
+ Otherwise, the greater of the two values will be returned.
140
+ .\"
141
+ .It Fn archive_write_set_options
142
+ .Ar options
143
+ is a comma-separated list of options.
144
+ If
145
+ .Ar options
146
+ is
147
+ .Dv NULL
148
+ or empty,
149
+ .Cm ARCHIVE_OK
150
+ will be returned immediately.
151
+ .Pp
152
+ Individual options have one of the following forms:
153
+ .Bl -tag -compact -width indent
154
+ .It Ar option=value
155
+ The option/value pair will be provided to every module.
156
+ Modules that do not accept an option with this name will ignore it.
157
+ .It Ar option
158
+ The option will be provided to every module with a value of
159
+ .Dq 1 .
160
+ .It Ar !option
161
+ The option will be provided to every module with a NULL value.
162
+ .It Ar module:option=value , Ar module:option , Ar module:!option
163
+ As above, but the corresponding option and value will be provided
164
+ only to modules whose name matches
165
+ .Ar module .
166
+ .El
167
+ .El
168
+ .\"
169
+ .Sh OPTIONS
170
+ .Bl -tag -compact -width indent
171
+ .It Filter b64encode
172
+ .Bl -tag -compact -width indent
173
+ .It Cm mode
174
+ The value is interpreted as octal digits specifying the file mode.
175
+ .It Cm name
176
+ The value specifies the file name.
177
+ .El
178
+ .It Filter bzip2
179
+ .Bl -tag -compact -width indent
180
+ .It Cm compression-level
181
+ The value is interpreted as a decimal integer specifying the
182
+ bzip2 compression level. Supported values are from 1 to 9.
183
+ .El
184
+ .It Filter gzip
185
+ .Bl -tag -compact -width indent
186
+ .It Cm compression-level
187
+ The value is interpreted as a decimal integer specifying the
188
+ gzip compression level. Supported values are from 0 to 9.
189
+ .It Cm timestamp
190
+ Store timestamp. This is enabled by default.
191
+ .El
192
+ .It Filter lrzip
193
+ .Bl -tag -compact -width indent
194
+ .It Cm compression Ns = Ns Ar type
195
+ Use
196
+ .Ar type
197
+ as compression method.
198
+ Supported values are
199
+ .Dq bzip2 ,
200
+ .Dq gzipi ,
201
+ .Dq lzo
202
+ .Pq ultra fast ,
203
+ and
204
+ .Dq zpaq
205
+ .Pq best, extremely slow .
206
+ .It Cm compression-level
207
+ The value is interpreted as a decimal integer specifying the
208
+ lrzip compression level. Supported values are from 1 to 9.
209
+ .El
210
+ .It Filter lz4
211
+ .Bl -tag -compact -width indent
212
+ .It Cm compression-level
213
+ The value is interpreted as a decimal integer specifying the
214
+ lz4 compression level. Supported values are from 0 to 9.
215
+ .It Cm stream-checksum
216
+ Enable stream checksum. This is enabled by default.
217
+ .It Cm block-checksum
218
+ Enable block checksum. This is disabled by default.
219
+ .It Cm block-size
220
+ The value is interpreted as a decimal integer specifying the
221
+ lz4 compression block size. Supported values are from 4 to 7
222
+ .Pq default .
223
+ .It Cm block-dependence
224
+ Use the previous block of the block being compressed for
225
+ a compression dictionary to improve compression ratio.
226
+ This is disabled by default.
227
+ .El
228
+ .It Filter lzop
229
+ .Bl -tag -compact -width indent
230
+ .It Cm compression-level
231
+ The value is interpreted as a decimal integer specifying the
232
+ lzop compression level. Supported values are from 1 to 9.
233
+ .El
234
+ .It Filter uuencode
235
+ .Bl -tag -compact -width indent
236
+ .It Cm mode
237
+ The value is interpreted as octal digits specifying the file mode.
238
+ .It Cm name
239
+ The value specifies the file name.
240
+ .El
241
+ .It Filter xz
242
+ .Bl -tag -compact -width indent
243
+ .It Cm compression-level
244
+ The value is interpreted as a decimal integer specifying the
245
+ compression level. Supported values are from 0 to 9.
246
+ .It Cm threads
247
+ The value is interpreted as a decimal integer specifying the
248
+ number of threads for multi-threaded lzma compression.
249
+ If supported, the default value is read from
250
+ .Fn lzma_cputhreads .
251
+ .El
252
+ .It Filter zstd
253
+ .Bl -tag -compact -width indent
254
+ .It Cm compression-level
255
+ The value is interpreted as a decimal integer specifying the
256
+ compression level. Supported values depend on the library version,
257
+ common values are from 1 to 22.
258
+ .It Cm long
259
+ Enables long distance matching. The value is interpreted as a
260
+ decimal integer specifying log2 window size in bytes. Values from
261
+ 10 to 30 for 32 bit, or 31 for 64 bit, are supported.
262
+ .It Cm threads
263
+ The value is interpreted as a decimal integer specifying the
264
+ number of threads for multi-threaded zstd compression.
265
+ If set to 0, zstd will attempt to detect and use the number
266
+ of active physical CPU cores.
267
+ .El
268
+ .It Format 7zip
269
+ .Bl -tag -compact -width indent
270
+ .It Cm compression
271
+ The value is one of
272
+ .Dq store ,
273
+ .Dq copy ,
274
+ .Dq deflate ,
275
+ .Dq bzip2 ,
276
+ .Dq lzma1 ,
277
+ .Dq lzma2 ,
278
+ .Dq ppmd ,
279
+ or
280
+ .Dq zstd
281
+ to indicate how the following entries should be compressed.
282
+ The values
283
+ .Dq store
284
+ and
285
+ .Dq copy
286
+ are synonyms.
287
+ Note that this setting is ignored for directories, symbolic links,
288
+ and other special entries.
289
+ .It Cm compression-level
290
+ The value is interpreted as a decimal integer specifying the
291
+ compression level.
292
+ Values between 0 and 9 are supported, with the exception of bzip2
293
+ which only supports values between 1 and 9, and zstd which may
294
+ support negative values depending on the library version and
295
+ commonly used values 1 through 22.
296
+ The interpretation of the compression level depends on the chosen
297
+ compression method.
298
+ .It Cm threads
299
+ The value is interpreted as a decimal integer specifying the
300
+ number of threads for multi-threaded compression (for compressors
301
+ like zstd that support it). If set to 0, an attempt will be made
302
+ to discover the number of CPU cores.
303
+ .El
304
+ .It Format bin
305
+ .Bl -tag -compact -width indent
306
+ .It Cm hdrcharset
307
+ The value is used as a character set name that will be
308
+ used when translating file names.
309
+ .El
310
+ .It Format gnutar
311
+ .Bl -tag -compact -width indent
312
+ .It Cm hdrcharset
313
+ The value is used as a character set name that will be
314
+ used when translating file, group and user names.
315
+ .El
316
+ .It Format iso9660 - volume metadata
317
+ These options are used to set standard ISO9660 metadata.
318
+ .Bl -tag -compact -width indent
319
+ .It Cm abstract-file Ns = Ns Ar filename
320
+ The file with the specified name will be identified in the ISO9660 metadata
321
+ as holding the abstract for this volume.
322
+ Default: none.
323
+ .It Cm application-id Ns = Ns Ar filename
324
+ The file with the specified name will be identified in the ISO9660 metadata
325
+ as holding the application identifier for this volume.
326
+ Default: none.
327
+ .It Cm biblio-file Ns = Ns Ar filename
328
+ The file with the specified name will be identified in the ISO9660 metadata
329
+ as holding the bibliography for this volume.
330
+ Default: none.
331
+ .It Cm copyright-file Ns = Ns Ar filename
332
+ The file with the specified name will be identified in the ISO9660 metadata
333
+ as holding the copyright for this volume.
334
+ Default: none.
335
+ .It Cm publisher Ns = Ns Ar filename
336
+ The file with the specified name will be identified in the ISO9660 metadata
337
+ as holding the publisher information for this volume.
338
+ Default: none.
339
+ .It Cm volume-id Ns = Ns Ar string
340
+ The specified string will be used as the Volume Identifier in the ISO9660 metadata.
341
+ It is limited to 32 bytes.
342
+ Default: none.
343
+ .El
344
+ .It Format iso9660 - boot support
345
+ These options are used to make an ISO9660 image that can be directly
346
+ booted on various systems.
347
+ .Bl -tag -compact -width indent
348
+ .It Cm boot Ns = Ns Ar filename
349
+ The file matching this name will be used as the El Torito boot image file.
350
+ .It Cm boot-catalog Ns = Ns Ar name
351
+ The name that will be used for the El Torito boot catalog.
352
+ Default:
353
+ .Ar boot.catalog
354
+ .It Cm boot-info-table
355
+ The boot image file provided by the
356
+ .Cm boot Ns = Ns Ar filename
357
+ option will be edited with appropriate boot information in bytes 8 through 64.
358
+ Default: disabled
359
+ .It Cm boot-load-seg Ns = Ns Ar hexadecimal-number
360
+ The load segment for a no-emulation boot image.
361
+ .It Cm boot-load-size Ns = Ns Ar decimal-number
362
+ The number of "virtual" 512-byte sectors to be loaded from a no-emulation boot image.
363
+ Some very old BIOSes can only load very small images, setting this
364
+ value to 4 will often allow such BIOSes to load the first part of
365
+ the boot image (which will then need to be intelligent enough to
366
+ load the rest of itself).
367
+ This should not be needed unless you are trying to support systems with very old BIOSes.
368
+ This defaults to the full size of the image.
369
+ .It Cm boot-type Ns = Ns Ar value
370
+ Specifies the boot semantics used by the El Torito boot image:
371
+ If the
372
+ .Ar value
373
+ is
374
+ .Cm fd ,
375
+ then the boot image is assumed to be a bootable floppy image.
376
+ If the
377
+ .Ar value
378
+ is
379
+ .Cm hd ,
380
+ then the boot image is assumed to be a bootable hard disk image.
381
+ If the
382
+ .Ar value
383
+ is
384
+ .Cm no-emulation ,
385
+ the boot image is used without floppy or hard disk emulation.
386
+ If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then
387
+ the default is
388
+ .Cm fd ,
389
+ otherwise the default is
390
+ .Cm no-emulation .
391
+ .El
392
+ .It Format iso9660 - filename and size extensions
393
+ Various extensions to the base ISO9660 format.
394
+ .Bl -tag -compact -width indent
395
+ .It Cm allow-ldots
396
+ If enabled, allows filenames to begin with a leading period.
397
+ If disabled, filenames that begin with a leading period will have
398
+ that period replaced by an underscore character in the standard ISO9660
399
+ namespace.
400
+ This does not impact names stored in the Rockridge or Joliet extension area.
401
+ Default: disabled.
402
+ .It Cm allow-lowercase
403
+ If enabled, allows filenames to contain lowercase characters.
404
+ If disabled, filenames will be forced to uppercase.
405
+ This does not impact names stored in the Rockridge or Joliet extension area.
406
+ Default: disabled.
407
+ .It Cm allow-multidot
408
+ If enabled, allows filenames to contain multiple period characters, in violation of the ISO9660 specification.
409
+ If disabled, additional periods will be converted to underscore characters.
410
+ This does not impact names stored in the Rockridge or Joliet extension area.
411
+ Default: disabled.
412
+ .It Cm allow-period
413
+ If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification.
414
+ If disabled, trailing periods will be converted to underscore characters.
415
+ This does not impact names stored in the Rockridge or Joliet extension area.
416
+ Default: disabled.
417
+ .It Cm allow-pvd-lowercase
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.
420
+ Default: disabled.
421
+ .It Cm allow-sharp-tilde
422
+ If enabled, sharp and tilde characters will be permitted in filenames, in violation if the ISO9660 specification.
423
+ If disabled, such characters will be converted to underscore characters.
424
+ Default: disabled.
425
+ .It Cm allow-vernum
426
+ If enabled, version numbers will be included with files.
427
+ If disabled, version numbers will be suppressed, in violation of the ISO9660 standard.
428
+ This does not impact names stored in the Rockridge or Joliet extension area.
429
+ Default: enabled.
430
+ .It Cm iso-level
431
+ This enables support for file size and file name extensions in the
432
+ core ISO9660 area.
433
+ The name extensions specified here do not affect the names stored in the Rockridge or Joliet extension areas.
434
+ .Bl -tag -compact -width indent
435
+ .It Cm iso-level=1
436
+ The most compliant form of ISO9660 image.
437
+ Filenames are limited to 8.3 uppercase format,
438
+ directory names are limited to 8 uppercase characters,
439
+ files are limited to 4 GiB,
440
+ the complete ISO9660 image cannot exceed 4 GiB.
441
+ .It Cm iso-level=2
442
+ Filenames are limited to 30 uppercase characters with a 30-character extension,
443
+ directory names are limited to 30 characters,
444
+ files are limited to 4 GiB.
445
+ .It Cm iso-level=3
446
+ As with
447
+ .Cm iso-level=2 ,
448
+ except that files may exceed 4 GiB.
449
+ .It Cm iso-level=4
450
+ As with
451
+ .Cm iso-level=3 ,
452
+ except that filenames may be up to 193 characters
453
+ and may include arbitrary 8-bit characters.
454
+ .El
455
+ .It Cm joliet
456
+ Microsoft's Joliet extensions store a completely separate set of directory information about each file.
457
+ In particular, this information includes Unicode filenames of up to 255 characters.
458
+ Default: enabled.
459
+ .It Cm limit-depth
460
+ If enabled, libarchive will use directory relocation records to ensure that
461
+ no pathname exceeds the ISO9660 limit of 8 directory levels.
462
+ If disabled, no relocation will occur.
463
+ Default: enabled.
464
+ .It Cm limit-dirs
465
+ If enabled, libarchive will cause an error if there are more than
466
+ 65536 directories.
467
+ If disabled, there is no limit on the number of directories.
468
+ Default: enabled
469
+ .It Cm pad
470
+ If enabled, 300 kiB of zero bytes will be appended to the end of the archive.
471
+ Default: enabled
472
+ .It Cm relaxed-filenames
473
+ If enabled, all 7-bit ASCII characters are permitted in filenames
474
+ (except lowercase characters unless
475
+ .Cm allow-lowercase
476
+ is also specified).
477
+ This violates ISO9660 standards.
478
+ This does not impact names stored in the Rockridge or Joliet extension area.
479
+ Default: disabled.
480
+ .It Cm rockridge
481
+ The Rockridge extensions store an additional set of POSIX-style file
482
+ information with each file, including mtime, atime, ctime, permissions,
483
+ and long filenames with arbitrary 8-bit characters.
484
+ These extensions also support symbolic links and other POSIX file types.
485
+ Default: enabled.
486
+ .El
487
+ .It Format iso9660 - zisofs support
488
+ The zisofs extensions permit each file to be independently compressed
489
+ using a gzip-compatible compression.
490
+ This can provide significant size savings, but requires the reading
491
+ system to have support for these extensions.
492
+ These extensions are disabled by default.
493
+ .Bl -tag -compact -width indent
494
+ .It Cm compression-level Ns = Ns number
495
+ The compression level used by the deflate compressor.
496
+ Ranges from 0 (least effort) to 9 (most effort).
497
+ Default: 6
498
+ .It Cm zisofs
499
+ Synonym for
500
+ .Cm zisofs=direct .
501
+ .It Cm zisofs=direct
502
+ Compress each file in the archive.
503
+ Unlike
504
+ .Cm zisofs=indirect ,
505
+ this is handled entirely within libarchive and does not require a
506
+ separate utility.
507
+ For best results, libarchive tests each file and will store
508
+ the file uncompressed if the compression does not actually save any space.
509
+ In particular, files under 2k will never be compressed.
510
+ Note that boot image files are never compressed.
511
+ .It Cm zisofs=indirect
512
+ Recognizes files that have already been compressed with the
513
+ .Cm mkzftree
514
+ utility and sets up the necessary file metadata so that
515
+ readers will correctly identify these as zisofs-compressed files.
516
+ .It Cm zisofs-exclude Ns = Ns Ar filename
517
+ Specifies a filename that should not be compressed when using
518
+ .Cm zisofs=direct .
519
+ This option can be provided multiple times to suppress compression
520
+ on many files.
521
+ .El
522
+ .It Format mtree
523
+ .Bl -tag -compact -width indent
524
+ .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
525
+ Enable a particular keyword in the mtree output.
526
+ Prefix with an exclamation mark to disable the corresponding keyword.
527
+ The default is equivalent to
528
+ .Dq device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname .
529
+ .It Cm all
530
+ Enables all of the above keywords.
531
+ .It Cm use-set
532
+ Enables generation of
533
+ .Cm /set
534
+ lines that specify default values for the following files and/or directories.
535
+ .It Cm indent
536
+ XXX needs explanation XXX
537
+ .El
538
+ .It Format newc
539
+ .Bl -tag -compact -width indent
540
+ .It Cm hdrcharset
541
+ The value is used as a character set name that will be
542
+ used when translating file names.
543
+ .El
544
+ .It Format odc
545
+ .Bl -tag -compact -width indent
546
+ .It Cm hdrcharset
547
+ The value is used as a character set name that will be
548
+ used when translating file names.
549
+ .El
550
+ .It Format pwb
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 names.
555
+ .El
556
+ .It Format pax
557
+ .Bl -tag -compact -width indent
558
+ .It Cm align
559
+ Pad the extended header of each regular file so that the file data that
560
+ follows begins on a multiple of the given number of bytes within the
561
+ uncompressed archive stream.
562
+ The value must be a power of two and a multiple of 512.
563
+ Because the alignment is applied to the uncompressed stream, it is
564
+ independent of any compression filter: the decompressed archive is
565
+ aligned regardless of whether the archive is compressed.
566
+ This allows tools to share file contents out of an
567
+ uncompressed archive (or an uncompressed copy of one) using
568
+ reflinks or
569
+ .Xr copy_file_range 2 ,
570
+ at the cost of some extra padding.
571
+ Files shorter than the alignment are not padded.
572
+ .It Cm hdrcharset
573
+ The value is used as a character set name that will be
574
+ used when translating file, group and user names.
575
+ The value is one of
576
+ .Dq BINARY
577
+ or
578
+ .Dq UTF-8 .
579
+ With
580
+ .Dq BINARY
581
+ there is no character conversion, with
582
+ .Dq UTF-8
583
+ names are converted to UTF-8.
584
+ .It Cm xattrheader
585
+ When storing extended attributes, this option configures which
586
+ headers should be written. The value is one of
587
+ .Dq all ,
588
+ .Dq LIBARCHIVE ,
589
+ or
590
+ .Dq SCHILY .
591
+ By default, both
592
+ .Dq LIBARCHIVE.xattr
593
+ and
594
+ .Dq SCHILY.xattr
595
+ headers are written.
596
+ .El
597
+ .It Format ustar
598
+ .Bl -tag -compact -width indent
599
+ .It Cm hdrcharset
600
+ The value is used as a character set name that will be
601
+ used when translating file, group and user names.
602
+ .El
603
+ .It Format v7tar
604
+ .Bl -tag -compact -width indent
605
+ .It Cm hdrcharset
606
+ The value is used as a character set name that will be
607
+ used when translating file, group and user names.
608
+ .El
609
+ .It Format warc
610
+ .Bl -tag -compact -width indent
611
+ .It Cm omit-warcinfo
612
+ Set to
613
+ .Dq true
614
+ to disable output of the warcinfo record.
615
+ .El
616
+ .It Format xar
617
+ .Bl -tag -compact -width indent
618
+ .It Cm checksum Ns = Ns Ar type
619
+ Use
620
+ .Ar type
621
+ as file checksum method.
622
+ Supported values are
623
+ .Dq none ,
624
+ .Dq md5 ,
625
+ .Dq sha1
626
+ .Pq default ,
627
+ .Dq sha256 ,
628
+ and
629
+ .Dq sha512 .
630
+ .It Cm compression Ns = Ns Ar type
631
+ Use
632
+ .Ar type
633
+ as compression method.
634
+ Supported values are
635
+ .Dq none ,
636
+ .Dq bzip2 ,
637
+ .Dq gzip
638
+ .Pq default ,
639
+ .Dq lzma
640
+ and
641
+ .Dq xz .
642
+ .It Cm compression_level
643
+ The value is a decimal integer from 1 to 9 specifying the compression level.
644
+ .It Cm toc-checksum Ns = Ns Ar type
645
+ Use
646
+ .Ar type
647
+ as table of contents checksum method.
648
+ Supported values are
649
+ .Dq none ,
650
+ .Dq md5 ,
651
+ .Dq sha1
652
+ .Pq default ,
653
+ .Dq sha256 ,
654
+ and
655
+ .Dq sha512 .
656
+ .El
657
+ .It Format zip
658
+ .Bl -tag -compact -width indent
659
+ .It Cm compression
660
+ The value is either
661
+ .Dq store ,
662
+ .Dq deflate ,
663
+ .Dq bzip2 ,
664
+ .Dq lzma ,
665
+ .Dq xz ,
666
+ or
667
+ .Dq zstd
668
+ to indicate how the following entries should be compressed.
669
+ Note that this setting is ignored for directories, symbolic links,
670
+ and other special entries.
671
+ .It Cm compression-level
672
+ The value is interpreted as a decimal integer specifying the
673
+ compression level.
674
+ Values between 0 and 9 are supported.
675
+ A compression level of 0 switches the compression method to
676
+ .Dq store ,
677
+ other values will enable
678
+ .Dq deflate ,
679
+ .Dq bzip2 ,
680
+ .Dq lzma ,
681
+ or
682
+ .Dq zstd
683
+ compression (in order of priority, depending on what libraries
684
+ are linked) with the given level.
685
+ .It Cm threads
686
+ The value is interpreted as a decimal integer specifying the
687
+ number of threads to use for compression.
688
+ It is supported only for
689
+ .Dq xz
690
+ or
691
+ .Dq zstd
692
+ compression and ignored for any other.
693
+ A threads value of 0 is a special one requesting to detect and use as
694
+ many threads as the number of active physical CPU cores.
695
+ .It Cm encryption
696
+ Enable encryption using traditional zip encryption.
697
+ .It Cm encryption Ns = Ns Ar type
698
+ Use
699
+ .Ar type
700
+ as encryption type.
701
+ Supported values are
702
+ .Dq zipcrypt
703
+ .Pq traditional zip encryption ,
704
+ .Dq aes128
705
+ .Pq WinZip AES-128 encryption
706
+ and
707
+ .Dq aes256
708
+ .Pq WinZip AES-256 encryption .
709
+ .It Cm experimental
710
+ This boolean option enables or disables experimental Zip features
711
+ that may not be compatible with other Zip implementations.
712
+ .It Cm fakecrc32
713
+ This boolean option disables CRC calculations.
714
+ All CRC fields are set to zero.
715
+ It should not be used except for testing purposes.
716
+ .It Cm hdrcharset
717
+ The value is used as a character set name that will be
718
+ used when translating file names.
719
+ .It Cm zip64
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.
728
+ .Pp
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.
732
+ .Pp
733
+ Disabling this option with
734
+ .Cm !zip64
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.
741
+ .El
742
+ .El
743
+ .Sh EXAMPLES
744
+ The following example creates an archive write handle to
745
+ create a gzip-compressed ISO9660 format image.
746
+ The two options here specify that the ISO9660 archive will use
747
+ .Ar kernel.img
748
+ as the boot image for El Torito booting, and that the gzip
749
+ compressor should use the maximum compression level.
750
+ .Bd -literal -offset indent
751
+ a = archive_write_new();
752
+ archive_write_add_filter_gzip(a);
753
+ archive_write_set_format_iso9660(a);
754
+ archive_write_set_options(a, "boot=kernel.img,compression=9");
755
+ archive_write_open_filename(a, filename, blocksize);
756
+ .Ed
757
+ .\"
758
+ .Sh ERRORS
759
+ More detailed error codes and textual descriptions are available from the
760
+ .Fn archive_errno
761
+ and
762
+ .Fn archive_error_string
763
+ functions.
764
+ .\"
765
+ .Sh SEE ALSO
766
+ .Xr tar 1 ,
767
+ .Xr archive_read_set_options 3 ,
768
+ .Xr archive_write 3 ,
769
+ .Xr libarchive 3
770
+ .Sh HISTORY
771
+ The
772
+ .Nm libarchive
773
+ library first appeared in
774
+ .Fx 5.3 .
775
+ .Sh AUTHORS
776
+ .An -nosplit
777
+ The options support for libarchive was originally implemented by
778
+ .An Michihiro NAKAJIMA .
779
+ .Sh BUGS