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

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 +10 -8
  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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papyrus-sdk/engine-native",
3
- "version": "0.2.22-beta.9.epub.2",
3
+ "version": "0.2.22",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "papyrus",
@@ -32,7 +32,9 @@
32
32
  "android/consumer-rules.pro",
33
33
  "ios/*.h",
34
34
  "ios/*.m",
35
- "ios/*.podspec",
35
+ "*.podspec",
36
+ "vendor/libarchive",
37
+ "third_party_licenses",
36
38
  "react-native.config.js"
37
39
  ],
38
40
  "publishConfig": {
@@ -46,17 +48,17 @@
46
48
  "bugs": {
47
49
  "url": "https://github.com/solrachix/Papyrus/issues"
48
50
  },
49
- "scripts": {
50
- "build": "tsup"
51
- },
52
51
  "peerDependencies": {
53
- "@papyrus-sdk/core": ">=0.2.18",
54
- "@papyrus-sdk/types": ">=0.2.11",
52
+ "@papyrus-sdk/core": "0.2.23",
53
+ "@papyrus-sdk/types": "0.2.16",
55
54
  "react-native": ">=0.81.0"
56
55
  },
57
56
  "devDependencies": {
58
57
  "@papyrus-sdk/core": "0.2.19",
59
58
  "@papyrus-sdk/types": "0.2.12",
60
59
  "react-native": "^0.81.0"
60
+ },
61
+ "scripts": {
62
+ "build": "tsup"
61
63
  }
62
- }
64
+ }
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  project: {
3
3
  ios: {
4
- podspecPath: 'ios/PapyrusNativeEngine.podspec',
4
+ podspecPath: 'PapyrusNativeEngine.podspec',
5
5
  },
6
6
  android: {
7
7
  sourceDir: 'android',
@@ -0,0 +1,11 @@
1
+ BLAKE2 reference source notice
2
+
3
+ The BLAKE2 reference source files included in the libarchive subset are
4
+ Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. They may be used under the
5
+ terms of CC0 1.0 Universal, the OpenSSL License, or Apache License 2.0, at the
6
+ user's option. The source files retain this notice. The license texts are
7
+ available from:
8
+
9
+ CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/legalcode
10
+ OpenSSL License: https://www.openssl.org/source/license.html
11
+ Apache License 2.0: https://www.apache.org/licenses/LICENSE-2.0
@@ -0,0 +1,65 @@
1
+ The libarchive distribution as a whole is Copyright by Tim Kientzle
2
+ and is subject to the copyright notice reproduced at the bottom of
3
+ this file.
4
+
5
+ Each individual file in this distribution should have a clear
6
+ copyright/licensing statement at the beginning of the file. If any do
7
+ not, please let me know and I will rectify it. The following is
8
+ intended to summarize the copyright status of the individual files;
9
+ the actual statements in the files are controlling.
10
+
11
+ * Except as listed below, all C sources (including .c and .h files)
12
+ and documentation files are subject to the copyright notice reproduced
13
+ at the bottom of this file.
14
+
15
+ * The following source files are also subject in whole or in part to
16
+ a 3-clause UC Regents copyright; please read the individual source
17
+ files for details:
18
+ libarchive/archive_read_support_filter_compress.c
19
+ libarchive/archive_write_add_filter_compress.c
20
+ libarchive/mtree.5
21
+
22
+ * The following source files are in the public domain:
23
+ libarchive/archive_parse_date.c
24
+
25
+ * The following source files are triple-licensed with the ability to choose
26
+ from CC0 1.0 Universal, OpenSSL or Apache 2.0 licenses:
27
+ libarchive/archive_blake2.h
28
+ libarchive/archive_blake2_impl.h
29
+ libarchive/archive_blake2s_ref.c
30
+ libarchive/archive_blake2sp_ref.c
31
+
32
+ * The build files---including Makefiles, configure scripts,
33
+ and auxiliary scripts used as part of the compile process---have
34
+ widely varying licensing terms. Please check individual files before
35
+ distributing them to see if those restrictions apply to you.
36
+
37
+ I intend for all new source code to use the license below and hope over
38
+ time to replace code with other licenses with new implementations that
39
+ do use the license below. The varying licensing of the build scripts
40
+ seems to be an unavoidable mess.
41
+
42
+
43
+ Copyright (c) 2003-2018 <author(s)>
44
+ All rights reserved.
45
+
46
+ Redistribution and use in source and binary forms, with or without
47
+ modification, are permitted provided that the following conditions
48
+ are met:
49
+ 1. Redistributions of source code must retain the above copyright
50
+ notice, this list of conditions and the following disclaimer
51
+ in this position and unchanged.
52
+ 2. Redistributions in binary form must reproduce the above copyright
53
+ notice, this list of conditions and the following disclaimer in the
54
+ documentation and/or other materials provided with the distribution.
55
+
56
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
57
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
58
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
59
+ IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
60
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
62
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
63
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
65
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,376 @@
1
+ #include "PapyrusComicArchive.h"
2
+
3
+ #include <archive.h>
4
+ #include <archive_entry.h>
5
+
6
+ #include <algorithm>
7
+ #include <cctype>
8
+ #include <chrono>
9
+ #include <cstdint>
10
+ #include <filesystem>
11
+ #include <fstream>
12
+ #include <functional>
13
+ #include <limits>
14
+ #include <memory>
15
+ #include <mutex>
16
+ #include <string>
17
+ #include <unordered_map>
18
+ #include <vector>
19
+
20
+ namespace fs = std::filesystem;
21
+
22
+ namespace {
23
+ constexpr std::uint64_t kMaximumEntryBytes = 64ULL * 1024ULL * 1024ULL;
24
+ // Reserve 16 MiB for downsampled thumbnails; page files plus thumbnails stay within 96 MiB.
25
+ constexpr std::uint64_t kMaximumExtractedPageCacheBytes = 80ULL * 1024ULL * 1024ULL;
26
+ constexpr std::size_t kMaximumEntries = 50000;
27
+ constexpr std::size_t kMaximumArchiveEntries = 200000;
28
+ constexpr std::size_t kIoBlockSize = 64 * 1024;
29
+
30
+ struct ComicPage {
31
+ std::string name;
32
+ std::string normalized_name;
33
+ std::uint64_t declared_size = 0;
34
+ std::size_t archive_ordinal = 0;
35
+ };
36
+
37
+ struct ComicDocument {
38
+ std::string engine_id;
39
+ int generation = 0;
40
+ fs::path archive_path;
41
+ fs::path cache_dir;
42
+ std::vector<ComicPage> pages;
43
+ std::mutex lock;
44
+ };
45
+
46
+ std::mutex g_documents_lock;
47
+ std::mutex g_cache_lock;
48
+ std::unordered_map<std::string, std::shared_ptr<ComicDocument>> g_documents;
49
+
50
+ std::string key_for(const char *engine_id, int generation) {
51
+ return std::string(engine_id ? engine_id : "") + ":" + std::to_string(generation);
52
+ }
53
+
54
+ void write_error(char *buffer, std::size_t size, const std::string &message) {
55
+ if (!buffer || size == 0) return;
56
+ const std::size_t length = std::min(size - 1, message.size());
57
+ std::copy(message.begin(), message.begin() + length, buffer);
58
+ buffer[length] = '\0';
59
+ }
60
+
61
+ std::string normalize_path(std::string path) {
62
+ std::replace(path.begin(), path.end(), '\\', '/');
63
+ return path;
64
+ }
65
+
66
+ bool is_supported_image(const std::string &path) {
67
+ const std::string normalized = normalize_path(path);
68
+ const std::size_t slash = normalized.find_last_of('/');
69
+ const std::string name = normalized.substr(slash == std::string::npos ? 0 : slash + 1);
70
+ if (name.empty() || name[0] == '.') return false;
71
+
72
+ std::size_t start = 0;
73
+ while (start < normalized.size()) {
74
+ const std::size_t end = normalized.find('/', start);
75
+ const std::string part = normalized.substr(start, end == std::string::npos ? std::string::npos : end - start);
76
+ std::string lower_part = part;
77
+ std::transform(lower_part.begin(), lower_part.end(), lower_part.begin(), [](unsigned char c) { return static_cast<char>(std::tolower(c)); });
78
+ if (part.empty() || part[0] == '.' || lower_part == "__macosx") return false;
79
+ if (end == std::string::npos) break;
80
+ start = end + 1;
81
+ }
82
+
83
+ const std::size_t dot = name.find_last_of('.');
84
+ if (dot == std::string::npos || dot + 1 >= name.size()) return false;
85
+ std::string extension = name.substr(dot + 1);
86
+ std::transform(extension.begin(), extension.end(), extension.begin(), [](unsigned char c) { return static_cast<char>(std::tolower(c)); });
87
+ const bool common_image = extension == "jpg" || extension == "jpeg" || extension == "png" || extension == "gif";
88
+ #if defined(__APPLE__)
89
+ return common_image;
90
+ #else
91
+ return common_image || extension == "webp";
92
+ #endif
93
+ }
94
+
95
+ int compare_digit_runs(const std::string &a, std::size_t &i, const std::string &b, std::size_t &j) {
96
+ const std::size_t start_a = i;
97
+ const std::size_t start_b = j;
98
+ while (i < a.size() && a[i] == '0') ++i;
99
+ while (j < b.size() && b[j] == '0') ++j;
100
+ const std::size_t significant_a = i;
101
+ const std::size_t significant_b = j;
102
+ while (i < a.size() && std::isdigit(static_cast<unsigned char>(a[i]))) ++i;
103
+ while (j < b.size() && std::isdigit(static_cast<unsigned char>(b[j]))) ++j;
104
+ const std::size_t length_a = i - significant_a;
105
+ const std::size_t length_b = j - significant_b;
106
+ if (length_a != length_b) return length_a < length_b ? -1 : 1;
107
+ const int number_compare = a.compare(significant_a, length_a, b, significant_b, length_b);
108
+ if (number_compare != 0) return number_compare < 0 ? -1 : 1;
109
+ const std::size_t width_a = i - start_a;
110
+ const std::size_t width_b = j - start_b;
111
+ return width_a == width_b ? 0 : (width_a < width_b ? -1 : 1);
112
+ }
113
+
114
+ bool natural_less(const ComicPage &left, const ComicPage &right) {
115
+ const std::string &a = left.normalized_name;
116
+ const std::string &b = right.normalized_name;
117
+ std::size_t i = 0, j = 0;
118
+ while (i < a.size() && j < b.size()) {
119
+ const unsigned char ca = static_cast<unsigned char>(a[i]);
120
+ const unsigned char cb = static_cast<unsigned char>(b[j]);
121
+ if (std::isdigit(ca) && std::isdigit(cb)) {
122
+ const int comparison = compare_digit_runs(a, i, b, j);
123
+ if (comparison != 0) return comparison < 0;
124
+ continue;
125
+ }
126
+ const unsigned char lower_a = static_cast<unsigned char>(std::tolower(ca));
127
+ const unsigned char lower_b = static_cast<unsigned char>(std::tolower(cb));
128
+ if (lower_a != lower_b) return lower_a < lower_b;
129
+ ++i;
130
+ ++j;
131
+ }
132
+ if (a.size() != b.size()) return a.size() < b.size();
133
+ return left.name < right.name;
134
+ }
135
+
136
+ struct ArchiveDeleter {
137
+ void operator()(archive *reader) const { if (reader) archive_read_free(reader); }
138
+ };
139
+ using Reader = std::unique_ptr<archive, ArchiveDeleter>;
140
+
141
+ Reader new_reader(std::string &error) {
142
+ Reader reader(archive_read_new());
143
+ if (!reader) {
144
+ error = "Unable to allocate archive reader";
145
+ return nullptr;
146
+ }
147
+ archive_read_support_filter_none(reader.get());
148
+ archive_read_support_format_zip(reader.get());
149
+ archive_read_support_format_rar(reader.get());
150
+ archive_read_support_format_rar5(reader.get());
151
+ return reader;
152
+ }
153
+
154
+ std::shared_ptr<ComicDocument> find_document(const char *engine_id, int generation) {
155
+ std::lock_guard<std::mutex> guard(g_documents_lock);
156
+ const auto found = g_documents.find(key_for(engine_id, generation));
157
+ return found == g_documents.end() ? nullptr : found->second;
158
+ }
159
+
160
+ void prune_disk_cache(const fs::path &directory, const fs::path &preserve) {
161
+ std::lock_guard<std::mutex> cache_guard(g_cache_lock);
162
+ std::error_code error;
163
+ if (!fs::exists(directory, error)) return;
164
+ struct CacheFile { fs::path path; std::uint64_t size; fs::file_time_type time; };
165
+ std::vector<CacheFile> files;
166
+ std::uint64_t total = 0;
167
+ for (const auto &item : fs::directory_iterator(directory, error)) {
168
+ if (error || !item.is_regular_file()) continue;
169
+ const std::string name = item.path().filename().string();
170
+ if (name.find("papyrus-comic-page-") != 0) continue;
171
+ const std::uint64_t size = item.file_size(error);
172
+ if (error) { error.clear(); continue; }
173
+ total += size;
174
+ files.push_back({item.path(), size, item.last_write_time(error)});
175
+ if (error) error.clear();
176
+ }
177
+ std::sort(files.begin(), files.end(), [](const CacheFile &a, const CacheFile &b) { return a.time < b.time; });
178
+ for (const auto &file : files) {
179
+ if (total <= kMaximumExtractedPageCacheBytes) break;
180
+ if (file.path == preserve) continue;
181
+ if (fs::remove(file.path, error)) total -= file.size;
182
+ error.clear();
183
+ }
184
+ }
185
+ } // namespace
186
+
187
+ extern "C" int papyrus_comic_open(const char *engine_id,
188
+ int generation,
189
+ const char *archive_path,
190
+ const char *cache_dir,
191
+ int *page_count,
192
+ char *error_buffer,
193
+ size_t error_buffer_size) {
194
+ if (!engine_id || !*engine_id || !archive_path || !cache_dir) {
195
+ write_error(error_buffer, error_buffer_size, "Missing comic archive identity or path");
196
+ return 0;
197
+ }
198
+ auto document = std::make_shared<ComicDocument>();
199
+ document->engine_id = engine_id;
200
+ document->generation = generation;
201
+ document->archive_path = archive_path;
202
+ document->cache_dir = cache_dir;
203
+
204
+ std::string message;
205
+ Reader reader = new_reader(message);
206
+ if (!reader || archive_read_open_filename(reader.get(), archive_path, kIoBlockSize) != ARCHIVE_OK) {
207
+ write_error(error_buffer, error_buffer_size, reader ? archive_error_string(reader.get()) : message);
208
+ return 0;
209
+ }
210
+
211
+ archive_entry *entry = nullptr;
212
+ std::size_t ordinal = 0;
213
+ for (;;) {
214
+ const int status = archive_read_next_header(reader.get(), &entry);
215
+ if (status == ARCHIVE_EOF) break;
216
+ if (status != ARCHIVE_OK && status != ARCHIVE_WARN) {
217
+ const char *archive_error = archive_error_string(reader.get());
218
+ write_error(error_buffer, error_buffer_size, archive_error ? archive_error : "Corrupt comic archive");
219
+ return 0;
220
+ }
221
+ const char *raw_name = archive_entry_pathname_utf8(entry);
222
+ if (!raw_name) raw_name = archive_entry_pathname(entry);
223
+ const std::string name = raw_name ? normalize_path(raw_name) : std::string();
224
+ const la_int64_t declared_size = archive_entry_size(entry);
225
+ if (archive_entry_filetype(entry) == AE_IFREG && !archive_entry_symlink(entry) &&
226
+ !archive_entry_hardlink(entry) && is_supported_image(name) &&
227
+ declared_size >= 0 && static_cast<std::uint64_t>(declared_size) <= kMaximumEntryBytes) {
228
+ document->pages.push_back({name, name, static_cast<std::uint64_t>(declared_size), ordinal});
229
+ if (document->pages.size() > kMaximumEntries) {
230
+ write_error(error_buffer, error_buffer_size, "Comic archive has too many page entries");
231
+ return 0;
232
+ }
233
+ }
234
+ archive_read_data_skip(reader.get());
235
+ ++ordinal;
236
+ if (ordinal > kMaximumArchiveEntries) {
237
+ write_error(error_buffer, error_buffer_size, "Comic archive has too many entries");
238
+ return 0;
239
+ }
240
+ }
241
+ if (document->pages.empty()) {
242
+ write_error(error_buffer, error_buffer_size, "Comic archive contains no supported image pages");
243
+ return 0;
244
+ }
245
+ std::stable_sort(document->pages.begin(), document->pages.end(), natural_less);
246
+ std::error_code error;
247
+ fs::create_directories(document->cache_dir, error);
248
+ if (error) {
249
+ write_error(error_buffer, error_buffer_size, "Unable to create comic page cache");
250
+ return 0;
251
+ }
252
+ {
253
+ std::lock_guard<std::mutex> guard(g_documents_lock);
254
+ const std::string key = key_for(engine_id, generation);
255
+ g_documents[key] = document;
256
+ }
257
+ if (page_count) *page_count = static_cast<int>(document->pages.size());
258
+ return 1;
259
+ }
260
+
261
+ extern "C" int papyrus_comic_extract_page(const char *engine_id,
262
+ int generation,
263
+ int page_index,
264
+ char *output_path,
265
+ size_t output_path_size,
266
+ char *error_buffer,
267
+ size_t error_buffer_size) {
268
+ auto document = find_document(engine_id, generation);
269
+ if (!document || page_index < 0 || static_cast<std::size_t>(page_index) >= document->pages.size()) {
270
+ write_error(error_buffer, error_buffer_size, "Comic page is unavailable");
271
+ return 0;
272
+ }
273
+ std::lock_guard<std::mutex> guard(document->lock);
274
+ const ComicPage &page = document->pages[static_cast<std::size_t>(page_index)];
275
+ std::string extension = fs::path(page.name).extension().string();
276
+ std::string filename = "papyrus-comic-page-" + std::to_string(std::hash<std::string>{}(document->engine_id)) +
277
+ "-" + std::to_string(generation) + "-" + std::to_string(page_index) + extension;
278
+ fs::path destination = document->cache_dir / filename;
279
+ std::error_code filesystem_error;
280
+ if (fs::is_regular_file(destination, filesystem_error) && fs::file_size(destination, filesystem_error) <= kMaximumEntryBytes) {
281
+ fs::last_write_time(destination, fs::file_time_type::clock::now(), filesystem_error);
282
+ const std::string value = destination.string();
283
+ if (output_path && value.size() + 1 <= output_path_size) {
284
+ std::copy(value.begin(), value.end(), output_path);
285
+ output_path[value.size()] = '\0';
286
+ return 1;
287
+ }
288
+ write_error(error_buffer, error_buffer_size, "Output path buffer is too small");
289
+ return 0;
290
+ }
291
+
292
+ std::string message;
293
+ Reader reader = new_reader(message);
294
+ if (!reader || archive_read_open_filename(reader.get(), document->archive_path.string().c_str(), kIoBlockSize) != ARCHIVE_OK) {
295
+ write_error(error_buffer, error_buffer_size, reader ? archive_error_string(reader.get()) : message);
296
+ return 0;
297
+ }
298
+ archive_entry *entry = nullptr;
299
+ std::size_t ordinal = 0;
300
+ while (ordinal <= page.archive_ordinal) {
301
+ const int status = archive_read_next_header(reader.get(), &entry);
302
+ if (status != ARCHIVE_OK && status != ARCHIVE_WARN) {
303
+ const char *archive_error = archive_error_string(reader.get());
304
+ write_error(error_buffer, error_buffer_size, archive_error ? archive_error : "Unable to read comic page entry");
305
+ return 0;
306
+ }
307
+ if (ordinal < page.archive_ordinal) {
308
+ archive_read_data_skip(reader.get());
309
+ ++ordinal;
310
+ continue;
311
+ }
312
+ if (archive_entry_is_encrypted(entry) == 1) {
313
+ write_error(error_buffer, error_buffer_size, "Encrypted comic pages are not supported");
314
+ return 0;
315
+ }
316
+ std::ofstream output(destination, std::ios::binary | std::ios::trunc);
317
+ if (!output) {
318
+ write_error(error_buffer, error_buffer_size, "Unable to create comic page cache file");
319
+ return 0;
320
+ }
321
+ char buffer[kIoBlockSize];
322
+ std::uint64_t total = 0;
323
+ for (;;) {
324
+ const la_ssize_t count = archive_read_data(reader.get(), buffer, sizeof(buffer));
325
+ if (count == 0) break;
326
+ if (count < 0) {
327
+ output.close();
328
+ fs::remove(destination, filesystem_error);
329
+ const char *archive_error = archive_error_string(reader.get());
330
+ write_error(error_buffer, error_buffer_size, archive_error ? archive_error : "Unable to extract comic page");
331
+ return 0;
332
+ }
333
+ total += static_cast<std::uint64_t>(count);
334
+ if (total > kMaximumEntryBytes) {
335
+ output.close();
336
+ fs::remove(destination, filesystem_error);
337
+ write_error(error_buffer, error_buffer_size, "Comic page exceeds the 64 MiB size limit");
338
+ return 0;
339
+ }
340
+ output.write(buffer, count);
341
+ if (!output) {
342
+ output.close();
343
+ fs::remove(destination, filesystem_error);
344
+ write_error(error_buffer, error_buffer_size, "Failed while caching comic page");
345
+ return 0;
346
+ }
347
+ }
348
+ output.close();
349
+ break;
350
+ }
351
+
352
+ prune_disk_cache(document->cache_dir, destination);
353
+ const std::string value = destination.string();
354
+ if (!output_path || value.size() + 1 > output_path_size) {
355
+ write_error(error_buffer, error_buffer_size, "Output path buffer is too small");
356
+ return 0;
357
+ }
358
+ std::copy(value.begin(), value.end(), output_path);
359
+ output_path[value.size()] = '\0';
360
+ return 1;
361
+ }
362
+
363
+ extern "C" void papyrus_comic_close(const char *engine_id, int generation) {
364
+ if (!engine_id) return;
365
+ std::lock_guard<std::mutex> guard(g_documents_lock);
366
+ g_documents.erase(key_for(engine_id, generation));
367
+ }
368
+
369
+ extern "C" void papyrus_comic_close_engine(const char *engine_id) {
370
+ if (!engine_id) return;
371
+ std::lock_guard<std::mutex> guard(g_documents_lock);
372
+ for (auto iterator = g_documents.begin(); iterator != g_documents.end();) {
373
+ if (iterator->second->engine_id == engine_id) iterator = g_documents.erase(iterator);
374
+ else ++iterator;
375
+ }
376
+ }
@@ -0,0 +1,30 @@
1
+ #pragma once
2
+
3
+ #include <stddef.h>
4
+
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ int papyrus_comic_open(const char *engine_id,
10
+ int generation,
11
+ const char *archive_path,
12
+ const char *cache_dir,
13
+ int *page_count,
14
+ char *error_buffer,
15
+ size_t error_buffer_size);
16
+
17
+ int papyrus_comic_extract_page(const char *engine_id,
18
+ int generation,
19
+ int page_index,
20
+ char *output_path,
21
+ size_t output_path_size,
22
+ char *error_buffer,
23
+ size_t error_buffer_size);
24
+
25
+ void papyrus_comic_close(const char *engine_id, int generation);
26
+ void papyrus_comic_close_engine(const char *engine_id);
27
+
28
+ #ifdef __cplusplus
29
+ }
30
+ #endif
@@ -0,0 +1,15 @@
1
+ # Vendored libarchive subset
2
+
3
+ This source snapshot is libarchive **v3.8.9**, pinned to upstream commit
4
+ `27cbc7827172698143e440801fc0ba39ccb4f1f5` from
5
+ `https://github.com/libarchive/libarchive`.
6
+
7
+ Papyrus compiles only the read-side source subset listed in both
8
+ `android/src/main/cpp/CMakeLists.txt` and `PapyrusNativeEngine.podspec`.
9
+ The public C++ adapter in this directory filters comic archive entries,
10
+ orders them naturally, and extracts one selected image at a time to a bounded
11
+ cache. It does not write or modify archives.
12
+
13
+ The libarchive files retain their upstream notices. BLAKE2 reference source
14
+ files also carry the separate permissive notice in
15
+ `third_party_licenses/BLAKE2-NOTICE.txt`.