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

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 (274) hide show
  1. package/android/build.gradle +0 -1
  2. package/android/src/main/cpp/CMakeLists.txt +0 -137
  3. package/android/src/main/java/com/papyrus/engine/PapyrusNativeEngineModule.java +35 -305
  4. package/android/src/main/java/com/papyrus/engine/PapyrusPackage.java +1 -3
  5. package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerView.java +5 -195
  6. package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerViewManager.java +1 -20
  7. package/dist/index.d.mts +4 -608
  8. package/dist/index.d.ts +4 -608
  9. package/dist/index.js +8 -463
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +7 -456
  12. package/dist/index.mjs.map +1 -1
  13. package/ios/PapyrusEngineStore.h +0 -3
  14. package/ios/PapyrusEngineStore.m +6 -32
  15. package/ios/PapyrusNativeEngine.m +5 -684
  16. package/ios/PapyrusNativeEngine.podspec +15 -0
  17. package/ios/PapyrusPageView.m +11 -38
  18. package/package.json +4 -6
  19. package/react-native.config.js +1 -1
  20. package/PapyrusNativeEngine.podspec +0 -45
  21. package/android/src/main/cpp/PapyrusComicArchiveJni.cpp +0 -68
  22. package/android/src/main/cpp/PapyrusComicArchiveTest.cpp +0 -55
  23. package/android/src/main/java/com/papyrus/engine/PapyrusComicArchiveNative.java +0 -14
  24. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentView.java +0 -491
  25. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentViewManager.java +0 -32
  26. package/android/src/main/java/com/papyrus/engine/PapyrusComicPageLayout.java +0 -38
  27. package/android/src/main/java/com/papyrus/engine/PapyrusNativeTextModel.java +0 -195
  28. package/android/src/main/java/com/papyrus/engine/PapyrusSelectionMenuIcon.java +0 -48
  29. package/android/src/main/java/com/papyrus/engine/PapyrusTextAnnotationModel.java +0 -22
  30. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentView.java +0 -661
  31. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentViewManager.java +0 -49
  32. package/android/src/main/java/com/papyrus/engine/PapyrusTextStore.java +0 -43
  33. package/ios/PapyrusComicDocumentView.h +0 -21
  34. package/ios/PapyrusComicDocumentView.m +0 -547
  35. package/ios/PapyrusComicDocumentViewManager.m +0 -23
  36. package/ios/PapyrusPageRotationRegistry.h +0 -29
  37. package/ios/PapyrusPageRotationRegistry.m +0 -179
  38. package/ios/PapyrusPdfDocumentView.h +0 -55
  39. package/ios/PapyrusPdfDocumentView.m +0 -2338
  40. package/ios/PapyrusPdfDocumentViewManager.m +0 -61
  41. package/ios/PapyrusPdfPageTheme.h +0 -15
  42. package/ios/PapyrusPdfPageTheme.m +0 -218
  43. package/ios/PapyrusSelectionMenu.h +0 -27
  44. package/ios/PapyrusTextAnnotationRange.h +0 -2
  45. package/ios/PapyrusTextAnnotationRange.m +0 -29
  46. package/ios/PapyrusTextDocumentView.h +0 -32
  47. package/ios/PapyrusTextDocumentView.m +0 -518
  48. package/ios/PapyrusTextDocumentViewManager.m +0 -34
  49. package/ios/PapyrusTextStore.h +0 -13
  50. package/ios/PapyrusTextStore.m +0 -73
  51. package/third_party_licenses/BLAKE2-NOTICE.txt +0 -11
  52. package/third_party_licenses/libarchive-COPYING +0 -65
  53. package/vendor/libarchive/PapyrusComicArchive.cpp +0 -376
  54. package/vendor/libarchive/PapyrusComicArchive.h +0 -30
  55. package/vendor/libarchive/README.papyrus.md +0 -15
  56. package/vendor/libarchive/android.h +0 -192
  57. package/vendor/libarchive/config/PapyrusArchiveConfig.h +0 -71
  58. package/vendor/libarchive/libarchive/CMakeLists.txt +0 -293
  59. package/vendor/libarchive/libarchive/android_lf.h +0 -36
  60. package/vendor/libarchive/libarchive/archive.h +0 -1266
  61. package/vendor/libarchive/libarchive/archive_acl.c +0 -2025
  62. package/vendor/libarchive/libarchive/archive_acl_private.h +0 -85
  63. package/vendor/libarchive/libarchive/archive_blake2.h +0 -197
  64. package/vendor/libarchive/libarchive/archive_blake2_impl.h +0 -161
  65. package/vendor/libarchive/libarchive/archive_blake2s_ref.c +0 -369
  66. package/vendor/libarchive/libarchive/archive_blake2sp_ref.c +0 -361
  67. package/vendor/libarchive/libarchive/archive_check_magic.c +0 -183
  68. package/vendor/libarchive/libarchive/archive_cmdline.c +0 -211
  69. package/vendor/libarchive/libarchive/archive_cmdline_private.h +0 -45
  70. package/vendor/libarchive/libarchive/archive_crc32.h +0 -123
  71. package/vendor/libarchive/libarchive/archive_cryptor.c +0 -534
  72. package/vendor/libarchive/libarchive/archive_cryptor_private.h +0 -199
  73. package/vendor/libarchive/libarchive/archive_digest.c +0 -1584
  74. package/vendor/libarchive/libarchive/archive_digest_private.h +0 -431
  75. package/vendor/libarchive/libarchive/archive_disk_acl_darwin.c +0 -558
  76. package/vendor/libarchive/libarchive/archive_disk_acl_freebsd.c +0 -712
  77. package/vendor/libarchive/libarchive/archive_disk_acl_linux.c +0 -760
  78. package/vendor/libarchive/libarchive/archive_disk_acl_sunos.c +0 -824
  79. package/vendor/libarchive/libarchive/archive_endian.h +0 -234
  80. package/vendor/libarchive/libarchive/archive_entry.3 +0 -147
  81. package/vendor/libarchive/libarchive/archive_entry.c +0 -2297
  82. package/vendor/libarchive/libarchive/archive_entry.h +0 -763
  83. package/vendor/libarchive/libarchive/archive_entry_acl.3 +0 -458
  84. package/vendor/libarchive/libarchive/archive_entry_copy_bhfi.c +0 -55
  85. package/vendor/libarchive/libarchive/archive_entry_copy_stat.c +0 -82
  86. package/vendor/libarchive/libarchive/archive_entry_link_resolver.c +0 -472
  87. package/vendor/libarchive/libarchive/archive_entry_linkify.3 +0 -224
  88. package/vendor/libarchive/libarchive/archive_entry_locale.h +0 -90
  89. package/vendor/libarchive/libarchive/archive_entry_misc.3 +0 -63
  90. package/vendor/libarchive/libarchive/archive_entry_paths.3 +0 -153
  91. package/vendor/libarchive/libarchive/archive_entry_perms.3 +0 -210
  92. package/vendor/libarchive/libarchive/archive_entry_private.h +0 -205
  93. package/vendor/libarchive/libarchive/archive_entry_sparse.c +0 -156
  94. package/vendor/libarchive/libarchive/archive_entry_stat.3 +0 -274
  95. package/vendor/libarchive/libarchive/archive_entry_stat.c +0 -121
  96. package/vendor/libarchive/libarchive/archive_entry_strmode.c +0 -69
  97. package/vendor/libarchive/libarchive/archive_entry_time.3 +0 -127
  98. package/vendor/libarchive/libarchive/archive_entry_xattr.c +0 -155
  99. package/vendor/libarchive/libarchive/archive_hmac.c +0 -345
  100. package/vendor/libarchive/libarchive/archive_hmac_private.h +0 -119
  101. package/vendor/libarchive/libarchive/archive_integer.h +0 -267
  102. package/vendor/libarchive/libarchive/archive_match.c +0 -1869
  103. package/vendor/libarchive/libarchive/archive_openssl_evp_private.h +0 -54
  104. package/vendor/libarchive/libarchive/archive_openssl_hmac_private.h +0 -54
  105. package/vendor/libarchive/libarchive/archive_options.c +0 -219
  106. package/vendor/libarchive/libarchive/archive_options_private.h +0 -49
  107. package/vendor/libarchive/libarchive/archive_pack_dev.c +0 -330
  108. package/vendor/libarchive/libarchive/archive_pack_dev.h +0 -49
  109. package/vendor/libarchive/libarchive/archive_parse_date.c +0 -1173
  110. package/vendor/libarchive/libarchive/archive_pathmatch.c +0 -480
  111. package/vendor/libarchive/libarchive/archive_pathmatch.h +0 -50
  112. package/vendor/libarchive/libarchive/archive_platform.h +0 -213
  113. package/vendor/libarchive/libarchive/archive_platform_acl.h +0 -53
  114. package/vendor/libarchive/libarchive/archive_platform_stat.h +0 -45
  115. package/vendor/libarchive/libarchive/archive_platform_xattr.h +0 -45
  116. package/vendor/libarchive/libarchive/archive_ppmd7.c +0 -1173
  117. package/vendor/libarchive/libarchive/archive_ppmd7_private.h +0 -119
  118. package/vendor/libarchive/libarchive/archive_ppmd8.c +0 -1293
  119. package/vendor/libarchive/libarchive/archive_ppmd8_private.h +0 -123
  120. package/vendor/libarchive/libarchive/archive_ppmd_private.h +0 -159
  121. package/vendor/libarchive/libarchive/archive_private.h +0 -209
  122. package/vendor/libarchive/libarchive/archive_random.c +0 -274
  123. package/vendor/libarchive/libarchive/archive_random_private.h +0 -36
  124. package/vendor/libarchive/libarchive/archive_rb.c +0 -709
  125. package/vendor/libarchive/libarchive/archive_rb.h +0 -113
  126. package/vendor/libarchive/libarchive/archive_read.3 +0 -250
  127. package/vendor/libarchive/libarchive/archive_read.c +0 -1814
  128. package/vendor/libarchive/libarchive/archive_read_add_passphrase.3 +0 -72
  129. package/vendor/libarchive/libarchive/archive_read_add_passphrase.c +0 -189
  130. package/vendor/libarchive/libarchive/archive_read_append_filter.c +0 -209
  131. package/vendor/libarchive/libarchive/archive_read_data.3 +0 -128
  132. package/vendor/libarchive/libarchive/archive_read_data_into_fd.c +0 -207
  133. package/vendor/libarchive/libarchive/archive_read_disk.3 +0 -422
  134. package/vendor/libarchive/libarchive/archive_read_disk_entry_from_file.c +0 -1086
  135. package/vendor/libarchive/libarchive/archive_read_disk_posix.c +0 -2639
  136. package/vendor/libarchive/libarchive/archive_read_disk_private.h +0 -97
  137. package/vendor/libarchive/libarchive/archive_read_disk_set_standard_lookup.c +0 -315
  138. package/vendor/libarchive/libarchive/archive_read_disk_windows.c +0 -2603
  139. package/vendor/libarchive/libarchive/archive_read_extract.3 +0 -135
  140. package/vendor/libarchive/libarchive/archive_read_extract.c +0 -59
  141. package/vendor/libarchive/libarchive/archive_read_extract2.c +0 -154
  142. package/vendor/libarchive/libarchive/archive_read_filter.3 +0 -163
  143. package/vendor/libarchive/libarchive/archive_read_format.3 +0 -190
  144. package/vendor/libarchive/libarchive/archive_read_free.3 +0 -91
  145. package/vendor/libarchive/libarchive/archive_read_header.3 +0 -89
  146. package/vendor/libarchive/libarchive/archive_read_new.3 +0 -57
  147. package/vendor/libarchive/libarchive/archive_read_open.3 +0 -247
  148. package/vendor/libarchive/libarchive/archive_read_open_fd.c +0 -236
  149. package/vendor/libarchive/libarchive/archive_read_open_file.c +0 -257
  150. package/vendor/libarchive/libarchive/archive_read_open_filename.c +0 -652
  151. package/vendor/libarchive/libarchive/archive_read_open_memory.c +0 -188
  152. package/vendor/libarchive/libarchive/archive_read_private.h +0 -274
  153. package/vendor/libarchive/libarchive/archive_read_set_format.c +0 -116
  154. package/vendor/libarchive/libarchive/archive_read_set_options.3 +0 -290
  155. package/vendor/libarchive/libarchive/archive_read_set_options.c +0 -132
  156. package/vendor/libarchive/libarchive/archive_read_support_filter_all.c +0 -84
  157. package/vendor/libarchive/libarchive/archive_read_support_filter_by_code.c +0 -68
  158. package/vendor/libarchive/libarchive/archive_read_support_filter_bzip2.c +0 -360
  159. package/vendor/libarchive/libarchive/archive_read_support_filter_compress.c +0 -457
  160. package/vendor/libarchive/libarchive/archive_read_support_filter_grzip.c +0 -108
  161. package/vendor/libarchive/libarchive/archive_read_support_filter_gzip.c +0 -538
  162. package/vendor/libarchive/libarchive/archive_read_support_filter_lrzip.c +0 -119
  163. package/vendor/libarchive/libarchive/archive_read_support_filter_lz4.c +0 -829
  164. package/vendor/libarchive/libarchive/archive_read_support_filter_lzop.c +0 -493
  165. package/vendor/libarchive/libarchive/archive_read_support_filter_none.c +0 -51
  166. package/vendor/libarchive/libarchive/archive_read_support_filter_program.c +0 -497
  167. package/vendor/libarchive/libarchive/archive_read_support_filter_rpm.c +0 -249
  168. package/vendor/libarchive/libarchive/archive_read_support_filter_uu.c +0 -739
  169. package/vendor/libarchive/libarchive/archive_read_support_filter_xz.c +0 -792
  170. package/vendor/libarchive/libarchive/archive_read_support_filter_zstd.c +0 -356
  171. package/vendor/libarchive/libarchive/archive_read_support_format_7zip.c +0 -4650
  172. package/vendor/libarchive/libarchive/archive_read_support_format_all.c +0 -88
  173. package/vendor/libarchive/libarchive/archive_read_support_format_ar.c +0 -597
  174. package/vendor/libarchive/libarchive/archive_read_support_format_by_code.c +0 -76
  175. package/vendor/libarchive/libarchive/archive_read_support_format_cab.c +0 -3410
  176. package/vendor/libarchive/libarchive/archive_read_support_format_cpio.c +0 -1152
  177. package/vendor/libarchive/libarchive/archive_read_support_format_empty.c +0 -95
  178. package/vendor/libarchive/libarchive/archive_read_support_format_iso9660.c +0 -3516
  179. package/vendor/libarchive/libarchive/archive_read_support_format_lha.c +0 -2931
  180. package/vendor/libarchive/libarchive/archive_read_support_format_mtree.c +0 -2113
  181. package/vendor/libarchive/libarchive/archive_read_support_format_rar.c +0 -3932
  182. package/vendor/libarchive/libarchive/archive_read_support_format_rar5.c +0 -4501
  183. package/vendor/libarchive/libarchive/archive_read_support_format_raw.c +0 -194
  184. package/vendor/libarchive/libarchive/archive_read_support_format_tar.c +0 -3785
  185. package/vendor/libarchive/libarchive/archive_read_support_format_warc.c +0 -875
  186. package/vendor/libarchive/libarchive/archive_read_support_format_xar.c +0 -3770
  187. package/vendor/libarchive/libarchive/archive_read_support_format_zip.c +0 -4710
  188. package/vendor/libarchive/libarchive/archive_string.c +0 -4391
  189. package/vendor/libarchive/libarchive/archive_string.h +0 -244
  190. package/vendor/libarchive/libarchive/archive_string_composition.h +0 -2289
  191. package/vendor/libarchive/libarchive/archive_string_sprintf.c +0 -200
  192. package/vendor/libarchive/libarchive/archive_time.c +0 -168
  193. package/vendor/libarchive/libarchive/archive_time_private.h +0 -47
  194. package/vendor/libarchive/libarchive/archive_util.3 +0 -239
  195. package/vendor/libarchive/libarchive/archive_util.c +0 -668
  196. package/vendor/libarchive/libarchive/archive_version_details.c +0 -516
  197. package/vendor/libarchive/libarchive/archive_virtual.c +0 -162
  198. package/vendor/libarchive/libarchive/archive_windows.c +0 -1035
  199. package/vendor/libarchive/libarchive/archive_windows.h +0 -332
  200. package/vendor/libarchive/libarchive/archive_write.3 +0 -266
  201. package/vendor/libarchive/libarchive/archive_write.c +0 -896
  202. package/vendor/libarchive/libarchive/archive_write_add_filter.c +0 -71
  203. package/vendor/libarchive/libarchive/archive_write_add_filter_b64encode.c +0 -329
  204. package/vendor/libarchive/libarchive/archive_write_add_filter_by_name.c +0 -76
  205. package/vendor/libarchive/libarchive/archive_write_add_filter_bzip2.c +0 -411
  206. package/vendor/libarchive/libarchive/archive_write_add_filter_compress.c +0 -459
  207. package/vendor/libarchive/libarchive/archive_write_add_filter_grzip.c +0 -143
  208. package/vendor/libarchive/libarchive/archive_write_add_filter_gzip.c +0 -493
  209. package/vendor/libarchive/libarchive/archive_write_add_filter_lrzip.c +0 -214
  210. package/vendor/libarchive/libarchive/archive_write_add_filter_lz4.c +0 -710
  211. package/vendor/libarchive/libarchive/archive_write_add_filter_lzop.c +0 -500
  212. package/vendor/libarchive/libarchive/archive_write_add_filter_none.c +0 -42
  213. package/vendor/libarchive/libarchive/archive_write_add_filter_program.c +0 -398
  214. package/vendor/libarchive/libarchive/archive_write_add_filter_uuencode.c +0 -320
  215. package/vendor/libarchive/libarchive/archive_write_add_filter_xz.c +0 -547
  216. package/vendor/libarchive/libarchive/archive_write_add_filter_zstd.c +0 -608
  217. package/vendor/libarchive/libarchive/archive_write_blocksize.3 +0 -112
  218. package/vendor/libarchive/libarchive/archive_write_data.3 +0 -88
  219. package/vendor/libarchive/libarchive/archive_write_disk.3 +0 -360
  220. package/vendor/libarchive/libarchive/archive_write_disk_posix.c +0 -4789
  221. package/vendor/libarchive/libarchive/archive_write_disk_private.h +0 -43
  222. package/vendor/libarchive/libarchive/archive_write_disk_set_standard_lookup.c +0 -265
  223. package/vendor/libarchive/libarchive/archive_write_disk_windows.c +0 -2952
  224. package/vendor/libarchive/libarchive/archive_write_filter.3 +0 -140
  225. package/vendor/libarchive/libarchive/archive_write_finish_entry.3 +0 -77
  226. package/vendor/libarchive/libarchive/archive_write_format.3 +0 -187
  227. package/vendor/libarchive/libarchive/archive_write_free.3 +0 -94
  228. package/vendor/libarchive/libarchive/archive_write_header.3 +0 -71
  229. package/vendor/libarchive/libarchive/archive_write_new.3 +0 -56
  230. package/vendor/libarchive/libarchive/archive_write_open.3 +0 -270
  231. package/vendor/libarchive/libarchive/archive_write_open_fd.c +0 -141
  232. package/vendor/libarchive/libarchive/archive_write_open_file.c +0 -102
  233. package/vendor/libarchive/libarchive/archive_write_open_filename.c +0 -272
  234. package/vendor/libarchive/libarchive/archive_write_open_memory.c +0 -110
  235. package/vendor/libarchive/libarchive/archive_write_private.h +0 -166
  236. package/vendor/libarchive/libarchive/archive_write_set_format.c +0 -124
  237. package/vendor/libarchive/libarchive/archive_write_set_format_7zip.c +0 -2571
  238. package/vendor/libarchive/libarchive/archive_write_set_format_ar.c +0 -540
  239. package/vendor/libarchive/libarchive/archive_write_set_format_by_name.c +0 -93
  240. package/vendor/libarchive/libarchive/archive_write_set_format_cpio.c +0 -11
  241. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_binary.c +0 -618
  242. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_newc.c +0 -457
  243. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_odc.c +0 -508
  244. package/vendor/libarchive/libarchive/archive_write_set_format_filter_by_ext.c +0 -141
  245. package/vendor/libarchive/libarchive/archive_write_set_format_gnutar.c +0 -790
  246. package/vendor/libarchive/libarchive/archive_write_set_format_iso9660.c +0 -8216
  247. package/vendor/libarchive/libarchive/archive_write_set_format_mtree.c +0 -2307
  248. package/vendor/libarchive/libarchive/archive_write_set_format_pax.c +0 -2249
  249. package/vendor/libarchive/libarchive/archive_write_set_format_private.h +0 -40
  250. package/vendor/libarchive/libarchive/archive_write_set_format_raw.c +0 -123
  251. package/vendor/libarchive/libarchive/archive_write_set_format_shar.c +0 -650
  252. package/vendor/libarchive/libarchive/archive_write_set_format_ustar.c +0 -768
  253. package/vendor/libarchive/libarchive/archive_write_set_format_v7tar.c +0 -648
  254. package/vendor/libarchive/libarchive/archive_write_set_format_warc.c +0 -491
  255. package/vendor/libarchive/libarchive/archive_write_set_format_xar.c +0 -3799
  256. package/vendor/libarchive/libarchive/archive_write_set_format_zip.c +0 -2548
  257. package/vendor/libarchive/libarchive/archive_write_set_options.3 +0 -779
  258. package/vendor/libarchive/libarchive/archive_write_set_options.c +0 -129
  259. package/vendor/libarchive/libarchive/archive_write_set_passphrase.3 +0 -72
  260. package/vendor/libarchive/libarchive/archive_write_set_passphrase.c +0 -95
  261. package/vendor/libarchive/libarchive/archive_xxhash.h +0 -48
  262. package/vendor/libarchive/libarchive/config_freebsd.h +0 -275
  263. package/vendor/libarchive/libarchive/cpio.5 +0 -389
  264. package/vendor/libarchive/libarchive/filter_fork.h +0 -44
  265. package/vendor/libarchive/libarchive/filter_fork_posix.c +0 -269
  266. package/vendor/libarchive/libarchive/filter_fork_windows.c +0 -270
  267. package/vendor/libarchive/libarchive/libarchive-formats.5 +0 -478
  268. package/vendor/libarchive/libarchive/libarchive.3 +0 -297
  269. package/vendor/libarchive/libarchive/libarchive_changes.3 +0 -339
  270. package/vendor/libarchive/libarchive/libarchive_internals.3 +0 -363
  271. package/vendor/libarchive/libarchive/module.modulemap +0 -34
  272. package/vendor/libarchive/libarchive/mtree.5 +0 -323
  273. package/vendor/libarchive/libarchive/tar.5 +0 -947
  274. package/vendor/libarchive/libarchive/xxhash.c +0 -531
@@ -1,88 +0,0 @@
1
- .\" Copyright (c) 2003-2011 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 February 28, 2017
26
- .Dt ARCHIVE_WRITE_DATA 3
27
- .Os
28
- .Sh NAME
29
- .Nm archive_write_data ,
30
- .Nm archive_write_data_block
31
- .Nd functions for creating archives
32
- .Sh LIBRARY
33
- Streaming Archive Library (libarchive, -larchive)
34
- .Sh SYNOPSIS
35
- .In archive.h
36
- .Ft la_ssize_t
37
- .Fn archive_write_data "struct archive *" "const void *" "size_t"
38
- .Ft la_ssize_t
39
- .Fn archive_write_data_block "struct archive *" "const void *" "size_t size" "int64_t offset"
40
- .Sh DESCRIPTION
41
- .Bl -tag -width indent
42
- .It Fn archive_write_data
43
- Write data corresponding to the header just written.
44
- .It Fn archive_write_data_block
45
- Write data corresponding to the header just written.
46
- This is like
47
- .Fn archive_write_data
48
- except that it performs a seek on the file being
49
- written to the specified offset before writing the data.
50
- This is useful when restoring sparse files from archive
51
- formats that support sparse files.
52
- Returns number of bytes written or -1 on error.
53
- (Note: This is currently not supported for
54
- .Tn archive_write
55
- handles, only for
56
- .Tn archive_write_disk
57
- handles.
58
- .El
59
- .\" .Sh EXAMPLE
60
- .\"
61
- .Sh RETURN VALUES
62
- This function returns the number of bytes actually written, or
63
- a negative error code on error.
64
- .\"
65
- .Sh ERRORS
66
- Detailed error codes and textual descriptions are available from the
67
- .Fn archive_errno
68
- and
69
- .Fn archive_error_string
70
- functions.
71
- .\"
72
- .Sh BUGS
73
- In libarchive 3.x, this function sometimes returns
74
- zero on success instead of returning the number of bytes written.
75
- Specifically, this occurs when writing to an
76
- .Vt archive_write_disk
77
- handle.
78
- Clients should treat any value less than zero as an error
79
- and consider any non-negative value as success.
80
- .\"
81
- .Sh SEE ALSO
82
- .Xr tar 1 ,
83
- .Xr archive_write_finish_entry 3 ,
84
- .Xr archive_write_set_options 3 ,
85
- .Xr libarchive 3 ,
86
- .Xr cpio 5 ,
87
- .Xr mtree 5 ,
88
- .Xr tar 5
@@ -1,360 +0,0 @@
1
- .\" Copyright (c) 2003-2007 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 19, 2020
26
- .Dt ARCHIVE_WRITE_DISK 3
27
- .Os
28
- .Sh NAME
29
- .Nm archive_write_disk_new ,
30
- .Nm archive_write_disk_set_options ,
31
- .Nm archive_write_disk_set_skip_file ,
32
- .Nm archive_write_disk_set_group_lookup ,
33
- .Nm archive_write_disk_set_standard_lookup ,
34
- .Nm archive_write_disk_set_user_lookup
35
- .Nd functions for creating objects on disk
36
- .Sh LIBRARY
37
- Streaming Archive Library (libarchive, -larchive)
38
- .Sh SYNOPSIS
39
- .In archive.h
40
- .Ft struct archive *
41
- .Fn archive_write_disk_new "void"
42
- .Ft int
43
- .Fn archive_write_disk_set_options "struct archive *" "int flags"
44
- .Ft int
45
- .Fn archive_write_disk_set_skip_file "struct archive *" "dev_t" "ino_t"
46
- .Ft int
47
- .Fo archive_write_disk_set_group_lookup
48
- .Fa "struct archive *"
49
- .Fa "void *"
50
- .Fa "gid_t (*)(void *, const char *gname, gid_t gid)"
51
- .Fa "void (*cleanup)(void *)"
52
- .Fc
53
- .Ft int
54
- .Fn archive_write_disk_set_standard_lookup "struct archive *"
55
- .Ft int
56
- .Fo archive_write_disk_set_user_lookup
57
- .Fa "struct archive *"
58
- .Fa "void *"
59
- .Fa "uid_t (*)(void *, const char *uname, uid_t uid)"
60
- .Fa "void (*cleanup)(void *)"
61
- .Fc
62
- .Sh DESCRIPTION
63
- These functions provide a complete API for creating objects on
64
- disk from
65
- .Tn struct archive_entry
66
- descriptions.
67
- They are most naturally used when extracting objects from an archive
68
- using the
69
- .Fn archive_read
70
- interface.
71
- The general process is to read
72
- .Tn struct archive_entry
73
- objects from an archive, then write those objects to a
74
- .Tn struct archive
75
- object created using the
76
- .Fn archive_write_disk
77
- family functions.
78
- This interface is deliberately very similar to the
79
- .Fn archive_write
80
- interface used to write objects to a streaming archive.
81
- .Bl -tag -width indent
82
- .It Fn archive_write_disk_new
83
- Allocates and initializes a
84
- .Tn struct archive
85
- object suitable for writing objects to disk.
86
- .It Fn archive_write_disk_set_skip_file
87
- Records the device and inode numbers of a file that should not be
88
- overwritten.
89
- This is typically used to ensure that an extraction process does not
90
- overwrite the archive from which objects are being read.
91
- This capability is technically unnecessary but can be a significant
92
- performance optimization in practice.
93
- .It Fn archive_write_disk_set_options
94
- The options field consists of a bitwise OR of one or more of the
95
- following values:
96
- .Bl -tag -compact -width "indent"
97
- .It Cm ARCHIVE_EXTRACT_ACL
98
- Attempt to restore Access Control Lists.
99
- By default, extended ACLs are ignored.
100
- .It Cm ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS
101
- Before removing a file system object prior to replacing it, clear
102
- platform-specific file flags which might prevent its removal.
103
- .It Cm ARCHIVE_EXTRACT_FFLAGS
104
- Attempt to restore file attributes (file flags).
105
- By default, file attributes are ignored.
106
- See
107
- .Xr chattr 1
108
- .Pq Linux
109
- or
110
- .Xr chflags 1
111
- .Pq FreeBSD, Mac OS X
112
- for more information on file attributes.
113
- .It Cm ARCHIVE_EXTRACT_MAC_METADATA
114
- Mac OS X specific.
115
- Restore metadata using
116
- .Xr copyfile 3 .
117
- By default,
118
- .Xr copyfile 3
119
- metadata is ignored.
120
- .It Cm ARCHIVE_EXTRACT_NO_OVERWRITE
121
- Existing files on disk will not be overwritten.
122
- By default, existing regular files are truncated and overwritten;
123
- existing directories will have their permissions updated;
124
- other pre-existing objects are unlinked and recreated from scratch.
125
- .It Cm ARCHIVE_EXTRACT_OWNER
126
- The user and group IDs should be set on the restored file.
127
- By default, the user and group IDs are not restored.
128
- .It Cm ARCHIVE_EXTRACT_PERM
129
- Full permissions (including SGID, SUID, and sticky bits) should
130
- be restored exactly as specified, without obeying the
131
- current umask.
132
- Note that SUID and SGID bits can only be restored if the
133
- user and group ID of the object on disk are correct.
134
- If
135
- .Cm ARCHIVE_EXTRACT_OWNER
136
- is not specified, then SUID and SGID bits will only be restored
137
- if the default user and group IDs of newly-created objects on disk
138
- happen to match those specified in the archive entry.
139
- By default, only basic permissions are restored, and umask is obeyed.
140
- .It Cm ARCHIVE_EXTRACT_SAFE_WRITES
141
- Extract files atomically, by first creating a unique temporary file and then
142
- renaming it to its required destination name.
143
- This avoids a race where an application might see a partial file (or no
144
- file) during extraction.
145
- .It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
146
- Refuse to extract an absolute path.
147
- The default is to not refuse such paths.
148
- .It Cm ARCHIVE_EXTRACT_SECURE_NODOTDOT
149
- Refuse to extract a path that contains a
150
- .Pa ..
151
- element anywhere within it.
152
- The default is to not refuse such paths.
153
- Note that paths ending in
154
- .Pa ..
155
- always cause an error, regardless of this flag.
156
- .It Cm ARCHIVE_EXTRACT_SECURE_SYMLINKS
157
- Refuse to extract any object whose final location would be altered
158
- by a symlink on disk.
159
- This is intended to help guard against a variety of mischief
160
- caused by archives that (deliberately or otherwise) extract
161
- files outside of the current directory.
162
- The default is not to perform this check.
163
- If
164
- .Cm ARCHIVE_EXTRACT_UNLINK
165
- is specified together with this option, the library will
166
- remove any intermediate symlinks it finds and return an
167
- error only if such symlink could not be removed.
168
- .It Cm ARCHIVE_EXTRACT_SPARSE
169
- Scan data for blocks of NUL bytes and try to recreate them with holes.
170
- This results in sparse files, independent of whether the archive format
171
- supports or uses them.
172
- .It Cm ARCHIVE_EXTRACT_TIME
173
- The timestamps (mtime, ctime, and atime) should be restored.
174
- By default, they are ignored.
175
- Note that restoring of atime is not currently supported.
176
- .It Cm ARCHIVE_EXTRACT_UNLINK
177
- Existing files on disk will be unlinked before any attempt to
178
- create them.
179
- In some cases, this can prove to be a significant performance improvement.
180
- By default, existing files are truncated and rewritten, but
181
- the file is not recreated.
182
- In particular, the default behavior does not break existing hard links.
183
- .It Cm ARCHIVE_EXTRACT_XATTR
184
- Attempt to restore extended file attributes.
185
- By default, they are ignored.
186
- See
187
- .Xr xattr 7
188
- .Pq Linux ,
189
- .Xr xattr 2
190
- .Pq Mac OS X ,
191
- or
192
- .Xr getextattr 8
193
- .Pq FreeBSD
194
- for more information on extended file attributes.
195
- .El
196
- .It Xo
197
- .Fn archive_write_disk_set_group_lookup ,
198
- .Fn archive_write_disk_set_user_lookup
199
- .Xc
200
- The
201
- .Tn struct archive_entry
202
- objects contain both names and ids that can be used to identify users
203
- and groups.
204
- These names and ids describe the ownership of the file itself and
205
- also appear in ACL lists.
206
- By default, the library uses the ids and ignores the names, but
207
- this can be overridden by registering user and group lookup functions.
208
- To register, you must provide a lookup function which
209
- accepts both a name and id and returns a suitable id.
210
- You may also provide a
211
- .Tn void *
212
- pointer to a private data structure and a cleanup function for
213
- that data.
214
- The cleanup function will be invoked when the
215
- .Tn struct archive
216
- object is destroyed.
217
- .It Fn archive_write_disk_set_standard_lookup
218
- This convenience function installs a standard set of user
219
- and group lookup functions.
220
- These functions use
221
- .Xr getpwnam 3
222
- and
223
- .Xr getgrnam 3
224
- to convert names to ids, defaulting to the ids if the names cannot
225
- be looked up.
226
- These functions also implement a simple memory cache to reduce
227
- the number of calls to
228
- .Xr getpwnam 3
229
- and
230
- .Xr getgrnam 3 .
231
- .El
232
- More information about the
233
- .Va struct archive
234
- object and the overall design of the library can be found in the
235
- .Xr libarchive 3
236
- overview.
237
- Many of these functions are also documented under
238
- .Xr archive_write 3 .
239
- .Sh RETURN VALUES
240
- Most functions return
241
- .Cm ARCHIVE_OK
242
- (zero) on success, or one of several non-zero
243
- error codes for errors.
244
- Specific error codes include:
245
- .Cm ARCHIVE_RETRY
246
- for operations that might succeed if retried,
247
- .Cm ARCHIVE_WARN
248
- for unusual conditions that do not prevent further operations, and
249
- .Cm ARCHIVE_FATAL
250
- for serious errors that make remaining operations impossible.
251
- .Pp
252
- .Fn archive_write_disk_new
253
- returns a pointer to a newly-allocated
254
- .Tn struct archive
255
- object.
256
- .Pp
257
- .Fn archive_write_data
258
- returns a count of the number of bytes actually written,
259
- or
260
- .Li -1
261
- on error.
262
- .\"
263
- .Sh ERRORS
264
- Detailed error codes and textual descriptions are available from the
265
- .Fn archive_errno
266
- and
267
- .Fn archive_error_string
268
- functions.
269
- .\"
270
- .Sh SEE ALSO
271
- .Xr tar 1 ,
272
- .Xr archive_read 3 ,
273
- .Xr archive_write 3 ,
274
- .Xr libarchive 3
275
- .Sh HISTORY
276
- The
277
- .Nm libarchive
278
- library first appeared in
279
- .Fx 5.3 .
280
- The
281
- .Nm archive_write_disk
282
- interface was added to
283
- .Nm libarchive 2.0
284
- and first appeared in
285
- .Fx 6.3 .
286
- .Sh AUTHORS
287
- .An -nosplit
288
- The
289
- .Nm libarchive
290
- library was written by
291
- .An Tim Kientzle Aq kientzle@acm.org .
292
- .Sh BUGS
293
- Directories are actually extracted in two distinct phases.
294
- Directories are created during
295
- .Fn archive_write_header ,
296
- but final permissions are not set until
297
- .Fn archive_write_close .
298
- This separation is necessary to correctly handle borderline
299
- cases such as a non-writable directory containing
300
- files, but can cause unexpected results.
301
- In particular, directory permissions are not fully
302
- restored until the archive is closed.
303
- If you use
304
- .Xr chdir 2
305
- to change the current directory between calls to
306
- .Fn archive_read_extract
307
- or before calling
308
- .Fn archive_read_close ,
309
- you may confuse the permission-setting logic with
310
- the result that directory permissions are restored
311
- incorrectly.
312
- .Pp
313
- The library attempts to create objects with filenames longer than
314
- .Cm PATH_MAX
315
- by creating prefixes of the full path and changing the current directory.
316
- Currently, this logic is limited in scope; the fixup pass does
317
- not work correctly for such objects and the symlink security check
318
- option disables the support for very long pathnames.
319
- .Pp
320
- Restoring the path
321
- .Pa aa/../bb
322
- does create each intermediate directory.
323
- In particular, the directory
324
- .Pa aa
325
- is created as well as the final object
326
- .Pa bb .
327
- In theory, this can be exploited to create an entire directory hierarchy
328
- with a single request.
329
- Of course, this does not work if the
330
- .Cm ARCHIVE_EXTRACT_NODOTDOT
331
- option is specified.
332
- .Pp
333
- Implicit directories are always created obeying the current umask.
334
- Explicit objects are created obeying the current umask unless
335
- .Cm ARCHIVE_EXTRACT_PERM
336
- is specified, in which case they current umask is ignored.
337
- .Pp
338
- SGID and SUID bits are restored only if the correct user and
339
- group could be set.
340
- If
341
- .Cm ARCHIVE_EXTRACT_OWNER
342
- is not specified, then no attempt is made to set the ownership.
343
- In this case, SGID and SUID bits are restored only if the
344
- user and group of the final object happen to match those specified
345
- in the entry.
346
- .Pp
347
- The
348
- .Dq standard
349
- user-id and group-id lookup functions are not the defaults because
350
- .Xr getgrnam 3
351
- and
352
- .Xr getpwnam 3
353
- are sometimes too large for particular applications.
354
- The current design allows the application author to use a more
355
- compact implementation when appropriate.
356
- .Pp
357
- There should be a corresponding
358
- .Nm archive_read_disk
359
- interface that walks a directory hierarchy and returns archive
360
- entry objects.