@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.
- package/PapyrusNativeEngine.podspec +45 -0
- package/android/build.gradle +1 -0
- package/android/src/main/cpp/CMakeLists.txt +137 -0
- package/android/src/main/cpp/PapyrusComicArchiveJni.cpp +68 -0
- package/android/src/main/cpp/PapyrusComicArchiveTest.cpp +55 -0
- package/android/src/main/cpp/papyrus_outline_loader_test.cpp +240 -0
- package/android/src/main/cpp/papyrus_text_word_test.cpp +72 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicArchiveNative.java +14 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentView.java +491 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentViewManager.java +32 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicPageLayout.java +38 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusNativeEngineModule.java +305 -35
- package/android/src/main/java/com/papyrus/engine/PapyrusNativeTextModel.java +195 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusPackage.java +3 -1
- package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerView.java +195 -5
- package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerViewManager.java +20 -1
- package/android/src/main/java/com/papyrus/engine/PapyrusSelectionMenuIcon.java +48 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextAnnotationModel.java +22 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentView.java +661 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentViewManager.java +49 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextStore.java +43 -0
- package/dist/index.d.mts +614 -4
- package/dist/index.d.ts +614 -4
- package/dist/index.js +484 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +477 -7
- package/dist/index.mjs.map +1 -1
- package/ios/PapyrusComicDocumentView.h +21 -0
- package/ios/PapyrusComicDocumentView.m +554 -0
- package/ios/PapyrusComicDocumentViewManager.m +23 -0
- package/ios/PapyrusEngineStore.h +3 -0
- package/ios/PapyrusEngineStore.m +32 -6
- package/ios/PapyrusNativeEngine.m +684 -5
- package/ios/PapyrusPageRotationRegistry.h +29 -0
- package/ios/PapyrusPageRotationRegistry.m +179 -0
- package/ios/PapyrusPageView.m +38 -11
- package/ios/PapyrusPdfDocumentView.h +55 -0
- package/ios/PapyrusPdfDocumentView.m +2370 -0
- package/ios/PapyrusPdfDocumentViewManager.m +61 -0
- package/ios/PapyrusPdfPageTheme.h +15 -0
- package/ios/PapyrusPdfPageTheme.m +218 -0
- package/ios/PapyrusSelectionMenu.h +27 -0
- package/ios/PapyrusTextAnnotationRange.h +2 -0
- package/ios/PapyrusTextAnnotationRange.m +29 -0
- package/ios/PapyrusTextDocumentView.h +32 -0
- package/ios/PapyrusTextDocumentView.m +518 -0
- package/ios/PapyrusTextDocumentViewManager.m +34 -0
- package/ios/PapyrusTextStore.h +13 -0
- package/ios/PapyrusTextStore.m +73 -0
- package/package.json +12 -10
- package/react-native.config.js +1 -1
- package/third_party_licenses/BLAKE2-NOTICE.txt +11 -0
- package/third_party_licenses/libarchive-COPYING +65 -0
- package/vendor/libarchive/PapyrusComicArchive.cpp +376 -0
- package/vendor/libarchive/PapyrusComicArchive.h +30 -0
- package/vendor/libarchive/README.papyrus.md +15 -0
- package/vendor/libarchive/android.h +192 -0
- package/vendor/libarchive/config/PapyrusArchiveConfig.h +71 -0
- package/vendor/libarchive/libarchive/CMakeLists.txt +293 -0
- package/vendor/libarchive/libarchive/android_lf.h +36 -0
- package/vendor/libarchive/libarchive/archive.h +1266 -0
- package/vendor/libarchive/libarchive/archive_acl.c +2025 -0
- package/vendor/libarchive/libarchive/archive_acl_private.h +85 -0
- package/vendor/libarchive/libarchive/archive_blake2.h +197 -0
- package/vendor/libarchive/libarchive/archive_blake2_impl.h +161 -0
- package/vendor/libarchive/libarchive/archive_blake2s_ref.c +369 -0
- package/vendor/libarchive/libarchive/archive_blake2sp_ref.c +361 -0
- package/vendor/libarchive/libarchive/archive_check_magic.c +183 -0
- package/vendor/libarchive/libarchive/archive_cmdline.c +211 -0
- package/vendor/libarchive/libarchive/archive_cmdline_private.h +45 -0
- package/vendor/libarchive/libarchive/archive_crc32.h +123 -0
- package/vendor/libarchive/libarchive/archive_cryptor.c +534 -0
- package/vendor/libarchive/libarchive/archive_cryptor_private.h +199 -0
- package/vendor/libarchive/libarchive/archive_digest.c +1584 -0
- package/vendor/libarchive/libarchive/archive_digest_private.h +431 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_darwin.c +558 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_freebsd.c +712 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_linux.c +760 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_sunos.c +824 -0
- package/vendor/libarchive/libarchive/archive_endian.h +234 -0
- package/vendor/libarchive/libarchive/archive_entry.3 +147 -0
- package/vendor/libarchive/libarchive/archive_entry.c +2297 -0
- package/vendor/libarchive/libarchive/archive_entry.h +763 -0
- package/vendor/libarchive/libarchive/archive_entry_acl.3 +458 -0
- package/vendor/libarchive/libarchive/archive_entry_copy_bhfi.c +55 -0
- package/vendor/libarchive/libarchive/archive_entry_copy_stat.c +82 -0
- package/vendor/libarchive/libarchive/archive_entry_link_resolver.c +472 -0
- package/vendor/libarchive/libarchive/archive_entry_linkify.3 +224 -0
- package/vendor/libarchive/libarchive/archive_entry_locale.h +90 -0
- package/vendor/libarchive/libarchive/archive_entry_misc.3 +63 -0
- package/vendor/libarchive/libarchive/archive_entry_paths.3 +153 -0
- package/vendor/libarchive/libarchive/archive_entry_perms.3 +210 -0
- package/vendor/libarchive/libarchive/archive_entry_private.h +205 -0
- package/vendor/libarchive/libarchive/archive_entry_sparse.c +156 -0
- package/vendor/libarchive/libarchive/archive_entry_stat.3 +274 -0
- package/vendor/libarchive/libarchive/archive_entry_stat.c +121 -0
- package/vendor/libarchive/libarchive/archive_entry_strmode.c +69 -0
- package/vendor/libarchive/libarchive/archive_entry_time.3 +127 -0
- package/vendor/libarchive/libarchive/archive_entry_xattr.c +155 -0
- package/vendor/libarchive/libarchive/archive_hmac.c +345 -0
- package/vendor/libarchive/libarchive/archive_hmac_private.h +119 -0
- package/vendor/libarchive/libarchive/archive_integer.h +267 -0
- package/vendor/libarchive/libarchive/archive_match.c +1869 -0
- package/vendor/libarchive/libarchive/archive_openssl_evp_private.h +54 -0
- package/vendor/libarchive/libarchive/archive_openssl_hmac_private.h +54 -0
- package/vendor/libarchive/libarchive/archive_options.c +219 -0
- package/vendor/libarchive/libarchive/archive_options_private.h +49 -0
- package/vendor/libarchive/libarchive/archive_pack_dev.c +330 -0
- package/vendor/libarchive/libarchive/archive_pack_dev.h +49 -0
- package/vendor/libarchive/libarchive/archive_parse_date.c +1173 -0
- package/vendor/libarchive/libarchive/archive_pathmatch.c +480 -0
- package/vendor/libarchive/libarchive/archive_pathmatch.h +50 -0
- package/vendor/libarchive/libarchive/archive_platform.h +213 -0
- package/vendor/libarchive/libarchive/archive_platform_acl.h +53 -0
- package/vendor/libarchive/libarchive/archive_platform_stat.h +45 -0
- package/vendor/libarchive/libarchive/archive_platform_xattr.h +45 -0
- package/vendor/libarchive/libarchive/archive_ppmd7.c +1173 -0
- package/vendor/libarchive/libarchive/archive_ppmd7_private.h +119 -0
- package/vendor/libarchive/libarchive/archive_ppmd8.c +1293 -0
- package/vendor/libarchive/libarchive/archive_ppmd8_private.h +123 -0
- package/vendor/libarchive/libarchive/archive_ppmd_private.h +159 -0
- package/vendor/libarchive/libarchive/archive_private.h +209 -0
- package/vendor/libarchive/libarchive/archive_random.c +274 -0
- package/vendor/libarchive/libarchive/archive_random_private.h +36 -0
- package/vendor/libarchive/libarchive/archive_rb.c +709 -0
- package/vendor/libarchive/libarchive/archive_rb.h +113 -0
- package/vendor/libarchive/libarchive/archive_read.3 +250 -0
- package/vendor/libarchive/libarchive/archive_read.c +1814 -0
- package/vendor/libarchive/libarchive/archive_read_add_passphrase.3 +72 -0
- package/vendor/libarchive/libarchive/archive_read_add_passphrase.c +189 -0
- package/vendor/libarchive/libarchive/archive_read_append_filter.c +209 -0
- package/vendor/libarchive/libarchive/archive_read_data.3 +128 -0
- package/vendor/libarchive/libarchive/archive_read_data_into_fd.c +207 -0
- package/vendor/libarchive/libarchive/archive_read_disk.3 +422 -0
- package/vendor/libarchive/libarchive/archive_read_disk_entry_from_file.c +1086 -0
- package/vendor/libarchive/libarchive/archive_read_disk_posix.c +2639 -0
- package/vendor/libarchive/libarchive/archive_read_disk_private.h +97 -0
- package/vendor/libarchive/libarchive/archive_read_disk_set_standard_lookup.c +315 -0
- package/vendor/libarchive/libarchive/archive_read_disk_windows.c +2603 -0
- package/vendor/libarchive/libarchive/archive_read_extract.3 +135 -0
- package/vendor/libarchive/libarchive/archive_read_extract.c +59 -0
- package/vendor/libarchive/libarchive/archive_read_extract2.c +154 -0
- package/vendor/libarchive/libarchive/archive_read_filter.3 +163 -0
- package/vendor/libarchive/libarchive/archive_read_format.3 +190 -0
- package/vendor/libarchive/libarchive/archive_read_free.3 +91 -0
- package/vendor/libarchive/libarchive/archive_read_header.3 +89 -0
- package/vendor/libarchive/libarchive/archive_read_new.3 +57 -0
- package/vendor/libarchive/libarchive/archive_read_open.3 +247 -0
- package/vendor/libarchive/libarchive/archive_read_open_fd.c +236 -0
- package/vendor/libarchive/libarchive/archive_read_open_file.c +257 -0
- package/vendor/libarchive/libarchive/archive_read_open_filename.c +652 -0
- package/vendor/libarchive/libarchive/archive_read_open_memory.c +188 -0
- package/vendor/libarchive/libarchive/archive_read_private.h +274 -0
- package/vendor/libarchive/libarchive/archive_read_set_format.c +116 -0
- package/vendor/libarchive/libarchive/archive_read_set_options.3 +290 -0
- package/vendor/libarchive/libarchive/archive_read_set_options.c +132 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_all.c +84 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_by_code.c +68 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_bzip2.c +360 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_compress.c +457 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_grzip.c +108 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_gzip.c +538 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_lrzip.c +119 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_lz4.c +829 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_lzop.c +493 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_none.c +51 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_program.c +497 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_rpm.c +249 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_uu.c +739 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_xz.c +792 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_zstd.c +356 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_7zip.c +4650 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_all.c +88 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_ar.c +597 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_by_code.c +76 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_cab.c +3410 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_cpio.c +1152 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_empty.c +95 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_iso9660.c +3516 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_lha.c +2931 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_mtree.c +2113 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_rar.c +3932 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_rar5.c +4501 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_raw.c +194 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_tar.c +3785 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_warc.c +875 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_xar.c +3770 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_zip.c +4710 -0
- package/vendor/libarchive/libarchive/archive_string.c +4391 -0
- package/vendor/libarchive/libarchive/archive_string.h +244 -0
- package/vendor/libarchive/libarchive/archive_string_composition.h +2289 -0
- package/vendor/libarchive/libarchive/archive_string_sprintf.c +200 -0
- package/vendor/libarchive/libarchive/archive_time.c +168 -0
- package/vendor/libarchive/libarchive/archive_time_private.h +47 -0
- package/vendor/libarchive/libarchive/archive_util.3 +239 -0
- package/vendor/libarchive/libarchive/archive_util.c +668 -0
- package/vendor/libarchive/libarchive/archive_version_details.c +516 -0
- package/vendor/libarchive/libarchive/archive_virtual.c +162 -0
- package/vendor/libarchive/libarchive/archive_windows.c +1035 -0
- package/vendor/libarchive/libarchive/archive_windows.h +332 -0
- package/vendor/libarchive/libarchive/archive_write.3 +266 -0
- package/vendor/libarchive/libarchive/archive_write.c +896 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter.c +71 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_b64encode.c +329 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_by_name.c +76 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_bzip2.c +411 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_compress.c +459 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_grzip.c +143 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_gzip.c +493 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_lrzip.c +214 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_lz4.c +710 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_lzop.c +500 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_none.c +42 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_program.c +398 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_uuencode.c +320 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_xz.c +547 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_zstd.c +608 -0
- package/vendor/libarchive/libarchive/archive_write_blocksize.3 +112 -0
- package/vendor/libarchive/libarchive/archive_write_data.3 +88 -0
- package/vendor/libarchive/libarchive/archive_write_disk.3 +360 -0
- package/vendor/libarchive/libarchive/archive_write_disk_posix.c +4789 -0
- package/vendor/libarchive/libarchive/archive_write_disk_private.h +43 -0
- package/vendor/libarchive/libarchive/archive_write_disk_set_standard_lookup.c +265 -0
- package/vendor/libarchive/libarchive/archive_write_disk_windows.c +2952 -0
- package/vendor/libarchive/libarchive/archive_write_filter.3 +140 -0
- package/vendor/libarchive/libarchive/archive_write_finish_entry.3 +77 -0
- package/vendor/libarchive/libarchive/archive_write_format.3 +187 -0
- package/vendor/libarchive/libarchive/archive_write_free.3 +94 -0
- package/vendor/libarchive/libarchive/archive_write_header.3 +71 -0
- package/vendor/libarchive/libarchive/archive_write_new.3 +56 -0
- package/vendor/libarchive/libarchive/archive_write_open.3 +270 -0
- package/vendor/libarchive/libarchive/archive_write_open_fd.c +141 -0
- package/vendor/libarchive/libarchive/archive_write_open_file.c +102 -0
- package/vendor/libarchive/libarchive/archive_write_open_filename.c +272 -0
- package/vendor/libarchive/libarchive/archive_write_open_memory.c +110 -0
- package/vendor/libarchive/libarchive/archive_write_private.h +166 -0
- package/vendor/libarchive/libarchive/archive_write_set_format.c +124 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_7zip.c +2571 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_ar.c +540 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_by_name.c +93 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio.c +11 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio_binary.c +618 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio_newc.c +457 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio_odc.c +508 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_filter_by_ext.c +141 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_gnutar.c +790 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_iso9660.c +8216 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_mtree.c +2307 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_pax.c +2249 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_private.h +40 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_raw.c +123 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_shar.c +650 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_ustar.c +768 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_v7tar.c +648 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_warc.c +491 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_xar.c +3799 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_zip.c +2548 -0
- package/vendor/libarchive/libarchive/archive_write_set_options.3 +779 -0
- package/vendor/libarchive/libarchive/archive_write_set_options.c +129 -0
- package/vendor/libarchive/libarchive/archive_write_set_passphrase.3 +72 -0
- package/vendor/libarchive/libarchive/archive_write_set_passphrase.c +95 -0
- package/vendor/libarchive/libarchive/archive_xxhash.h +48 -0
- package/vendor/libarchive/libarchive/config_freebsd.h +275 -0
- package/vendor/libarchive/libarchive/cpio.5 +389 -0
- package/vendor/libarchive/libarchive/filter_fork.h +44 -0
- package/vendor/libarchive/libarchive/filter_fork_posix.c +269 -0
- package/vendor/libarchive/libarchive/filter_fork_windows.c +270 -0
- package/vendor/libarchive/libarchive/libarchive-formats.5 +478 -0
- package/vendor/libarchive/libarchive/libarchive.3 +297 -0
- package/vendor/libarchive/libarchive/libarchive_changes.3 +339 -0
- package/vendor/libarchive/libarchive/libarchive_internals.3 +363 -0
- package/vendor/libarchive/libarchive/module.modulemap +34 -0
- package/vendor/libarchive/libarchive/mtree.5 +323 -0
- package/vendor/libarchive/libarchive/tar.5 +947 -0
- package/vendor/libarchive/libarchive/xxhash.c +531 -0
- package/ios/PapyrusNativeEngine.podspec +0 -15
|
@@ -0,0 +1,91 @@
|
|
|
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 2, 2012
|
|
26
|
+
.Dt ARCHIVE_READ_FREE 3
|
|
27
|
+
.Os
|
|
28
|
+
.Sh NAME
|
|
29
|
+
.Nm archive_read_close ,
|
|
30
|
+
.Nm archive_read_finish ,
|
|
31
|
+
.Nm archive_read_free
|
|
32
|
+
.Nd functions for reading streaming archives
|
|
33
|
+
.Sh LIBRARY
|
|
34
|
+
Streaming Archive Library (libarchive, -larchive)
|
|
35
|
+
.Sh SYNOPSIS
|
|
36
|
+
.In archive.h
|
|
37
|
+
.Ft int
|
|
38
|
+
.Fn archive_read_close "struct archive *"
|
|
39
|
+
.Ft int
|
|
40
|
+
.Fn archive_read_finish "struct archive *"
|
|
41
|
+
.Ft int
|
|
42
|
+
.Fn archive_read_free "struct archive *"
|
|
43
|
+
.\"
|
|
44
|
+
.Sh DESCRIPTION
|
|
45
|
+
.Bl -tag -compact -width indent
|
|
46
|
+
.It Fn archive_read_close
|
|
47
|
+
Complete the archive and invoke the close callback.
|
|
48
|
+
.It Fn archive_read_finish
|
|
49
|
+
This is a deprecated synonym for
|
|
50
|
+
.Fn archive_read_free .
|
|
51
|
+
The new name was introduced with libarchive 3.0.
|
|
52
|
+
Applications that need to compile with either libarchive 2
|
|
53
|
+
or libarchive 3 should continue to use the
|
|
54
|
+
.Fn archive_read_finish
|
|
55
|
+
name.
|
|
56
|
+
Both names will be supported until libarchive 4.0 is
|
|
57
|
+
released, which is not expected to occur earlier
|
|
58
|
+
than 2013.
|
|
59
|
+
.It Fn archive_read_free
|
|
60
|
+
Invokes
|
|
61
|
+
.Fn archive_read_close
|
|
62
|
+
if it was not invoked manually, then release all resources.
|
|
63
|
+
Note: In libarchive 1.x, this function was declared to return
|
|
64
|
+
.Ft void ,
|
|
65
|
+
which made it impossible to detect certain errors when
|
|
66
|
+
.Fn archive_read_close
|
|
67
|
+
was invoked implicitly from this function.
|
|
68
|
+
The declaration is corrected beginning with libarchive 2.0.
|
|
69
|
+
.El
|
|
70
|
+
.Sh RETURN VALUES
|
|
71
|
+
These functions return
|
|
72
|
+
.Cm ARCHIVE_OK
|
|
73
|
+
on success, or
|
|
74
|
+
.Cm ARCHIVE_FATAL .
|
|
75
|
+
.\"
|
|
76
|
+
.Sh ERRORS
|
|
77
|
+
Detailed error codes and textual descriptions are available from the
|
|
78
|
+
.Fn archive_errno
|
|
79
|
+
and
|
|
80
|
+
.Fn archive_error_string
|
|
81
|
+
functions.
|
|
82
|
+
.\"
|
|
83
|
+
.Sh SEE ALSO
|
|
84
|
+
.Xr archive_read_data 3 ,
|
|
85
|
+
.Xr archive_read_filter 3 ,
|
|
86
|
+
.Xr archive_read_format 3 ,
|
|
87
|
+
.Xr archive_read_new 3 ,
|
|
88
|
+
.Xr archive_read_open 3 ,
|
|
89
|
+
.Xr archive_read_set_options 3 ,
|
|
90
|
+
.Xr archive_util 3 ,
|
|
91
|
+
.Xr libarchive 3
|
|
@@ -0,0 +1,89 @@
|
|
|
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 2, 2012
|
|
26
|
+
.Dt ARCHIVE_READ_HEADER 3
|
|
27
|
+
.Os
|
|
28
|
+
.Sh NAME
|
|
29
|
+
.Nm archive_read_next_header ,
|
|
30
|
+
.Nm archive_read_next_header2
|
|
31
|
+
.Nd functions for reading streaming archives
|
|
32
|
+
.Sh LIBRARY
|
|
33
|
+
Streaming Archive Library (libarchive, -larchive)
|
|
34
|
+
.Sh SYNOPSIS
|
|
35
|
+
.In archive.h
|
|
36
|
+
.Ft int
|
|
37
|
+
.Fn archive_read_next_header "struct archive *" "struct archive_entry **"
|
|
38
|
+
.Ft int
|
|
39
|
+
.Fn archive_read_next_header2 "struct archive *" "struct archive_entry *"
|
|
40
|
+
.\"
|
|
41
|
+
.Sh DESCRIPTION
|
|
42
|
+
.Bl -tag -compact -width indent
|
|
43
|
+
.It Fn archive_read_next_header
|
|
44
|
+
Read the header for the next entry and return a pointer to
|
|
45
|
+
a
|
|
46
|
+
.Tn struct archive_entry .
|
|
47
|
+
This is a convenience wrapper around
|
|
48
|
+
.Fn archive_read_next_header2
|
|
49
|
+
that reuses an internal
|
|
50
|
+
.Tn struct archive_entry
|
|
51
|
+
object for each request.
|
|
52
|
+
.It Fn archive_read_next_header2
|
|
53
|
+
Read the header for the next entry and populate the provided
|
|
54
|
+
.Tn struct archive_entry .
|
|
55
|
+
.El
|
|
56
|
+
.\"
|
|
57
|
+
.Sh RETURN VALUES
|
|
58
|
+
These functions return
|
|
59
|
+
.Cm ARCHIVE_OK
|
|
60
|
+
(the operation succeeded),
|
|
61
|
+
.Cm ARCHIVE_WARN
|
|
62
|
+
(the operation succeeded but a non-critical error was encountered),
|
|
63
|
+
.Cm ARCHIVE_EOF
|
|
64
|
+
(end-of-archive was encountered),
|
|
65
|
+
.Cm ARCHIVE_RETRY
|
|
66
|
+
(the operation failed but can be retried),
|
|
67
|
+
and
|
|
68
|
+
.Cm ARCHIVE_FATAL
|
|
69
|
+
(there was a fatal error; the archive should be closed immediately).
|
|
70
|
+
.\"
|
|
71
|
+
.Sh ERRORS
|
|
72
|
+
Detailed error codes and textual descriptions are available from the
|
|
73
|
+
.Fn archive_errno
|
|
74
|
+
and
|
|
75
|
+
.Fn archive_error_string
|
|
76
|
+
functions.
|
|
77
|
+
.\"
|
|
78
|
+
.Sh SEE ALSO
|
|
79
|
+
.Xr tar 1 ,
|
|
80
|
+
.Xr archive_read 3 ,
|
|
81
|
+
.Xr archive_read_data 3 ,
|
|
82
|
+
.Xr archive_read_extract 3 ,
|
|
83
|
+
.Xr archive_read_filter 3 ,
|
|
84
|
+
.Xr archive_read_format 3 ,
|
|
85
|
+
.Xr archive_read_open 3 ,
|
|
86
|
+
.Xr archive_read_set_options 3 ,
|
|
87
|
+
.Xr archive_util 3 ,
|
|
88
|
+
.Xr libarchive 3 ,
|
|
89
|
+
.Xr tar 5
|
|
@@ -0,0 +1,57 @@
|
|
|
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 2, 2012
|
|
26
|
+
.Dt ARCHIVE_READ_NEW 3
|
|
27
|
+
.Os
|
|
28
|
+
.Sh NAME
|
|
29
|
+
.Nm archive_read_new
|
|
30
|
+
.Nd functions for reading streaming archives
|
|
31
|
+
.Sh LIBRARY
|
|
32
|
+
Streaming Archive Library (libarchive, -larchive)
|
|
33
|
+
.Sh SYNOPSIS
|
|
34
|
+
.In archive.h
|
|
35
|
+
.Ft struct archive *
|
|
36
|
+
.Fn archive_read_new "void"
|
|
37
|
+
.Sh DESCRIPTION
|
|
38
|
+
Allocates and initializes a
|
|
39
|
+
.Tn struct archive
|
|
40
|
+
object suitable for reading from an archive.
|
|
41
|
+
.Dv NULL
|
|
42
|
+
is returned on error.
|
|
43
|
+
.Pp
|
|
44
|
+
A complete description of the
|
|
45
|
+
.Tn struct archive
|
|
46
|
+
object can be found in the overview manual page for
|
|
47
|
+
.Xr libarchive 3 .
|
|
48
|
+
.\" .Sh ERRORS
|
|
49
|
+
.Sh SEE ALSO
|
|
50
|
+
.Xr tar 1 ,
|
|
51
|
+
.Xr archive_read_data 3 ,
|
|
52
|
+
.Xr archive_read_filter 3 ,
|
|
53
|
+
.Xr archive_read_format 3 ,
|
|
54
|
+
.Xr archive_read_set_options 3 ,
|
|
55
|
+
.Xr archive_util 3 ,
|
|
56
|
+
.Xr libarchive 3 ,
|
|
57
|
+
.Xr tar 5
|
|
@@ -0,0 +1,247 @@
|
|
|
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 2, 2012
|
|
26
|
+
.Dt ARCHIVE_READ_OPEN 3
|
|
27
|
+
.Os
|
|
28
|
+
.Sh NAME
|
|
29
|
+
.Nm archive_read_open ,
|
|
30
|
+
.Nm archive_read_open2 ,
|
|
31
|
+
.Nm archive_read_open_fd ,
|
|
32
|
+
.Nm archive_read_open_FILE ,
|
|
33
|
+
.Nm archive_read_open_filename ,
|
|
34
|
+
.Nm archive_read_open_filenames ,
|
|
35
|
+
.Nm archive_read_open_memory
|
|
36
|
+
.Nd functions for reading streaming archives
|
|
37
|
+
.Sh LIBRARY
|
|
38
|
+
Streaming Archive Library (libarchive, -larchive)
|
|
39
|
+
.Sh SYNOPSIS
|
|
40
|
+
.In archive.h
|
|
41
|
+
.Ft int
|
|
42
|
+
.Fo archive_read_open
|
|
43
|
+
.Fa "struct archive *"
|
|
44
|
+
.Fa "void *client_data"
|
|
45
|
+
.Fa "archive_open_callback *"
|
|
46
|
+
.Fa "archive_read_callback *"
|
|
47
|
+
.Fa "archive_close_callback *"
|
|
48
|
+
.Fc
|
|
49
|
+
.Ft int
|
|
50
|
+
.Fo archive_read_open2
|
|
51
|
+
.Fa "struct archive *"
|
|
52
|
+
.Fa "void *client_data"
|
|
53
|
+
.Fa "archive_open_callback *"
|
|
54
|
+
.Fa "archive_read_callback *"
|
|
55
|
+
.Fa "archive_skip_callback *"
|
|
56
|
+
.Fa "archive_close_callback *"
|
|
57
|
+
.Fc
|
|
58
|
+
.Ft int
|
|
59
|
+
.Fn archive_read_open_FILE "struct archive *" "FILE *file"
|
|
60
|
+
.Ft int
|
|
61
|
+
.Fn archive_read_open_fd "struct archive *" "int fd" "size_t block_size"
|
|
62
|
+
.Ft int
|
|
63
|
+
.Fo archive_read_open_filename
|
|
64
|
+
.Fa "struct archive *"
|
|
65
|
+
.Fa "const char *filename"
|
|
66
|
+
.Fa "size_t block_size"
|
|
67
|
+
.Fc
|
|
68
|
+
.Ft int
|
|
69
|
+
.Fo archive_read_open_filenames
|
|
70
|
+
.Fa "struct archive *"
|
|
71
|
+
.Fa "const char **filenames"
|
|
72
|
+
.Fa "size_t block_size"
|
|
73
|
+
.Fc
|
|
74
|
+
.Ft int
|
|
75
|
+
.Fn archive_read_open_memory "struct archive *" "const void *buff" "size_t size"
|
|
76
|
+
.Sh DESCRIPTION
|
|
77
|
+
.Bl -tag -compact -width indent
|
|
78
|
+
.It Fn archive_read_open
|
|
79
|
+
The same as
|
|
80
|
+
.Fn archive_read_open2 ,
|
|
81
|
+
except that the skip callback is assumed to be
|
|
82
|
+
.Dv NULL .
|
|
83
|
+
.It Fn archive_read_open2
|
|
84
|
+
Freeze the settings, open the archive, and prepare for reading entries.
|
|
85
|
+
This is the most generic version of this call, which accepts
|
|
86
|
+
four callback functions.
|
|
87
|
+
Most clients will want to use
|
|
88
|
+
.Fn archive_read_open_filename ,
|
|
89
|
+
.Fn archive_read_open_FILE ,
|
|
90
|
+
.Fn archive_read_open_fd ,
|
|
91
|
+
or
|
|
92
|
+
.Fn archive_read_open_memory
|
|
93
|
+
instead.
|
|
94
|
+
The library invokes the client-provided functions to obtain
|
|
95
|
+
raw bytes from the archive.
|
|
96
|
+
.It Fn archive_read_open_FILE
|
|
97
|
+
Like
|
|
98
|
+
.Fn archive_read_open ,
|
|
99
|
+
except that it accepts a
|
|
100
|
+
.Ft "FILE *"
|
|
101
|
+
pointer.
|
|
102
|
+
This function should not be used with tape drives or other devices
|
|
103
|
+
that require strict I/O blocking.
|
|
104
|
+
.It Fn archive_read_open_fd
|
|
105
|
+
Like
|
|
106
|
+
.Fn archive_read_open ,
|
|
107
|
+
except that it accepts a file descriptor and block size rather than
|
|
108
|
+
a set of function pointers.
|
|
109
|
+
Note that the file descriptor will not be automatically closed at
|
|
110
|
+
end-of-archive.
|
|
111
|
+
This function is safe for use with tape drives or other blocked devices.
|
|
112
|
+
.It Fn archive_read_open_file
|
|
113
|
+
This is a deprecated synonym for
|
|
114
|
+
.Fn archive_read_open_filename .
|
|
115
|
+
.It Fn archive_read_open_filename
|
|
116
|
+
Like
|
|
117
|
+
.Fn archive_read_open ,
|
|
118
|
+
except that it accepts a simple filename and a block size.
|
|
119
|
+
A NULL filename represents standard input.
|
|
120
|
+
This function is safe for use with tape drives or other blocked devices.
|
|
121
|
+
.It Fn archive_read_open_filenames
|
|
122
|
+
Like
|
|
123
|
+
.Fn archive_read_open ,
|
|
124
|
+
except that it accepts a NULL-terminated array of filenames to open in
|
|
125
|
+
sequence (as would be created by the
|
|
126
|
+
.Xr split 1
|
|
127
|
+
command) and a block size.
|
|
128
|
+
A NULL filename at the beginning of the array represents standard input.
|
|
129
|
+
This function is safe for use with tape drives or other blocked devices.
|
|
130
|
+
.It Fn archive_read_open_memory
|
|
131
|
+
Like
|
|
132
|
+
.Fn archive_read_open ,
|
|
133
|
+
except that it accepts a pointer and size of a block of
|
|
134
|
+
memory containing the archive data.
|
|
135
|
+
.El
|
|
136
|
+
.Pp
|
|
137
|
+
A complete description of the
|
|
138
|
+
.Tn struct archive
|
|
139
|
+
and
|
|
140
|
+
.Tn struct archive_entry
|
|
141
|
+
objects can be found in the overview manual page for
|
|
142
|
+
.Xr libarchive 3 .
|
|
143
|
+
.Sh CLIENT CALLBACKS
|
|
144
|
+
The callback functions must match the following prototypes:
|
|
145
|
+
.Bl -item -offset indent
|
|
146
|
+
.It
|
|
147
|
+
.Ft typedef la_ssize_t
|
|
148
|
+
.Fo archive_read_callback
|
|
149
|
+
.Fa "struct archive *"
|
|
150
|
+
.Fa "void *client_data"
|
|
151
|
+
.Fa "const void **buffer"
|
|
152
|
+
.Fc
|
|
153
|
+
.It
|
|
154
|
+
.Ft typedef la_int64_t
|
|
155
|
+
.Fo archive_skip_callback
|
|
156
|
+
.Fa "struct archive *"
|
|
157
|
+
.Fa "void *client_data"
|
|
158
|
+
.Fa "off_t request"
|
|
159
|
+
.Fc
|
|
160
|
+
.It
|
|
161
|
+
.Ft typedef int
|
|
162
|
+
.Fn archive_open_callback "struct archive *" "void *client_data"
|
|
163
|
+
.It
|
|
164
|
+
.Ft typedef int
|
|
165
|
+
.Fn archive_close_callback "struct archive *" "void *client_data"
|
|
166
|
+
.El
|
|
167
|
+
.Pp
|
|
168
|
+
The open callback is invoked by
|
|
169
|
+
.Fn archive_open .
|
|
170
|
+
It should return
|
|
171
|
+
.Cm ARCHIVE_OK
|
|
172
|
+
if the underlying file or data source is successfully
|
|
173
|
+
opened.
|
|
174
|
+
If the open fails, it should call
|
|
175
|
+
.Fn archive_set_error
|
|
176
|
+
to register an error code and message and return
|
|
177
|
+
.Cm ARCHIVE_FATAL .
|
|
178
|
+
.Pp
|
|
179
|
+
The read callback is invoked whenever the library
|
|
180
|
+
requires raw bytes from the archive.
|
|
181
|
+
The read callback should read data into a buffer,
|
|
182
|
+
set the
|
|
183
|
+
.Li const void **buffer
|
|
184
|
+
argument to point to the available data, and
|
|
185
|
+
return a count of the number of bytes available.
|
|
186
|
+
The library will invoke the read callback again
|
|
187
|
+
only after it has consumed this data.
|
|
188
|
+
The library imposes no constraints on the size
|
|
189
|
+
of the data blocks returned.
|
|
190
|
+
On end-of-file, the read callback should
|
|
191
|
+
return zero.
|
|
192
|
+
On error, the read callback should invoke
|
|
193
|
+
.Fn archive_set_error
|
|
194
|
+
to register an error code and message and
|
|
195
|
+
return -1.
|
|
196
|
+
.Pp
|
|
197
|
+
The skip callback is invoked when the
|
|
198
|
+
library wants to ignore a block of data.
|
|
199
|
+
The return value is the number of bytes actually
|
|
200
|
+
skipped, which may differ from the request.
|
|
201
|
+
If the callback cannot skip data, it should return
|
|
202
|
+
zero.
|
|
203
|
+
If the skip callback is not provided (the
|
|
204
|
+
function pointer is
|
|
205
|
+
.Dv NULL ),
|
|
206
|
+
the library will invoke the read function
|
|
207
|
+
instead and simply discard the result.
|
|
208
|
+
A skip callback can provide significant
|
|
209
|
+
performance gains when reading uncompressed
|
|
210
|
+
archives from slow disk drives or other media
|
|
211
|
+
that can skip quickly.
|
|
212
|
+
.Pp
|
|
213
|
+
The close callback is invoked by archive_close when
|
|
214
|
+
the archive processing is complete.
|
|
215
|
+
The callback should return
|
|
216
|
+
.Cm ARCHIVE_OK
|
|
217
|
+
on success.
|
|
218
|
+
On failure, the callback should invoke
|
|
219
|
+
.Fn archive_set_error
|
|
220
|
+
to register an error code and message and
|
|
221
|
+
return
|
|
222
|
+
.Cm ARCHIVE_FATAL .
|
|
223
|
+
.\" .Sh EXAMPLE
|
|
224
|
+
.\"
|
|
225
|
+
.Sh RETURN VALUES
|
|
226
|
+
These functions return
|
|
227
|
+
.Cm ARCHIVE_OK
|
|
228
|
+
on success, or
|
|
229
|
+
.Cm ARCHIVE_FATAL .
|
|
230
|
+
.\"
|
|
231
|
+
.Sh ERRORS
|
|
232
|
+
Detailed error codes and textual descriptions are available from the
|
|
233
|
+
.Fn archive_errno
|
|
234
|
+
and
|
|
235
|
+
.Fn archive_error_string
|
|
236
|
+
functions.
|
|
237
|
+
.\"
|
|
238
|
+
.Sh SEE ALSO
|
|
239
|
+
.Xr tar 1 ,
|
|
240
|
+
.Xr archive_read 3 ,
|
|
241
|
+
.Xr archive_read_data 3 ,
|
|
242
|
+
.Xr archive_read_filter 3 ,
|
|
243
|
+
.Xr archive_read_format 3 ,
|
|
244
|
+
.Xr archive_read_set_options 3 ,
|
|
245
|
+
.Xr archive_util 3 ,
|
|
246
|
+
.Xr libarchive 3 ,
|
|
247
|
+
.Xr tar 5
|