libarchive-static 1.0.6 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/extconf.rb +2 -9
- data/ext/libarchive-0.1.1/ext/archive_read_support_compression.c +6 -6
- data/ext/libarchive-0.1.1/ext/archive_read_support_compression.o +0 -0
- data/ext/libarchive-0.1.1/ext/archive_read_support_format.o +0 -0
- data/ext/libarchive-0.1.1/ext/archive_write_open_rb_str.c +1 -1
- data/ext/libarchive-0.1.1/ext/archive_write_open_rb_str.o +0 -0
- data/ext/libarchive-0.1.1/ext/archive_write_set_compression.c +5 -5
- data/ext/libarchive-0.1.1/ext/archive_write_set_compression.o +0 -0
- data/ext/libarchive-0.1.1/ext/config.h +23 -0
- data/ext/libarchive-0.1.1/ext/config.log +230 -0
- data/ext/libarchive-0.1.1/ext/config.status +671 -0
- data/ext/libarchive-0.1.1/ext/libarchive.c +1 -1
- data/ext/libarchive-0.1.1/ext/libarchive.o +0 -0
- data/ext/libarchive-0.1.1/ext/libarchive_archive.c +7 -7
- data/ext/libarchive-0.1.1/ext/libarchive_archive.o +0 -0
- data/ext/libarchive-0.1.1/ext/libarchive_entry.c +6 -0
- data/ext/libarchive-0.1.1/ext/libarchive_entry.o +0 -0
- data/ext/libarchive-0.1.1/ext/libarchive_reader.c +6 -4
- data/ext/libarchive-0.1.1/ext/libarchive_reader.o +0 -0
- data/ext/libarchive-0.1.1/ext/libarchive_ruby.so +0 -0
- data/ext/libarchive-0.1.1/ext/libarchive_win32.h +1 -1
- data/ext/libarchive-0.1.1/ext/libarchive_writer.c +2 -2
- data/ext/libarchive-0.1.1/ext/libarchive_writer.o +0 -0
- data/ext/libarchive-3.6.2/Makefile.in +16892 -0
- data/ext/libarchive-3.6.2/build/autoconf/ax_append_compile_flags.m4 +67 -0
- data/ext/libarchive-3.6.2/build/autoconf/ax_append_flag.m4 +71 -0
- data/ext/libarchive-3.6.2/build/autoconf/ax_check_compile_flag.m4 +74 -0
- data/ext/libarchive-3.6.2/build/autoconf/ax_require_defined.m4 +37 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/build/autoconf/check_stdcall_func.m4 +0 -0
- data/ext/libarchive-3.6.2/build/autoconf/compile +348 -0
- data/ext/libarchive-3.6.2/build/autoconf/config.guess +1754 -0
- data/ext/libarchive-3.6.2/build/autoconf/config.rpath +696 -0
- data/ext/libarchive-3.6.2/build/autoconf/config.sub +1890 -0
- data/ext/libarchive-3.6.2/build/autoconf/depcomp +791 -0
- data/ext/libarchive-3.6.2/build/autoconf/iconv.m4 +271 -0
- data/ext/libarchive-3.6.2/build/autoconf/install-sh +541 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/build/autoconf/la_uid_t.m4 +0 -0
- data/ext/libarchive-3.6.2/build/autoconf/lib-ld.m4 +109 -0
- data/ext/libarchive-3.6.2/build/autoconf/lib-link.m4 +777 -0
- data/ext/libarchive-3.6.2/build/autoconf/lib-prefix.m4 +224 -0
- data/ext/libarchive-3.6.2/build/autoconf/ltmain.sh +11251 -0
- data/ext/libarchive-3.6.2/build/autoconf/m4_ax_compile_check_sizeof.m4 +115 -0
- data/ext/libarchive-3.6.2/build/autoconf/missing +215 -0
- data/ext/libarchive-3.6.2/build/autoconf/test-driver +153 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/build/pkgconfig/libarchive.pc.in +4 -1
- data/ext/libarchive-3.6.2/config.h.in +1504 -0
- data/ext/libarchive-3.6.2/configure +25558 -0
- data/ext/libarchive-3.6.2/libarchive/archive.h +1212 -0
- data/ext/libarchive-3.6.2/libarchive/archive_acl.c +2097 -0
- data/ext/libarchive-3.6.2/libarchive/archive_acl_private.h +83 -0
- data/ext/libarchive-3.6.2/libarchive/archive_blake2.h +197 -0
- data/ext/libarchive-3.6.2/libarchive/archive_blake2_impl.h +161 -0
- data/ext/libarchive-3.6.2/libarchive/archive_blake2s_ref.c +369 -0
- data/ext/libarchive-3.6.2/libarchive/archive_blake2sp_ref.c +361 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_check_magic.c +63 -22
- data/ext/libarchive-3.6.2/libarchive/archive_cmdline.c +227 -0
- data/ext/libarchive-3.6.2/libarchive/archive_cmdline_private.h +47 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_crc32.h +17 -0
- data/ext/libarchive-3.6.2/libarchive/archive_cryptor.c +534 -0
- data/ext/libarchive-3.6.2/libarchive/archive_cryptor_private.h +188 -0
- data/ext/libarchive-3.6.2/libarchive/archive_digest.c +1505 -0
- data/ext/libarchive-3.6.2/libarchive/archive_digest_private.h +416 -0
- data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_darwin.c +559 -0
- data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_freebsd.c +712 -0
- data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_linux.c +760 -0
- data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_sunos.c +824 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_endian.h +48 -15
- data/ext/libarchive-3.6.2/libarchive/archive_entry.c +2149 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry.h +305 -106
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_copy_bhfi.c +5 -4
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_copy_stat.c +9 -3
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_link_resolver.c +104 -62
- data/ext/libarchive-3.6.2/libarchive/archive_entry_locale.h +92 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_private.h +65 -49
- data/ext/libarchive-3.6.2/libarchive/archive_entry_sparse.c +156 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_stat.c +6 -6
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_strmode.c +1 -1
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_xattr.c +4 -6
- data/ext/libarchive-3.6.2/libarchive/archive_getdate.c +1165 -0
- data/ext/libarchive-3.6.2/libarchive/archive_getdate.h +39 -0
- data/ext/libarchive-3.6.2/libarchive/archive_hmac.c +334 -0
- data/ext/libarchive-3.6.2/libarchive/archive_hmac_private.h +117 -0
- data/ext/libarchive-3.6.2/libarchive/archive_match.c +1875 -0
- data/ext/libarchive-3.6.2/libarchive/archive_openssl_evp_private.h +53 -0
- data/ext/libarchive-3.6.2/libarchive/archive_openssl_hmac_private.h +54 -0
- data/ext/libarchive-3.6.2/libarchive/archive_options.c +218 -0
- data/ext/libarchive-3.6.2/libarchive/archive_options_private.h +51 -0
- data/ext/libarchive-3.6.2/libarchive/archive_pack_dev.c +337 -0
- data/ext/libarchive-3.6.2/libarchive/archive_pack_dev.h +49 -0
- data/ext/libarchive-3.6.2/libarchive/archive_pathmatch.c +463 -0
- data/ext/libarchive-3.6.2/libarchive/archive_pathmatch.h +52 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_platform.h +77 -9
- data/ext/libarchive-3.6.2/libarchive/archive_platform_acl.h +55 -0
- data/ext/libarchive-3.6.2/libarchive/archive_platform_xattr.h +47 -0
- data/ext/libarchive-3.6.2/libarchive/archive_ppmd7.c +1168 -0
- data/ext/libarchive-3.6.2/libarchive/archive_ppmd7_private.h +119 -0
- data/ext/libarchive-3.6.2/libarchive/archive_ppmd8.c +1287 -0
- data/ext/libarchive-3.6.2/libarchive/archive_ppmd8_private.h +148 -0
- data/ext/libarchive-3.6.2/libarchive/archive_ppmd_private.h +151 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_private.h +74 -18
- data/ext/libarchive-3.6.2/libarchive/archive_random.c +272 -0
- data/ext/libarchive-3.6.2/libarchive/archive_random_private.h +36 -0
- data/ext/libarchive-3.6.2/libarchive/archive_rb.c +709 -0
- data/ext/libarchive-3.6.2/libarchive/archive_rb.h +113 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read.c +1756 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_add_passphrase.c +190 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_append_filter.c +204 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_data_into_fd.c +64 -18
- data/ext/libarchive-3.6.2/libarchive/archive_read_disk_entry_from_file.c +1086 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_disk_posix.c +2732 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_disk_private.h +40 -4
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_disk_set_standard_lookup.c +21 -11
- data/ext/libarchive-3.6.2/libarchive/archive_read_disk_windows.c +2479 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_extract.c +60 -0
- data/ext/{libarchive-2.8.4/libarchive/archive_read_extract.c → libarchive-3.6.2/libarchive/archive_read_extract2.c} +34 -61
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_open_fd.c +70 -49
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_open_file.c +38 -23
- data/ext/libarchive-3.6.2/libarchive/archive_read_open_filename.c +586 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_open_memory.c +58 -28
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_private.h +127 -59
- data/ext/libarchive-3.6.2/libarchive/archive_read_set_format.c +117 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_set_options.c +133 -0
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_all.c → libarchive-3.6.2/libarchive/archive_read_support_filter_all.c} +35 -10
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_by_code.c +83 -0
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_bzip2.c → libarchive-3.6.2/libarchive/archive_read_support_filter_bzip2.c} +38 -26
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_compress.c → libarchive-3.6.2/libarchive/archive_read_support_filter_compress.c} +52 -44
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_grzip.c +112 -0
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_gzip.c → libarchive-3.6.2/libarchive/archive_read_support_filter_gzip.c} +108 -37
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_lrzip.c +122 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_lz4.c +742 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_lzop.c +499 -0
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_none.c → libarchive-3.6.2/libarchive/archive_read_support_filter_none.c} +15 -3
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_program.c → libarchive-3.6.2/libarchive/archive_read_support_filter_program.c} +114 -77
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_rpm.c → libarchive-3.6.2/libarchive/archive_read_support_filter_rpm.c} +31 -31
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_uu.c → libarchive-3.6.2/libarchive/archive_read_support_filter_uu.c} +141 -85
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_compression_xz.c → libarchive-3.6.2/libarchive/archive_read_support_filter_xz.c} +369 -284
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_zstd.c +297 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_7zip.c +3900 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_all.c +89 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_ar.c +126 -72
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_by_code.c +92 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_cab.c +3228 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_cpio.c +1104 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_empty.c +14 -11
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_iso9660.c +990 -541
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_lha.c +2916 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_mtree.c +2150 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_rar.c +3797 -0
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_rar5.c +4251 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_raw.c +38 -31
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_tar.c +1157 -629
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_warc.c +848 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_xar.c +439 -258
- data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_zip.c +4270 -0
- data/ext/libarchive-3.6.2/libarchive/archive_string.c +4240 -0
- data/ext/libarchive-3.6.2/libarchive/archive_string.h +243 -0
- data/ext/libarchive-3.6.2/libarchive/archive_string_composition.h +2292 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_string_sprintf.c +44 -16
- data/ext/libarchive-3.6.2/libarchive/archive_util.c +655 -0
- data/ext/libarchive-3.6.2/libarchive/archive_version_details.c +151 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_virtual.c +85 -16
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_windows.c +214 -541
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_windows.h +74 -106
- data/ext/libarchive-3.6.2/libarchive/archive_write.c +828 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter.c +72 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_b64encode.c +304 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_by_name.c +77 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_bzip2.c +401 -0
- data/ext/{libarchive-2.8.4/libarchive/archive_write_set_compression_compress.c → libarchive-3.6.2/libarchive/archive_write_add_filter_compress.c} +86 -131
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_grzip.c +135 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_gzip.c +442 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_lrzip.c +197 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_lz4.c +700 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_lzop.c +478 -0
- data/ext/{libarchive-2.8.4/libarchive/archive_read_support_format_all.c → libarchive-3.6.2/libarchive/archive_write_add_filter_none.c} +11 -11
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_program.c +391 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_uuencode.c +295 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_xz.c +545 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_zstd.c +418 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_disk_posix.c +4711 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_disk_private.h +9 -2
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_disk_set_standard_lookup.c +30 -29
- data/ext/libarchive-3.6.2/libarchive/archive_write_disk_windows.c +2842 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_fd.c +15 -10
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_file.c +15 -9
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_filename.c +128 -20
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_memory.c +7 -18
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_private.h +72 -29
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format.c +56 -3
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_7zip.c +2322 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_ar.c +54 -34
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_by_name.c +20 -2
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio.c +11 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio_binary.c +610 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio_newc.c +457 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio_odc.c +500 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_filter_by_ext.c +142 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_gnutar.c +755 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_iso9660.c +8165 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_mtree.c +2217 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_pax.c +1049 -387
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_private.h +42 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_raw.c +125 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_shar.c +62 -47
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_ustar.c +279 -108
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_v7tar.c +638 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_warc.c +453 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_xar.c +3259 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_zip.c +1704 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_options.c +130 -0
- data/ext/libarchive-3.6.2/libarchive/archive_write_set_passphrase.c +95 -0
- data/ext/libarchive-3.6.2/libarchive/archive_xxhash.h +48 -0
- data/ext/libarchive-3.6.2/libarchive/config_freebsd.h +271 -0
- data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/filter_fork.h +10 -5
- data/ext/{libarchive-2.8.4/libarchive/filter_fork.c → libarchive-3.6.2/libarchive/filter_fork_posix.c} +98 -19
- data/ext/libarchive-3.6.2/libarchive/filter_fork_windows.c +236 -0
- data/ext/libarchive-3.6.2/libarchive/xxhash.c +525 -0
- data/ext/libarchive-static-makefile +144 -80
- data/ext/libarchive-static-wrapper-makefile +1 -1
- data/ext/zlib-1.2.13/Makefile.in +404 -0
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/adler32.c +51 -34
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/compress.c +27 -21
- data/ext/zlib-1.2.13/configure +922 -0
- data/ext/zlib-1.2.13/crc32.c +1125 -0
- data/ext/zlib-1.2.13/crc32.h +9446 -0
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/deflate.c +842 -459
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/deflate.h +37 -33
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/gzclose.c +0 -0
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/gzguts.h +103 -16
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/gzlib.c +155 -53
- data/ext/zlib-1.2.13/gzread.c +650 -0
- data/ext/zlib-1.2.13/gzwrite.c +677 -0
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/infback.c +24 -12
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/inffast.c +49 -66
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/inffast.h +0 -0
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/inffixed.h +3 -3
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/inflate.c +209 -94
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/inflate.h +9 -5
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/inftrees.c +24 -50
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/inftrees.h +1 -1
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/trees.c +135 -198
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/trees.h +0 -0
- data/ext/zlib-1.2.13/uncompr.c +93 -0
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/zconf.h +182 -63
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/zlib.h +617 -295
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/zutil.c +50 -41
- data/ext/{zlib-1.2.5 → zlib-1.2.13}/zutil.h +83 -82
- metadata +241 -133
- data/ext/libarchive-0.1.1/libarchive.c +0 -1762
- data/ext/libarchive-2.8.4/Makefile.in +0 -7076
- data/ext/libarchive-2.8.4/build/autoconf/compile +0 -143
- data/ext/libarchive-2.8.4/build/autoconf/config.guess +0 -1502
- data/ext/libarchive-2.8.4/build/autoconf/config.sub +0 -1708
- data/ext/libarchive-2.8.4/build/autoconf/depcomp +0 -630
- data/ext/libarchive-2.8.4/build/autoconf/install-sh +0 -291
- data/ext/libarchive-2.8.4/build/autoconf/ltmain.sh +0 -8406
- data/ext/libarchive-2.8.4/build/autoconf/missing +0 -376
- data/ext/libarchive-2.8.4/config.h.in +0 -772
- data/ext/libarchive-2.8.4/configure +0 -17916
- data/ext/libarchive-2.8.4/libarchive/archive.h +0 -741
- data/ext/libarchive-2.8.4/libarchive/archive_entry.c +0 -2202
- data/ext/libarchive-2.8.4/libarchive/archive_hash.h +0 -281
- data/ext/libarchive-2.8.4/libarchive/archive_read.c +0 -1249
- data/ext/libarchive-2.8.4/libarchive/archive_read_disk.c +0 -198
- data/ext/libarchive-2.8.4/libarchive/archive_read_disk_entry_from_file.c +0 -570
- data/ext/libarchive-2.8.4/libarchive/archive_read_open_filename.c +0 -272
- data/ext/libarchive-2.8.4/libarchive/archive_read_support_format_cpio.c +0 -777
- data/ext/libarchive-2.8.4/libarchive/archive_read_support_format_mtree.c +0 -1304
- data/ext/libarchive-2.8.4/libarchive/archive_read_support_format_zip.c +0 -903
- data/ext/libarchive-2.8.4/libarchive/archive_string.c +0 -453
- data/ext/libarchive-2.8.4/libarchive/archive_string.h +0 -148
- data/ext/libarchive-2.8.4/libarchive/archive_util.c +0 -391
- data/ext/libarchive-2.8.4/libarchive/archive_write.c +0 -466
- data/ext/libarchive-2.8.4/libarchive/archive_write_disk.c +0 -2628
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_bzip2.c +0 -408
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_gzip.c +0 -477
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_none.c +0 -257
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_program.c +0 -347
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_xz.c +0 -438
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_cpio.c +0 -344
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_cpio_newc.c +0 -295
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_mtree.c +0 -1050
- data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_zip.c +0 -667
- data/ext/libarchive-2.8.4/libarchive/config_freebsd.h +0 -154
- data/ext/libarchive-2.8.4/libarchive/filter_fork_windows.c +0 -113
- data/ext/zlib-1.2.5/Makefile.in +0 -257
- data/ext/zlib-1.2.5/configure +0 -596
- data/ext/zlib-1.2.5/crc32.c +0 -442
- data/ext/zlib-1.2.5/crc32.h +0 -441
- data/ext/zlib-1.2.5/example.c +0 -565
- data/ext/zlib-1.2.5/gzread.c +0 -653
- data/ext/zlib-1.2.5/gzwrite.c +0 -531
- data/ext/zlib-1.2.5/minigzip.c +0 -440
- data/ext/zlib-1.2.5/uncompr.c +0 -59
@@ -51,11 +51,10 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_open_fd.c 201093 2009-12-2
|
|
51
51
|
#include "archive.h"
|
52
52
|
|
53
53
|
struct write_fd_data {
|
54
|
-
off_t offset;
|
55
54
|
int fd;
|
56
55
|
};
|
57
56
|
|
58
|
-
static int
|
57
|
+
static int file_free(struct archive *, void *);
|
59
58
|
static int file_open(struct archive *, void *);
|
60
59
|
static ssize_t file_write(struct archive *, void *, const void *buff, size_t);
|
61
60
|
|
@@ -73,8 +72,8 @@ archive_write_open_fd(struct archive *a, int fd)
|
|
73
72
|
#if defined(__CYGWIN__) || defined(_WIN32)
|
74
73
|
setmode(mine->fd, O_BINARY);
|
75
74
|
#endif
|
76
|
-
return (
|
77
|
-
file_open, file_write,
|
75
|
+
return (archive_write_open2(a, mine,
|
76
|
+
file_open, file_write, NULL, file_free));
|
78
77
|
}
|
79
78
|
|
80
79
|
static int
|
@@ -122,20 +121,26 @@ file_write(struct archive *a, void *client_data, const void *buff, size_t length
|
|
122
121
|
ssize_t bytesWritten;
|
123
122
|
|
124
123
|
mine = (struct write_fd_data *)client_data;
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
124
|
+
for (;;) {
|
125
|
+
bytesWritten = write(mine->fd, buff, length);
|
126
|
+
if (bytesWritten <= 0) {
|
127
|
+
if (errno == EINTR)
|
128
|
+
continue;
|
129
|
+
archive_set_error(a, errno, "Write error");
|
130
|
+
return (-1);
|
131
|
+
}
|
132
|
+
return (bytesWritten);
|
129
133
|
}
|
130
|
-
return (bytesWritten);
|
131
134
|
}
|
132
135
|
|
133
136
|
static int
|
134
|
-
|
137
|
+
file_free(struct archive *a, void *client_data)
|
135
138
|
{
|
136
139
|
struct write_fd_data *mine = (struct write_fd_data *)client_data;
|
137
140
|
|
138
141
|
(void)a; /* UNUSED */
|
142
|
+
if (mine == NULL)
|
143
|
+
return (ARCHIVE_OK);
|
139
144
|
free(mine);
|
140
145
|
return (ARCHIVE_OK);
|
141
146
|
}
|
@@ -51,7 +51,7 @@ struct write_FILE_data {
|
|
51
51
|
FILE *f;
|
52
52
|
};
|
53
53
|
|
54
|
-
static int
|
54
|
+
static int file_free(struct archive *, void *);
|
55
55
|
static int file_open(struct archive *, void *);
|
56
56
|
static ssize_t file_write(struct archive *, void *, const void *buff, size_t);
|
57
57
|
|
@@ -66,8 +66,8 @@ archive_write_open_FILE(struct archive *a, FILE *f)
|
|
66
66
|
return (ARCHIVE_FATAL);
|
67
67
|
}
|
68
68
|
mine->f = f;
|
69
|
-
return (
|
70
|
-
|
69
|
+
return (archive_write_open2(a, mine, file_open, file_write,
|
70
|
+
NULL, file_free));
|
71
71
|
}
|
72
72
|
|
73
73
|
static int
|
@@ -86,20 +86,26 @@ file_write(struct archive *a, void *client_data, const void *buff, size_t length
|
|
86
86
|
size_t bytesWritten;
|
87
87
|
|
88
88
|
mine = client_data;
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
for (;;) {
|
90
|
+
bytesWritten = fwrite(buff, 1, length, mine->f);
|
91
|
+
if (bytesWritten <= 0) {
|
92
|
+
if (errno == EINTR)
|
93
|
+
continue;
|
94
|
+
archive_set_error(a, errno, "Write error");
|
95
|
+
return (-1);
|
96
|
+
}
|
97
|
+
return (bytesWritten);
|
93
98
|
}
|
94
|
-
return (bytesWritten);
|
95
99
|
}
|
96
100
|
|
97
101
|
static int
|
98
|
-
|
102
|
+
file_free(struct archive *a, void *client_data)
|
99
103
|
{
|
100
104
|
struct write_FILE_data *mine = client_data;
|
101
105
|
|
102
106
|
(void)a; /* UNUSED */
|
107
|
+
if (mine == NULL)
|
108
|
+
return (ARCHIVE_OK);
|
103
109
|
free(mine);
|
104
110
|
return (ARCHIVE_OK);
|
105
111
|
}
|
@@ -46,19 +46,26 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_open_filename.c 191165 200
|
|
46
46
|
#endif
|
47
47
|
|
48
48
|
#include "archive.h"
|
49
|
+
#include "archive_private.h"
|
50
|
+
#include "archive_string.h"
|
49
51
|
|
50
52
|
#ifndef O_BINARY
|
51
53
|
#define O_BINARY 0
|
52
54
|
#endif
|
55
|
+
#ifndef O_CLOEXEC
|
56
|
+
#define O_CLOEXEC 0
|
57
|
+
#endif
|
53
58
|
|
54
59
|
struct write_file_data {
|
55
60
|
int fd;
|
56
|
-
|
61
|
+
struct archive_mstring filename;
|
57
62
|
};
|
58
63
|
|
59
64
|
static int file_close(struct archive *, void *);
|
65
|
+
static int file_free(struct archive *, void *);
|
60
66
|
static int file_open(struct archive *, void *);
|
61
67
|
static ssize_t file_write(struct archive *, void *, const void *buff, size_t);
|
68
|
+
static int open_filename(struct archive *, int, const void *);
|
62
69
|
|
63
70
|
int
|
64
71
|
archive_write_open_file(struct archive *a, const char *filename)
|
@@ -69,20 +76,56 @@ archive_write_open_file(struct archive *a, const char *filename)
|
|
69
76
|
int
|
70
77
|
archive_write_open_filename(struct archive *a, const char *filename)
|
71
78
|
{
|
72
|
-
struct write_file_data *mine;
|
73
79
|
|
74
80
|
if (filename == NULL || filename[0] == '\0')
|
75
81
|
return (archive_write_open_fd(a, 1));
|
76
82
|
|
77
|
-
|
83
|
+
return (open_filename(a, 1, filename));
|
84
|
+
}
|
85
|
+
|
86
|
+
int
|
87
|
+
archive_write_open_filename_w(struct archive *a, const wchar_t *filename)
|
88
|
+
{
|
89
|
+
|
90
|
+
if (filename == NULL || filename[0] == L'\0')
|
91
|
+
return (archive_write_open_fd(a, 1));
|
92
|
+
|
93
|
+
return (open_filename(a, 0, filename));
|
94
|
+
}
|
95
|
+
|
96
|
+
static int
|
97
|
+
open_filename(struct archive *a, int mbs_fn, const void *filename)
|
98
|
+
{
|
99
|
+
struct write_file_data *mine;
|
100
|
+
int r;
|
101
|
+
|
102
|
+
mine = (struct write_file_data *)calloc(1, sizeof(*mine));
|
78
103
|
if (mine == NULL) {
|
79
104
|
archive_set_error(a, ENOMEM, "No memory");
|
80
105
|
return (ARCHIVE_FATAL);
|
81
106
|
}
|
82
|
-
|
107
|
+
if (mbs_fn)
|
108
|
+
r = archive_mstring_copy_mbs(&mine->filename, filename);
|
109
|
+
else
|
110
|
+
r = archive_mstring_copy_wcs(&mine->filename, filename);
|
111
|
+
if (r < 0) {
|
112
|
+
if (errno == ENOMEM) {
|
113
|
+
archive_set_error(a, ENOMEM, "No memory");
|
114
|
+
return (ARCHIVE_FATAL);
|
115
|
+
}
|
116
|
+
if (mbs_fn)
|
117
|
+
archive_set_error(a, ARCHIVE_ERRNO_MISC,
|
118
|
+
"Can't convert '%s' to WCS",
|
119
|
+
(const char *)filename);
|
120
|
+
else
|
121
|
+
archive_set_error(a, ARCHIVE_ERRNO_MISC,
|
122
|
+
"Can't convert '%S' to MBS",
|
123
|
+
(const wchar_t *)filename);
|
124
|
+
return (ARCHIVE_FAILED);
|
125
|
+
}
|
83
126
|
mine->fd = -1;
|
84
|
-
return (
|
85
|
-
|
127
|
+
return (archive_write_open2(a, mine,
|
128
|
+
file_open, file_write, file_close, file_free));
|
86
129
|
}
|
87
130
|
|
88
131
|
static int
|
@@ -91,24 +134,64 @@ file_open(struct archive *a, void *client_data)
|
|
91
134
|
int flags;
|
92
135
|
struct write_file_data *mine;
|
93
136
|
struct stat st;
|
137
|
+
#if defined(_WIN32) && !defined(__CYGWIN__)
|
138
|
+
wchar_t *fullpath;
|
139
|
+
#endif
|
140
|
+
const wchar_t *wcs;
|
141
|
+
const char *mbs;
|
94
142
|
|
95
143
|
mine = (struct write_file_data *)client_data;
|
96
|
-
flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY;
|
144
|
+
flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC;
|
97
145
|
|
98
146
|
/*
|
99
147
|
* Open the file.
|
100
148
|
*/
|
101
|
-
|
149
|
+
mbs = NULL; wcs = NULL;
|
150
|
+
#if defined(_WIN32) && !defined(__CYGWIN__)
|
151
|
+
if (archive_mstring_get_wcs(a, &mine->filename, &wcs) != 0) {
|
152
|
+
if (errno == ENOMEM)
|
153
|
+
archive_set_error(a, errno, "No memory");
|
154
|
+
else {
|
155
|
+
archive_mstring_get_mbs(a, &mine->filename, &mbs);
|
156
|
+
archive_set_error(a, errno,
|
157
|
+
"Can't convert '%s' to WCS", mbs);
|
158
|
+
}
|
159
|
+
return (ARCHIVE_FATAL);
|
160
|
+
}
|
161
|
+
fullpath = __la_win_permissive_name_w(wcs);
|
162
|
+
if (fullpath != NULL) {
|
163
|
+
mine->fd = _wopen(fullpath, flags, 0666);
|
164
|
+
free(fullpath);
|
165
|
+
} else
|
166
|
+
mine->fd = _wopen(wcs, flags, 0666);
|
167
|
+
#else
|
168
|
+
if (archive_mstring_get_mbs(a, &mine->filename, &mbs) != 0) {
|
169
|
+
if (errno == ENOMEM)
|
170
|
+
archive_set_error(a, errno, "No memory");
|
171
|
+
else {
|
172
|
+
archive_mstring_get_wcs(a, &mine->filename, &wcs);
|
173
|
+
archive_set_error(a, errno,
|
174
|
+
"Can't convert '%S' to MBS", wcs);
|
175
|
+
}
|
176
|
+
return (ARCHIVE_FATAL);
|
177
|
+
}
|
178
|
+
mine->fd = open(mbs, flags, 0666);
|
179
|
+
__archive_ensure_cloexec_flag(mine->fd);
|
180
|
+
#endif
|
102
181
|
if (mine->fd < 0) {
|
103
|
-
|
104
|
-
|
182
|
+
if (mbs != NULL)
|
183
|
+
archive_set_error(a, errno, "Failed to open '%s'", mbs);
|
184
|
+
else
|
185
|
+
archive_set_error(a, errno, "Failed to open '%S'", wcs);
|
105
186
|
return (ARCHIVE_FATAL);
|
106
187
|
}
|
107
188
|
|
108
189
|
if (fstat(mine->fd, &st) != 0) {
|
109
|
-
|
110
|
-
|
111
|
-
|
190
|
+
if (mbs != NULL)
|
191
|
+
archive_set_error(a, errno, "Couldn't stat '%s'", mbs);
|
192
|
+
else
|
193
|
+
archive_set_error(a, errno, "Couldn't stat '%S'", wcs);
|
194
|
+
return (ARCHIVE_FATAL);
|
112
195
|
}
|
113
196
|
|
114
197
|
/*
|
@@ -136,18 +219,23 @@ file_open(struct archive *a, void *client_data)
|
|
136
219
|
}
|
137
220
|
|
138
221
|
static ssize_t
|
139
|
-
file_write(struct archive *a, void *client_data, const void *buff,
|
222
|
+
file_write(struct archive *a, void *client_data, const void *buff,
|
223
|
+
size_t length)
|
140
224
|
{
|
141
225
|
struct write_file_data *mine;
|
142
226
|
ssize_t bytesWritten;
|
143
227
|
|
144
228
|
mine = (struct write_file_data *)client_data;
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
229
|
+
for (;;) {
|
230
|
+
bytesWritten = write(mine->fd, buff, length);
|
231
|
+
if (bytesWritten <= 0) {
|
232
|
+
if (errno == EINTR)
|
233
|
+
continue;
|
234
|
+
archive_set_error(a, errno, "Write error");
|
235
|
+
return (-1);
|
236
|
+
}
|
237
|
+
return (bytesWritten);
|
149
238
|
}
|
150
|
-
return (bytesWritten);
|
151
239
|
}
|
152
240
|
|
153
241
|
static int
|
@@ -156,7 +244,27 @@ file_close(struct archive *a, void *client_data)
|
|
156
244
|
struct write_file_data *mine = (struct write_file_data *)client_data;
|
157
245
|
|
158
246
|
(void)a; /* UNUSED */
|
159
|
-
|
247
|
+
|
248
|
+
if (mine == NULL)
|
249
|
+
return (ARCHIVE_FATAL);
|
250
|
+
|
251
|
+
if (mine->fd >= 0)
|
252
|
+
close(mine->fd);
|
253
|
+
|
254
|
+
return (ARCHIVE_OK);
|
255
|
+
}
|
256
|
+
|
257
|
+
static int
|
258
|
+
file_free(struct archive *a, void *client_data)
|
259
|
+
{
|
260
|
+
struct write_file_data *mine = (struct write_file_data *)client_data;
|
261
|
+
|
262
|
+
(void)a; /* UNUSED */
|
263
|
+
|
264
|
+
if (mine == NULL)
|
265
|
+
return (ARCHIVE_OK);
|
266
|
+
|
267
|
+
archive_mstring_clean(&mine->filename);
|
160
268
|
free(mine);
|
161
269
|
return (ARCHIVE_OK);
|
162
270
|
}
|
@@ -32,18 +32,6 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_memory.c,v 1.3 2007/01
|
|
32
32
|
|
33
33
|
#include "archive.h"
|
34
34
|
|
35
|
-
/*
|
36
|
-
* This is a little tricky. I used to allow the
|
37
|
-
* compression handling layer to fork the compressor,
|
38
|
-
* which means this write function gets invoked in
|
39
|
-
* a separate process. That would, of course, make it impossible
|
40
|
-
* to actually use the data stored into memory here.
|
41
|
-
* Fortunately, none of the compressors fork today and
|
42
|
-
* I'm reluctant to use that route in the future but, if
|
43
|
-
* forking compressors ever do reappear, this will have
|
44
|
-
* to get a lot more complicated.
|
45
|
-
*/
|
46
|
-
|
47
35
|
struct write_memory_data {
|
48
36
|
size_t used;
|
49
37
|
size_t size;
|
@@ -51,7 +39,7 @@ struct write_memory_data {
|
|
51
39
|
unsigned char * buff;
|
52
40
|
};
|
53
41
|
|
54
|
-
static int
|
42
|
+
static int memory_write_free(struct archive *, void *);
|
55
43
|
static int memory_write_open(struct archive *, void *);
|
56
44
|
static ssize_t memory_write(struct archive *, void *, const void *buff, size_t);
|
57
45
|
|
@@ -65,17 +53,16 @@ archive_write_open_memory(struct archive *a, void *buff, size_t buffSize, size_t
|
|
65
53
|
{
|
66
54
|
struct write_memory_data *mine;
|
67
55
|
|
68
|
-
mine = (struct write_memory_data *)
|
56
|
+
mine = (struct write_memory_data *)calloc(1, sizeof(*mine));
|
69
57
|
if (mine == NULL) {
|
70
58
|
archive_set_error(a, ENOMEM, "No memory");
|
71
59
|
return (ARCHIVE_FATAL);
|
72
60
|
}
|
73
|
-
memset(mine, 0, sizeof(*mine));
|
74
61
|
mine->buff = buff;
|
75
62
|
mine->size = buffSize;
|
76
63
|
mine->client_size = used;
|
77
|
-
return (
|
78
|
-
memory_write_open, memory_write,
|
64
|
+
return (archive_write_open2(a, mine,
|
65
|
+
memory_write_open, memory_write, NULL, memory_write_free));
|
79
66
|
}
|
80
67
|
|
81
68
|
static int
|
@@ -116,11 +103,13 @@ memory_write(struct archive *a, void *client_data, const void *buff, size_t leng
|
|
116
103
|
}
|
117
104
|
|
118
105
|
static int
|
119
|
-
|
106
|
+
memory_write_free(struct archive *a, void *client_data)
|
120
107
|
{
|
121
108
|
struct write_memory_data *mine;
|
122
109
|
(void)a; /* UNUSED */
|
123
110
|
mine = client_data;
|
111
|
+
if (mine == NULL)
|
112
|
+
return (ARCHIVE_OK);
|
124
113
|
free(mine);
|
125
114
|
return (ARCHIVE_OK);
|
126
115
|
}
|
@@ -25,22 +25,60 @@
|
|
25
25
|
* $FreeBSD: head/lib/libarchive/archive_write_private.h 201155 2009-12-29 05:20:12Z kientzle $
|
26
26
|
*/
|
27
27
|
|
28
|
+
#ifndef ARCHIVE_WRITE_PRIVATE_H_INCLUDED
|
29
|
+
#define ARCHIVE_WRITE_PRIVATE_H_INCLUDED
|
30
|
+
|
28
31
|
#ifndef __LIBARCHIVE_BUILD
|
32
|
+
#ifndef __LIBARCHIVE_TEST
|
29
33
|
#error This header is only to be used internally to libarchive.
|
30
34
|
#endif
|
31
|
-
|
32
|
-
#ifndef ARCHIVE_WRITE_PRIVATE_H_INCLUDED
|
33
|
-
#define ARCHIVE_WRITE_PRIVATE_H_INCLUDED
|
35
|
+
#endif
|
34
36
|
|
35
37
|
#include "archive.h"
|
36
38
|
#include "archive_string.h"
|
37
39
|
#include "archive_private.h"
|
38
40
|
|
41
|
+
#define ARCHIVE_WRITE_FILTER_STATE_NEW 1U
|
42
|
+
#define ARCHIVE_WRITE_FILTER_STATE_OPEN 2U
|
43
|
+
#define ARCHIVE_WRITE_FILTER_STATE_CLOSED 4U
|
44
|
+
#define ARCHIVE_WRITE_FILTER_STATE_FATAL 0x8000U
|
45
|
+
|
46
|
+
struct archive_write;
|
47
|
+
|
48
|
+
struct archive_write_filter {
|
49
|
+
int64_t bytes_written;
|
50
|
+
struct archive *archive; /* Associated archive. */
|
51
|
+
struct archive_write_filter *next_filter; /* Who I write to. */
|
52
|
+
int (*options)(struct archive_write_filter *,
|
53
|
+
const char *key, const char *value);
|
54
|
+
int (*open)(struct archive_write_filter *);
|
55
|
+
int (*write)(struct archive_write_filter *, const void *, size_t);
|
56
|
+
int (*close)(struct archive_write_filter *);
|
57
|
+
int (*free)(struct archive_write_filter *);
|
58
|
+
void *data;
|
59
|
+
const char *name;
|
60
|
+
int code;
|
61
|
+
int bytes_per_block;
|
62
|
+
int bytes_in_last_block;
|
63
|
+
int state;
|
64
|
+
};
|
65
|
+
|
66
|
+
#if ARCHIVE_VERSION < 4000000
|
67
|
+
void __archive_write_filters_free(struct archive *);
|
68
|
+
#endif
|
69
|
+
|
70
|
+
struct archive_write_filter *__archive_write_allocate_filter(struct archive *);
|
71
|
+
|
72
|
+
int __archive_write_output(struct archive_write *, const void *, size_t);
|
73
|
+
int __archive_write_nulls(struct archive_write *, size_t);
|
74
|
+
int __archive_write_filter(struct archive_write_filter *, const void *, size_t);
|
75
|
+
|
39
76
|
struct archive_write {
|
40
77
|
struct archive archive;
|
41
78
|
|
42
79
|
/* Dev/ino of the archive being written. */
|
43
|
-
|
80
|
+
int skip_file_set;
|
81
|
+
int64_t skip_file_dev;
|
44
82
|
int64_t skip_file_ino;
|
45
83
|
|
46
84
|
/* Utility: Pointer to a block of nulls. */
|
@@ -51,6 +89,7 @@ struct archive_write {
|
|
51
89
|
archive_open_callback *client_opener;
|
52
90
|
archive_write_callback *client_writer;
|
53
91
|
archive_close_callback *client_closer;
|
92
|
+
archive_free_callback *client_freer;
|
54
93
|
void *client_data;
|
55
94
|
|
56
95
|
/*
|
@@ -63,29 +102,10 @@ struct archive_write {
|
|
63
102
|
int bytes_in_last_block;
|
64
103
|
|
65
104
|
/*
|
66
|
-
*
|
67
|
-
* stream gets padded or not. If pad_uncompressed is set,
|
68
|
-
* the data will be padded to a full block before being
|
69
|
-
* compressed. The pad_uncompressed_byte determines the value
|
70
|
-
* that will be used for padding. Note that these have no
|
71
|
-
* effect on compression "none."
|
72
|
-
*/
|
73
|
-
int pad_uncompressed;
|
74
|
-
int pad_uncompressed_byte; /* TODO: Support this. */
|
75
|
-
|
76
|
-
/*
|
77
|
-
* On write, the client just invokes an archive_write_set function
|
78
|
-
* which sets up the data here directly.
|
105
|
+
* First and last write filters in the pipeline.
|
79
106
|
*/
|
80
|
-
struct
|
81
|
-
|
82
|
-
void *config;
|
83
|
-
int (*init)(struct archive_write *);
|
84
|
-
int (*options)(struct archive_write *,
|
85
|
-
const char *key, const char *value);
|
86
|
-
int (*finish)(struct archive_write *);
|
87
|
-
int (*write)(struct archive_write *, const void *, size_t);
|
88
|
-
} compressor;
|
107
|
+
struct archive_write_filter *filter_first;
|
108
|
+
struct archive_write_filter *filter_last;
|
89
109
|
|
90
110
|
/*
|
91
111
|
* Pointers to format-specific functions for writing. They're
|
@@ -96,13 +116,21 @@ struct archive_write {
|
|
96
116
|
int (*format_init)(struct archive_write *);
|
97
117
|
int (*format_options)(struct archive_write *,
|
98
118
|
const char *key, const char *value);
|
99
|
-
int (*format_finish)(struct archive_write *);
|
100
|
-
int (*format_destroy)(struct archive_write *);
|
101
119
|
int (*format_finish_entry)(struct archive_write *);
|
102
120
|
int (*format_write_header)(struct archive_write *,
|
103
121
|
struct archive_entry *);
|
104
122
|
ssize_t (*format_write_data)(struct archive_write *,
|
105
123
|
const void *buff, size_t);
|
124
|
+
int (*format_close)(struct archive_write *);
|
125
|
+
int (*format_free)(struct archive_write *);
|
126
|
+
|
127
|
+
|
128
|
+
/*
|
129
|
+
* Encryption passphrase.
|
130
|
+
*/
|
131
|
+
char *passphrase;
|
132
|
+
archive_passphrase_callback *passphrase_callback;
|
133
|
+
void *passphrase_client_data;
|
106
134
|
};
|
107
135
|
|
108
136
|
/*
|
@@ -117,6 +145,21 @@ struct archive_write {
|
|
117
145
|
*/
|
118
146
|
int
|
119
147
|
__archive_write_format_header_ustar(struct archive_write *, char buff[512],
|
120
|
-
struct archive_entry *, int tartype, int strict
|
148
|
+
struct archive_entry *, int tartype, int strict,
|
149
|
+
struct archive_string_conv *);
|
150
|
+
|
151
|
+
struct archive_write_program_data;
|
152
|
+
struct archive_write_program_data * __archive_write_program_allocate(const char *program_name);
|
153
|
+
int __archive_write_program_free(struct archive_write_program_data *);
|
154
|
+
int __archive_write_program_open(struct archive_write_filter *,
|
155
|
+
struct archive_write_program_data *, const char *);
|
156
|
+
int __archive_write_program_close(struct archive_write_filter *,
|
157
|
+
struct archive_write_program_data *);
|
158
|
+
int __archive_write_program_write(struct archive_write_filter *,
|
159
|
+
struct archive_write_program_data *, const void *, size_t);
|
121
160
|
|
161
|
+
/*
|
162
|
+
* Get a encryption passphrase.
|
163
|
+
*/
|
164
|
+
const char * __archive_write_get_passphrase(struct archive_write *a);
|
122
165
|
#endif
|
@@ -36,24 +36,33 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format.c 201168 2009-1
|
|
36
36
|
|
37
37
|
#include "archive.h"
|
38
38
|
#include "archive_private.h"
|
39
|
+
#include "archive_write_set_format_private.h"
|
39
40
|
|
40
41
|
/* A table that maps format codes to functions. */
|
41
|
-
static
|
42
|
+
static const
|
42
43
|
struct { int code; int (*setter)(struct archive *); } codes[] =
|
43
44
|
{
|
45
|
+
{ ARCHIVE_FORMAT_7ZIP, archive_write_set_format_7zip },
|
44
46
|
{ ARCHIVE_FORMAT_CPIO, archive_write_set_format_cpio },
|
47
|
+
{ ARCHIVE_FORMAT_CPIO_BIN_LE, archive_write_set_format_cpio_bin },
|
48
|
+
{ ARCHIVE_FORMAT_CPIO_PWB, archive_write_set_format_cpio_pwb },
|
49
|
+
{ ARCHIVE_FORMAT_CPIO_POSIX, archive_write_set_format_cpio_odc },
|
45
50
|
{ ARCHIVE_FORMAT_CPIO_SVR4_NOCRC, archive_write_set_format_cpio_newc },
|
46
|
-
{
|
51
|
+
{ ARCHIVE_FORMAT_ISO9660, archive_write_set_format_iso9660 },
|
47
52
|
{ ARCHIVE_FORMAT_MTREE, archive_write_set_format_mtree },
|
53
|
+
{ ARCHIVE_FORMAT_RAW, archive_write_set_format_raw },
|
48
54
|
{ ARCHIVE_FORMAT_SHAR, archive_write_set_format_shar },
|
49
55
|
{ ARCHIVE_FORMAT_SHAR_BASE, archive_write_set_format_shar },
|
50
56
|
{ ARCHIVE_FORMAT_SHAR_DUMP, archive_write_set_format_shar_dump },
|
51
57
|
{ ARCHIVE_FORMAT_TAR, archive_write_set_format_pax_restricted },
|
58
|
+
{ ARCHIVE_FORMAT_TAR_GNUTAR, archive_write_set_format_gnutar },
|
52
59
|
{ ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE, archive_write_set_format_pax },
|
53
60
|
{ ARCHIVE_FORMAT_TAR_PAX_RESTRICTED,
|
54
61
|
archive_write_set_format_pax_restricted },
|
55
62
|
{ ARCHIVE_FORMAT_TAR_USTAR, archive_write_set_format_ustar },
|
56
|
-
{
|
63
|
+
{ ARCHIVE_FORMAT_WARC, archive_write_set_format_warc },
|
64
|
+
{ ARCHIVE_FORMAT_XAR, archive_write_set_format_xar },
|
65
|
+
{ ARCHIVE_FORMAT_ZIP, archive_write_set_format_zip },
|
57
66
|
{ 0, NULL }
|
58
67
|
};
|
59
68
|
|
@@ -70,3 +79,47 @@ archive_write_set_format(struct archive *a, int code)
|
|
70
79
|
archive_set_error(a, EINVAL, "No such format");
|
71
80
|
return (ARCHIVE_FATAL);
|
72
81
|
}
|
82
|
+
|
83
|
+
void
|
84
|
+
__archive_write_entry_filetype_unsupported(struct archive *a,
|
85
|
+
struct archive_entry *entry, const char *format)
|
86
|
+
{
|
87
|
+
const char *name = NULL;
|
88
|
+
|
89
|
+
switch (archive_entry_filetype(entry)) {
|
90
|
+
/*
|
91
|
+
* All formats should be able to archive regular files (AE_IFREG)
|
92
|
+
*/
|
93
|
+
case AE_IFDIR:
|
94
|
+
name = "directories";
|
95
|
+
break;
|
96
|
+
case AE_IFLNK:
|
97
|
+
name = "symbolic links";
|
98
|
+
break;
|
99
|
+
case AE_IFCHR:
|
100
|
+
name = "character devices";
|
101
|
+
break;
|
102
|
+
case AE_IFBLK:
|
103
|
+
name = "block devices";
|
104
|
+
break;
|
105
|
+
case AE_IFIFO:
|
106
|
+
name = "named pipes";
|
107
|
+
break;
|
108
|
+
case AE_IFSOCK:
|
109
|
+
name = "sockets";
|
110
|
+
break;
|
111
|
+
default:
|
112
|
+
break;
|
113
|
+
}
|
114
|
+
|
115
|
+
if (name != NULL) {
|
116
|
+
archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
|
117
|
+
"%s: %s format cannot archive %s",
|
118
|
+
archive_entry_pathname(entry), format, name);
|
119
|
+
} else {
|
120
|
+
archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
|
121
|
+
"%s: %s format cannot archive files with mode 0%lo",
|
122
|
+
archive_entry_pathname(entry), format,
|
123
|
+
(unsigned long)archive_entry_mode(entry));
|
124
|
+
}
|
125
|
+
}
|