libarchive-static 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +5 -5
  2. data/ext/extconf.rb +2 -9
  3. data/ext/libarchive-0.1.1/ext/archive_read_support_compression.c +6 -6
  4. data/ext/libarchive-0.1.1/ext/archive_read_support_compression.o +0 -0
  5. data/ext/libarchive-0.1.1/ext/archive_read_support_format.o +0 -0
  6. data/ext/libarchive-0.1.1/ext/archive_write_open_rb_str.c +1 -1
  7. data/ext/libarchive-0.1.1/ext/archive_write_open_rb_str.o +0 -0
  8. data/ext/libarchive-0.1.1/ext/archive_write_set_compression.c +5 -5
  9. data/ext/libarchive-0.1.1/ext/archive_write_set_compression.o +0 -0
  10. data/ext/libarchive-0.1.1/ext/config.h +23 -0
  11. data/ext/libarchive-0.1.1/ext/config.log +230 -0
  12. data/ext/libarchive-0.1.1/ext/config.status +671 -0
  13. data/ext/libarchive-0.1.1/ext/libarchive.c +1 -1
  14. data/ext/libarchive-0.1.1/ext/libarchive.o +0 -0
  15. data/ext/libarchive-0.1.1/ext/libarchive_archive.c +7 -7
  16. data/ext/libarchive-0.1.1/ext/libarchive_archive.o +0 -0
  17. data/ext/libarchive-0.1.1/ext/libarchive_entry.c +6 -0
  18. data/ext/libarchive-0.1.1/ext/libarchive_entry.o +0 -0
  19. data/ext/libarchive-0.1.1/ext/libarchive_internal.h +0 -1
  20. data/ext/libarchive-0.1.1/ext/libarchive_reader.c +6 -4
  21. data/ext/libarchive-0.1.1/ext/libarchive_reader.o +0 -0
  22. data/ext/libarchive-0.1.1/ext/libarchive_ruby.so +0 -0
  23. data/ext/libarchive-0.1.1/ext/libarchive_win32.h +1 -1
  24. data/ext/libarchive-0.1.1/ext/libarchive_writer.c +2 -2
  25. data/ext/libarchive-0.1.1/ext/libarchive_writer.o +0 -0
  26. data/ext/libarchive-3.6.2/Makefile.in +16892 -0
  27. data/ext/libarchive-3.6.2/build/autoconf/ax_append_compile_flags.m4 +67 -0
  28. data/ext/libarchive-3.6.2/build/autoconf/ax_append_flag.m4 +71 -0
  29. data/ext/libarchive-3.6.2/build/autoconf/ax_check_compile_flag.m4 +74 -0
  30. data/ext/libarchive-3.6.2/build/autoconf/ax_require_defined.m4 +37 -0
  31. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/build/autoconf/check_stdcall_func.m4 +0 -0
  32. data/ext/libarchive-3.6.2/build/autoconf/compile +348 -0
  33. data/ext/libarchive-3.6.2/build/autoconf/config.guess +1754 -0
  34. data/ext/libarchive-3.6.2/build/autoconf/config.rpath +696 -0
  35. data/ext/libarchive-3.6.2/build/autoconf/config.sub +1890 -0
  36. data/ext/libarchive-3.6.2/build/autoconf/depcomp +791 -0
  37. data/ext/libarchive-3.6.2/build/autoconf/iconv.m4 +271 -0
  38. data/ext/libarchive-3.6.2/build/autoconf/install-sh +541 -0
  39. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/build/autoconf/la_uid_t.m4 +0 -0
  40. data/ext/libarchive-3.6.2/build/autoconf/lib-ld.m4 +109 -0
  41. data/ext/libarchive-3.6.2/build/autoconf/lib-link.m4 +777 -0
  42. data/ext/libarchive-3.6.2/build/autoconf/lib-prefix.m4 +224 -0
  43. data/ext/libarchive-3.6.2/build/autoconf/ltmain.sh +11251 -0
  44. data/ext/libarchive-3.6.2/build/autoconf/m4_ax_compile_check_sizeof.m4 +115 -0
  45. data/ext/libarchive-3.6.2/build/autoconf/missing +215 -0
  46. data/ext/libarchive-3.6.2/build/autoconf/test-driver +153 -0
  47. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/build/pkgconfig/libarchive.pc.in +4 -1
  48. data/ext/libarchive-3.6.2/config.h.in +1504 -0
  49. data/ext/libarchive-3.6.2/configure +25558 -0
  50. data/ext/libarchive-3.6.2/libarchive/archive.h +1212 -0
  51. data/ext/libarchive-3.6.2/libarchive/archive_acl.c +2097 -0
  52. data/ext/libarchive-3.6.2/libarchive/archive_acl_private.h +83 -0
  53. data/ext/libarchive-3.6.2/libarchive/archive_blake2.h +197 -0
  54. data/ext/libarchive-3.6.2/libarchive/archive_blake2_impl.h +161 -0
  55. data/ext/libarchive-3.6.2/libarchive/archive_blake2s_ref.c +369 -0
  56. data/ext/libarchive-3.6.2/libarchive/archive_blake2sp_ref.c +361 -0
  57. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_check_magic.c +63 -22
  58. data/ext/libarchive-3.6.2/libarchive/archive_cmdline.c +227 -0
  59. data/ext/libarchive-3.6.2/libarchive/archive_cmdline_private.h +47 -0
  60. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_crc32.h +17 -0
  61. data/ext/libarchive-3.6.2/libarchive/archive_cryptor.c +534 -0
  62. data/ext/libarchive-3.6.2/libarchive/archive_cryptor_private.h +188 -0
  63. data/ext/libarchive-3.6.2/libarchive/archive_digest.c +1505 -0
  64. data/ext/libarchive-3.6.2/libarchive/archive_digest_private.h +416 -0
  65. data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_darwin.c +559 -0
  66. data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_freebsd.c +712 -0
  67. data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_linux.c +760 -0
  68. data/ext/libarchive-3.6.2/libarchive/archive_disk_acl_sunos.c +824 -0
  69. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_endian.h +48 -15
  70. data/ext/libarchive-3.6.2/libarchive/archive_entry.c +2149 -0
  71. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry.h +305 -106
  72. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_copy_bhfi.c +5 -4
  73. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_copy_stat.c +9 -3
  74. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_link_resolver.c +104 -62
  75. data/ext/libarchive-3.6.2/libarchive/archive_entry_locale.h +92 -0
  76. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_private.h +65 -49
  77. data/ext/libarchive-3.6.2/libarchive/archive_entry_sparse.c +156 -0
  78. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_stat.c +6 -6
  79. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_strmode.c +1 -1
  80. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_entry_xattr.c +4 -6
  81. data/ext/libarchive-3.6.2/libarchive/archive_getdate.c +1165 -0
  82. data/ext/libarchive-3.6.2/libarchive/archive_getdate.h +39 -0
  83. data/ext/libarchive-3.6.2/libarchive/archive_hmac.c +334 -0
  84. data/ext/libarchive-3.6.2/libarchive/archive_hmac_private.h +117 -0
  85. data/ext/libarchive-3.6.2/libarchive/archive_match.c +1875 -0
  86. data/ext/libarchive-3.6.2/libarchive/archive_openssl_evp_private.h +53 -0
  87. data/ext/libarchive-3.6.2/libarchive/archive_openssl_hmac_private.h +54 -0
  88. data/ext/libarchive-3.6.2/libarchive/archive_options.c +218 -0
  89. data/ext/libarchive-3.6.2/libarchive/archive_options_private.h +51 -0
  90. data/ext/libarchive-3.6.2/libarchive/archive_pack_dev.c +337 -0
  91. data/ext/libarchive-3.6.2/libarchive/archive_pack_dev.h +49 -0
  92. data/ext/libarchive-3.6.2/libarchive/archive_pathmatch.c +463 -0
  93. data/ext/libarchive-3.6.2/libarchive/archive_pathmatch.h +52 -0
  94. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_platform.h +77 -9
  95. data/ext/libarchive-3.6.2/libarchive/archive_platform_acl.h +55 -0
  96. data/ext/libarchive-3.6.2/libarchive/archive_platform_xattr.h +47 -0
  97. data/ext/libarchive-3.6.2/libarchive/archive_ppmd7.c +1168 -0
  98. data/ext/libarchive-3.6.2/libarchive/archive_ppmd7_private.h +119 -0
  99. data/ext/libarchive-3.6.2/libarchive/archive_ppmd8.c +1287 -0
  100. data/ext/libarchive-3.6.2/libarchive/archive_ppmd8_private.h +148 -0
  101. data/ext/libarchive-3.6.2/libarchive/archive_ppmd_private.h +151 -0
  102. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_private.h +74 -18
  103. data/ext/libarchive-3.6.2/libarchive/archive_random.c +272 -0
  104. data/ext/libarchive-3.6.2/libarchive/archive_random_private.h +36 -0
  105. data/ext/libarchive-3.6.2/libarchive/archive_rb.c +709 -0
  106. data/ext/libarchive-3.6.2/libarchive/archive_rb.h +113 -0
  107. data/ext/libarchive-3.6.2/libarchive/archive_read.c +1756 -0
  108. data/ext/libarchive-3.6.2/libarchive/archive_read_add_passphrase.c +190 -0
  109. data/ext/libarchive-3.6.2/libarchive/archive_read_append_filter.c +204 -0
  110. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_data_into_fd.c +64 -18
  111. data/ext/libarchive-3.6.2/libarchive/archive_read_disk_entry_from_file.c +1086 -0
  112. data/ext/libarchive-3.6.2/libarchive/archive_read_disk_posix.c +2732 -0
  113. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_disk_private.h +40 -4
  114. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_disk_set_standard_lookup.c +21 -11
  115. data/ext/libarchive-3.6.2/libarchive/archive_read_disk_windows.c +2479 -0
  116. data/ext/libarchive-3.6.2/libarchive/archive_read_extract.c +60 -0
  117. data/ext/{libarchive-2.8.4/libarchive/archive_read_extract.c → libarchive-3.6.2/libarchive/archive_read_extract2.c} +34 -61
  118. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_open_fd.c +70 -49
  119. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_open_file.c +38 -23
  120. data/ext/libarchive-3.6.2/libarchive/archive_read_open_filename.c +586 -0
  121. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_open_memory.c +58 -28
  122. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_private.h +127 -59
  123. data/ext/libarchive-3.6.2/libarchive/archive_read_set_format.c +117 -0
  124. data/ext/libarchive-3.6.2/libarchive/archive_read_set_options.c +133 -0
  125. 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
  126. data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_by_code.c +83 -0
  127. 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
  128. 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
  129. data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_grzip.c +112 -0
  130. 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
  131. data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_lrzip.c +122 -0
  132. data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_lz4.c +742 -0
  133. data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_lzop.c +499 -0
  134. 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
  135. 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
  136. 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
  137. 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
  138. 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
  139. data/ext/libarchive-3.6.2/libarchive/archive_read_support_filter_zstd.c +297 -0
  140. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_7zip.c +3900 -0
  141. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_all.c +89 -0
  142. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_ar.c +126 -72
  143. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_by_code.c +92 -0
  144. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_cab.c +3228 -0
  145. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_cpio.c +1104 -0
  146. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_empty.c +14 -11
  147. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_iso9660.c +990 -541
  148. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_lha.c +2916 -0
  149. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_mtree.c +2150 -0
  150. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_rar.c +3797 -0
  151. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_rar5.c +4251 -0
  152. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_raw.c +38 -31
  153. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_tar.c +1157 -629
  154. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_warc.c +848 -0
  155. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_read_support_format_xar.c +439 -258
  156. data/ext/libarchive-3.6.2/libarchive/archive_read_support_format_zip.c +4270 -0
  157. data/ext/libarchive-3.6.2/libarchive/archive_string.c +4240 -0
  158. data/ext/libarchive-3.6.2/libarchive/archive_string.h +243 -0
  159. data/ext/libarchive-3.6.2/libarchive/archive_string_composition.h +2292 -0
  160. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_string_sprintf.c +44 -16
  161. data/ext/libarchive-3.6.2/libarchive/archive_util.c +655 -0
  162. data/ext/libarchive-3.6.2/libarchive/archive_version_details.c +151 -0
  163. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_virtual.c +85 -16
  164. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_windows.c +214 -541
  165. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_windows.h +74 -106
  166. data/ext/libarchive-3.6.2/libarchive/archive_write.c +828 -0
  167. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter.c +72 -0
  168. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_b64encode.c +304 -0
  169. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_by_name.c +77 -0
  170. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_bzip2.c +401 -0
  171. 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
  172. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_grzip.c +135 -0
  173. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_gzip.c +442 -0
  174. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_lrzip.c +197 -0
  175. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_lz4.c +700 -0
  176. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_lzop.c +478 -0
  177. 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
  178. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_program.c +391 -0
  179. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_uuencode.c +295 -0
  180. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_xz.c +545 -0
  181. data/ext/libarchive-3.6.2/libarchive/archive_write_add_filter_zstd.c +418 -0
  182. data/ext/libarchive-3.6.2/libarchive/archive_write_disk_posix.c +4711 -0
  183. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_disk_private.h +9 -2
  184. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_disk_set_standard_lookup.c +30 -29
  185. data/ext/libarchive-3.6.2/libarchive/archive_write_disk_windows.c +2842 -0
  186. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_fd.c +15 -10
  187. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_file.c +15 -9
  188. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_filename.c +128 -20
  189. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_open_memory.c +7 -18
  190. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_private.h +72 -29
  191. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format.c +56 -3
  192. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_7zip.c +2322 -0
  193. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_ar.c +54 -34
  194. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_by_name.c +20 -2
  195. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio.c +11 -0
  196. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio_binary.c +610 -0
  197. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio_newc.c +457 -0
  198. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_cpio_odc.c +500 -0
  199. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_filter_by_ext.c +142 -0
  200. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_gnutar.c +755 -0
  201. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_iso9660.c +8165 -0
  202. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_mtree.c +2217 -0
  203. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_pax.c +1049 -387
  204. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_private.h +42 -0
  205. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_raw.c +125 -0
  206. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_shar.c +62 -47
  207. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/archive_write_set_format_ustar.c +279 -108
  208. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_v7tar.c +638 -0
  209. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_warc.c +453 -0
  210. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_xar.c +3259 -0
  211. data/ext/libarchive-3.6.2/libarchive/archive_write_set_format_zip.c +1704 -0
  212. data/ext/libarchive-3.6.2/libarchive/archive_write_set_options.c +130 -0
  213. data/ext/libarchive-3.6.2/libarchive/archive_write_set_passphrase.c +95 -0
  214. data/ext/libarchive-3.6.2/libarchive/archive_xxhash.h +48 -0
  215. data/ext/libarchive-3.6.2/libarchive/config_freebsd.h +271 -0
  216. data/ext/{libarchive-2.8.4 → libarchive-3.6.2}/libarchive/filter_fork.h +10 -5
  217. data/ext/{libarchive-2.8.4/libarchive/filter_fork.c → libarchive-3.6.2/libarchive/filter_fork_posix.c} +98 -19
  218. data/ext/libarchive-3.6.2/libarchive/filter_fork_windows.c +236 -0
  219. data/ext/libarchive-3.6.2/libarchive/xxhash.c +525 -0
  220. data/ext/libarchive-static-makefile +144 -80
  221. data/ext/libarchive-static-wrapper-makefile +1 -1
  222. data/ext/zlib-1.2.13/Makefile.in +404 -0
  223. data/ext/{zlib-1.2.5 → zlib-1.2.13}/adler32.c +51 -34
  224. data/ext/{zlib-1.2.5 → zlib-1.2.13}/compress.c +27 -21
  225. data/ext/zlib-1.2.13/configure +922 -0
  226. data/ext/zlib-1.2.13/crc32.c +1125 -0
  227. data/ext/zlib-1.2.13/crc32.h +9446 -0
  228. data/ext/{zlib-1.2.5 → zlib-1.2.13}/deflate.c +842 -459
  229. data/ext/{zlib-1.2.5 → zlib-1.2.13}/deflate.h +37 -33
  230. data/ext/{zlib-1.2.5 → zlib-1.2.13}/gzclose.c +0 -0
  231. data/ext/{zlib-1.2.5 → zlib-1.2.13}/gzguts.h +103 -16
  232. data/ext/{zlib-1.2.5 → zlib-1.2.13}/gzlib.c +155 -53
  233. data/ext/zlib-1.2.13/gzread.c +650 -0
  234. data/ext/zlib-1.2.13/gzwrite.c +677 -0
  235. data/ext/{zlib-1.2.5 → zlib-1.2.13}/infback.c +24 -12
  236. data/ext/{zlib-1.2.5 → zlib-1.2.13}/inffast.c +49 -66
  237. data/ext/{zlib-1.2.5 → zlib-1.2.13}/inffast.h +0 -0
  238. data/ext/{zlib-1.2.5 → zlib-1.2.13}/inffixed.h +3 -3
  239. data/ext/{zlib-1.2.5 → zlib-1.2.13}/inflate.c +209 -94
  240. data/ext/{zlib-1.2.5 → zlib-1.2.13}/inflate.h +9 -5
  241. data/ext/{zlib-1.2.5 → zlib-1.2.13}/inftrees.c +24 -50
  242. data/ext/{zlib-1.2.5 → zlib-1.2.13}/inftrees.h +1 -1
  243. data/ext/{zlib-1.2.5 → zlib-1.2.13}/trees.c +135 -198
  244. data/ext/{zlib-1.2.5 → zlib-1.2.13}/trees.h +0 -0
  245. data/ext/zlib-1.2.13/uncompr.c +93 -0
  246. data/ext/{zlib-1.2.5 → zlib-1.2.13}/zconf.h +182 -63
  247. data/ext/{zlib-1.2.5 → zlib-1.2.13}/zlib.h +617 -295
  248. data/ext/{zlib-1.2.5 → zlib-1.2.13}/zutil.c +50 -41
  249. data/ext/{zlib-1.2.5 → zlib-1.2.13}/zutil.h +83 -82
  250. metadata +244 -137
  251. data/ext/libarchive-0.1.1/libarchive.c +0 -1762
  252. data/ext/libarchive-2.8.4/Makefile.in +0 -7076
  253. data/ext/libarchive-2.8.4/build/autoconf/compile +0 -143
  254. data/ext/libarchive-2.8.4/build/autoconf/config.guess +0 -1502
  255. data/ext/libarchive-2.8.4/build/autoconf/config.sub +0 -1708
  256. data/ext/libarchive-2.8.4/build/autoconf/depcomp +0 -630
  257. data/ext/libarchive-2.8.4/build/autoconf/install-sh +0 -291
  258. data/ext/libarchive-2.8.4/build/autoconf/ltmain.sh +0 -8406
  259. data/ext/libarchive-2.8.4/build/autoconf/missing +0 -376
  260. data/ext/libarchive-2.8.4/config.h.in +0 -772
  261. data/ext/libarchive-2.8.4/configure +0 -17916
  262. data/ext/libarchive-2.8.4/libarchive/archive.h +0 -741
  263. data/ext/libarchive-2.8.4/libarchive/archive_entry.c +0 -2202
  264. data/ext/libarchive-2.8.4/libarchive/archive_hash.h +0 -281
  265. data/ext/libarchive-2.8.4/libarchive/archive_read.c +0 -1249
  266. data/ext/libarchive-2.8.4/libarchive/archive_read_disk.c +0 -198
  267. data/ext/libarchive-2.8.4/libarchive/archive_read_disk_entry_from_file.c +0 -570
  268. data/ext/libarchive-2.8.4/libarchive/archive_read_open_filename.c +0 -272
  269. data/ext/libarchive-2.8.4/libarchive/archive_read_support_format_cpio.c +0 -777
  270. data/ext/libarchive-2.8.4/libarchive/archive_read_support_format_mtree.c +0 -1304
  271. data/ext/libarchive-2.8.4/libarchive/archive_read_support_format_zip.c +0 -903
  272. data/ext/libarchive-2.8.4/libarchive/archive_string.c +0 -453
  273. data/ext/libarchive-2.8.4/libarchive/archive_string.h +0 -148
  274. data/ext/libarchive-2.8.4/libarchive/archive_util.c +0 -391
  275. data/ext/libarchive-2.8.4/libarchive/archive_write.c +0 -466
  276. data/ext/libarchive-2.8.4/libarchive/archive_write_disk.c +0 -2628
  277. data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_bzip2.c +0 -408
  278. data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_gzip.c +0 -477
  279. data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_none.c +0 -257
  280. data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_program.c +0 -347
  281. data/ext/libarchive-2.8.4/libarchive/archive_write_set_compression_xz.c +0 -438
  282. data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_cpio.c +0 -344
  283. data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_cpio_newc.c +0 -295
  284. data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_mtree.c +0 -1050
  285. data/ext/libarchive-2.8.4/libarchive/archive_write_set_format_zip.c +0 -667
  286. data/ext/libarchive-2.8.4/libarchive/config_freebsd.h +0 -154
  287. data/ext/libarchive-2.8.4/libarchive/filter_fork_windows.c +0 -113
  288. data/ext/zlib-1.2.5/Makefile.in +0 -257
  289. data/ext/zlib-1.2.5/configure +0 -596
  290. data/ext/zlib-1.2.5/crc32.c +0 -442
  291. data/ext/zlib-1.2.5/crc32.h +0 -441
  292. data/ext/zlib-1.2.5/example.c +0 -565
  293. data/ext/zlib-1.2.5/gzread.c +0 -653
  294. data/ext/zlib-1.2.5/gzwrite.c +0 -531
  295. data/ext/zlib-1.2.5/minigzip.c +0 -440
  296. data/ext/zlib-1.2.5/uncompr.c +0 -59
@@ -0,0 +1,148 @@
1
+ /* Ppmd8.h -- PPMdI codec
2
+ 2011-01-27 : Igor Pavlov : Public domain
3
+ This code is based on:
4
+ PPMd var.I (2002): Dmitry Shkarin : Public domain
5
+ Carryless rangecoder (1999): Dmitry Subbotin : Public domain */
6
+
7
+ #ifndef ARCHIVE_PPMD8_PRIVATE_H_INCLUDED
8
+ #define ARCHIVE_PPMD8_PRIVATE_H_INCLUDED
9
+
10
+ #include "archive_ppmd_private.h"
11
+
12
+ #define PPMD8_MIN_ORDER 2
13
+ #define PPMD8_MAX_ORDER 16
14
+
15
+ struct CPpmd8_Context_;
16
+
17
+ typedef
18
+ #ifdef PPMD_32BIT
19
+ struct CPpmd8_Context_ *
20
+ #else
21
+ UInt32
22
+ #endif
23
+ CPpmd8_Context_Ref;
24
+
25
+ #pragma pack(push, 1)
26
+
27
+ typedef struct CPpmd8_Context_
28
+ {
29
+ Byte NumStats;
30
+ Byte Flags;
31
+ UInt16 SummFreq;
32
+ CPpmd_State_Ref Stats;
33
+ CPpmd8_Context_Ref Suffix;
34
+ } CPpmd8_Context;
35
+
36
+ #pragma pack(pop)
37
+
38
+ #define Ppmd8Context_OneState(p) ((CPpmd_State *)&(p)->SummFreq)
39
+
40
+ /* The BUG in Shkarin's code for FREEZE mode was fixed, but that fixed
41
+ code is not compatible with original code for some files compressed
42
+ in FREEZE mode. So we disable FREEZE mode support. */
43
+
44
+ enum
45
+ {
46
+ PPMD8_RESTORE_METHOD_RESTART,
47
+ PPMD8_RESTORE_METHOD_CUT_OFF
48
+ #ifdef PPMD8_FREEZE_SUPPORT
49
+ , PPMD8_RESTORE_METHOD_FREEZE
50
+ #endif
51
+ };
52
+
53
+ typedef struct
54
+ {
55
+ CPpmd8_Context *MinContext, *MaxContext;
56
+ CPpmd_State *FoundState;
57
+ unsigned OrderFall, InitEsc, PrevSuccess, MaxOrder;
58
+ Int32 RunLength, InitRL; /* must be 32-bit at least */
59
+
60
+ UInt32 Size;
61
+ UInt32 GlueCount;
62
+ Byte *Base, *LoUnit, *HiUnit, *Text, *UnitsStart;
63
+ UInt32 AlignOffset;
64
+ unsigned RestoreMethod;
65
+
66
+ /* Range Coder */
67
+ UInt32 Range;
68
+ UInt32 Code;
69
+ UInt32 Low;
70
+ union
71
+ {
72
+ IByteIn *In;
73
+ IByteOut *Out;
74
+ } Stream;
75
+
76
+ Byte Indx2Units[PPMD_NUM_INDEXES];
77
+ Byte Units2Indx[128];
78
+ CPpmd_Void_Ref FreeList[PPMD_NUM_INDEXES];
79
+ UInt32 Stamps[PPMD_NUM_INDEXES];
80
+
81
+ Byte NS2BSIndx[256], NS2Indx[260];
82
+ CPpmd_See DummySee, See[24][32];
83
+ UInt16 BinSumm[25][64];
84
+ } CPpmd8;
85
+
86
+ void Ppmd8_Construct(CPpmd8 *p);
87
+ Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size);
88
+ void Ppmd8_Free(CPpmd8 *p);
89
+ void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod);
90
+ #define Ppmd8_WasAllocated(p) ((p)->Base != NULL)
91
+
92
+
93
+ /* ---------- Internal Functions ---------- */
94
+
95
+ extern const Byte PPMD8_kExpEscape[16];
96
+
97
+ #ifdef PPMD_32BIT
98
+ #define Ppmd8_GetPtr(p, ptr) (ptr)
99
+ #define Ppmd8_GetContext(p, ptr) (ptr)
100
+ #define Ppmd8_GetStats(p, ctx) ((ctx)->Stats)
101
+ #else
102
+ #define Ppmd8_GetPtr(p, offs) ((void *)((p)->Base + (offs)))
103
+ #define Ppmd8_GetContext(p, offs) ((CPpmd8_Context *)Ppmd8_GetPtr((p), (offs)))
104
+ #define Ppmd8_GetStats(p, ctx) ((CPpmd_State *)Ppmd8_GetPtr((p), ((ctx)->Stats)))
105
+ #endif
106
+
107
+ void Ppmd8_Update1(CPpmd8 *p);
108
+ void Ppmd8_Update1_0(CPpmd8 *p);
109
+ void Ppmd8_Update2(CPpmd8 *p);
110
+ void Ppmd8_UpdateBin(CPpmd8 *p);
111
+
112
+ #define Ppmd8_GetBinSumm(p) \
113
+ &p->BinSumm[p->NS2Indx[Ppmd8Context_OneState(p->MinContext)->Freq - 1]][ \
114
+ p->NS2BSIndx[Ppmd8_GetContext(p, p->MinContext->Suffix)->NumStats] + \
115
+ p->PrevSuccess + p->MinContext->Flags + ((p->RunLength >> 26) & 0x20)]
116
+
117
+ CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked, UInt32 *scale);
118
+
119
+
120
+ /* ---------- Decode ---------- */
121
+
122
+ Bool Ppmd8_RangeDec_Init(CPpmd8 *p);
123
+ #define Ppmd8_RangeDec_IsFinishedOK(p) ((p)->Code == 0)
124
+ int Ppmd8_DecodeSymbol(CPpmd8 *p); /* returns: -1 as EndMarker, -2 as DataError */
125
+
126
+ /* ---------- Encode ---------- */
127
+
128
+ #define Ppmd8_RangeEnc_Init(p) { (p)->Low = 0; (p)->Range = 0xFFFFFFFF; }
129
+ void Ppmd8_RangeEnc_FlushData(CPpmd8 *p);
130
+ void Ppmd8_EncodeSymbol(CPpmd8 *p, int symbol); /* symbol = -1 means EndMarker */
131
+
132
+ typedef struct
133
+ {
134
+ /* Base Functions */
135
+ void (*Ppmd8_Construct)(CPpmd8 *p);
136
+ Bool (*Ppmd8_Alloc)(CPpmd8 *p, UInt32 size);
137
+ void (*Ppmd8_Free)(CPpmd8 *p);
138
+ void (*Ppmd8_Init)(CPpmd8 *p, unsigned max_order, unsigned restore_method);
139
+ #define Ppmd7_WasAllocated(p) ((p)->Base != NULL)
140
+
141
+ /* Decode Functions */
142
+ int (*Ppmd8_RangeDec_Init)(CPpmd8 *p);
143
+ int (*Ppmd8_DecodeSymbol)(CPpmd8 *p);
144
+ } IPpmd8;
145
+
146
+ extern const IPpmd8 __archive_ppmd8_functions;
147
+
148
+ #endif
@@ -0,0 +1,151 @@
1
+ /* Ppmd.h -- PPMD codec common code
2
+ 2010-03-12 : Igor Pavlov : Public domain
3
+ This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
4
+
5
+ #ifndef ARCHIVE_PPMD_PRIVATE_H_INCLUDED
6
+ #define ARCHIVE_PPMD_PRIVATE_H_INCLUDED
7
+
8
+ #ifndef __LIBARCHIVE_BUILD
9
+ #error This header is only to be used internally to libarchive.
10
+ #endif
11
+
12
+ #include <stddef.h>
13
+
14
+ #include "archive_read_private.h"
15
+
16
+ /*** Begin defined in Types.h ***/
17
+
18
+ #if !defined(ZCONF_H)
19
+ typedef unsigned char Byte;
20
+ #endif
21
+ typedef short Int16;
22
+ typedef unsigned short UInt16;
23
+
24
+ #ifdef _LZMA_UINT32_IS_ULONG
25
+ typedef long Int32;
26
+ typedef unsigned long UInt32;
27
+ #else
28
+ typedef int Int32;
29
+ typedef unsigned int UInt32;
30
+ #endif
31
+
32
+ #ifdef _SZ_NO_INT_64
33
+
34
+ /* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
35
+ NOTES: Some code will work incorrectly in that case! */
36
+
37
+ typedef long Int64;
38
+ typedef unsigned long UInt64;
39
+
40
+ #else
41
+
42
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
43
+ typedef __int64 Int64;
44
+ typedef unsigned __int64 UInt64;
45
+ #define UINT64_CONST(n) n
46
+ #else
47
+ typedef long long int Int64;
48
+ typedef unsigned long long int UInt64;
49
+ #define UINT64_CONST(n) n ## ULL
50
+ #endif
51
+
52
+ #endif
53
+
54
+ typedef int Bool;
55
+ #define True 1
56
+ #define False 0
57
+
58
+ /* The following interfaces use first parameter as pointer to structure */
59
+
60
+ typedef struct
61
+ {
62
+ struct archive_read *a;
63
+ Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */
64
+ } IByteIn;
65
+
66
+ typedef struct
67
+ {
68
+ struct archive_write *a;
69
+ void (*Write)(void *p, Byte b);
70
+ } IByteOut;
71
+
72
+ /*** End defined in Types.h ***/
73
+ /*** Begin defined in CpuArch.h ***/
74
+
75
+ #if defined(_M_IX86) || defined(__i386__)
76
+ #define MY_CPU_X86
77
+ #endif
78
+
79
+ #if defined(MY_CPU_X86) || defined(_M_ARM)
80
+ #define MY_CPU_32BIT
81
+ #endif
82
+
83
+ #ifdef MY_CPU_32BIT
84
+ #define PPMD_32BIT
85
+ #endif
86
+
87
+ /*** End defined in CpuArch.h ***/
88
+
89
+ #define PPMD_INT_BITS 7
90
+ #define PPMD_PERIOD_BITS 7
91
+ #define PPMD_BIN_SCALE (1 << (PPMD_INT_BITS + PPMD_PERIOD_BITS))
92
+
93
+ #define PPMD_GET_MEAN_SPEC(summ, shift, round) (((summ) + (1 << ((shift) - (round)))) >> (shift))
94
+ #define PPMD_GET_MEAN(summ) PPMD_GET_MEAN_SPEC((summ), PPMD_PERIOD_BITS, 2)
95
+ #define PPMD_UPDATE_PROB_0(prob) ((prob) + (1 << PPMD_INT_BITS) - PPMD_GET_MEAN(prob))
96
+ #define PPMD_UPDATE_PROB_1(prob) ((prob) - PPMD_GET_MEAN(prob))
97
+
98
+ #define PPMD_N1 4
99
+ #define PPMD_N2 4
100
+ #define PPMD_N3 4
101
+ #define PPMD_N4 ((128 + 3 - 1 * PPMD_N1 - 2 * PPMD_N2 - 3 * PPMD_N3) / 4)
102
+ #define PPMD_NUM_INDEXES (PPMD_N1 + PPMD_N2 + PPMD_N3 + PPMD_N4)
103
+
104
+ /* SEE-contexts for PPM-contexts with masked symbols */
105
+ typedef struct
106
+ {
107
+ UInt16 Summ; /* Freq */
108
+ Byte Shift; /* Speed of Freq change; low Shift is for fast change */
109
+ Byte Count; /* Count to next change of Shift */
110
+ } CPpmd_See;
111
+
112
+ #define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \
113
+ { (p)->Summ <<= 1; (p)->Count = (Byte)(3 << (p)->Shift++); }
114
+
115
+ typedef struct
116
+ {
117
+ Byte Symbol;
118
+ Byte Freq;
119
+ UInt16 SuccessorLow;
120
+ UInt16 SuccessorHigh;
121
+ } CPpmd_State;
122
+
123
+ typedef
124
+ #ifdef PPMD_32BIT
125
+ CPpmd_State *
126
+ #else
127
+ UInt32
128
+ #endif
129
+ CPpmd_State_Ref;
130
+
131
+ typedef
132
+ #ifdef PPMD_32BIT
133
+ void *
134
+ #else
135
+ UInt32
136
+ #endif
137
+ CPpmd_Void_Ref;
138
+
139
+ typedef
140
+ #ifdef PPMD_32BIT
141
+ Byte *
142
+ #else
143
+ UInt32
144
+ #endif
145
+ CPpmd_Byte_Ref;
146
+
147
+ #define PPMD_SetAllBitsIn256Bytes(p) \
148
+ { unsigned j; for (j = 0; j < 256 / sizeof(p[0]); j += 8) { \
149
+ p[j+7] = p[j+6] = p[j+5] = p[j+4] = p[j+3] = p[j+2] = p[j+1] = p[j+0] = ~(size_t)0; }}
150
+
151
+ #endif
@@ -25,12 +25,16 @@
25
25
  * $FreeBSD: head/lib/libarchive/archive_private.h 201098 2009-12-28 02:58:14Z kientzle $
26
26
  */
27
27
 
28
+ #ifndef ARCHIVE_PRIVATE_H_INCLUDED
29
+ #define ARCHIVE_PRIVATE_H_INCLUDED
30
+
28
31
  #ifndef __LIBARCHIVE_BUILD
29
32
  #error This header is only to be used internally to libarchive.
30
33
  #endif
31
34
 
32
- #ifndef ARCHIVE_PRIVATE_H_INCLUDED
33
- #define ARCHIVE_PRIVATE_H_INCLUDED
35
+ #if HAVE_ICONV_H
36
+ #include <iconv.h>
37
+ #endif
34
38
 
35
39
  #include "archive.h"
36
40
  #include "archive_string.h"
@@ -42,32 +46,53 @@
42
46
  #define __LA_DEAD
43
47
  #endif
44
48
 
49
+ #if defined(__GNUC__) && (__GNUC__ > 2 || \
50
+ (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
51
+ #define __LA_UNUSED __attribute__((__unused__))
52
+ #else
53
+ #define __LA_UNUSED
54
+ #endif
55
+
45
56
  #define ARCHIVE_WRITE_MAGIC (0xb0c5c0deU)
46
57
  #define ARCHIVE_READ_MAGIC (0xdeb0c5U)
47
58
  #define ARCHIVE_WRITE_DISK_MAGIC (0xc001b0c5U)
48
59
  #define ARCHIVE_READ_DISK_MAGIC (0xbadb0c5U)
60
+ #define ARCHIVE_MATCH_MAGIC (0xcad11c9U)
49
61
 
50
- #define ARCHIVE_STATE_ANY 0xFFFFU
51
62
  #define ARCHIVE_STATE_NEW 1U
52
63
  #define ARCHIVE_STATE_HEADER 2U
53
64
  #define ARCHIVE_STATE_DATA 4U
54
- #define ARCHIVE_STATE_DATA_END 8U
55
65
  #define ARCHIVE_STATE_EOF 0x10U
56
66
  #define ARCHIVE_STATE_CLOSED 0x20U
57
67
  #define ARCHIVE_STATE_FATAL 0x8000U
68
+ #define ARCHIVE_STATE_ANY (0xFFFFU & ~ARCHIVE_STATE_FATAL)
58
69
 
59
70
  struct archive_vtable {
60
71
  int (*archive_close)(struct archive *);
61
- int (*archive_finish)(struct archive *);
72
+ int (*archive_free)(struct archive *);
62
73
  int (*archive_write_header)(struct archive *,
63
74
  struct archive_entry *);
64
75
  int (*archive_write_finish_entry)(struct archive *);
65
76
  ssize_t (*archive_write_data)(struct archive *,
66
77
  const void *, size_t);
67
78
  ssize_t (*archive_write_data_block)(struct archive *,
68
- const void *, size_t, off_t);
79
+ const void *, size_t, int64_t);
80
+
81
+ int (*archive_read_next_header)(struct archive *,
82
+ struct archive_entry **);
83
+ int (*archive_read_next_header2)(struct archive *,
84
+ struct archive_entry *);
85
+ int (*archive_read_data_block)(struct archive *,
86
+ const void **, size_t *, int64_t *);
87
+
88
+ int (*archive_filter_count)(struct archive *);
89
+ int64_t (*archive_filter_bytes)(struct archive *, int);
90
+ int (*archive_filter_code)(struct archive *, int);
91
+ const char * (*archive_filter_name)(struct archive *, int);
69
92
  };
70
93
 
94
+ struct archive_string_conv;
95
+
71
96
  struct archive {
72
97
  /*
73
98
  * The magic/state values are used to sanity-check the
@@ -82,34 +107,65 @@ struct archive {
82
107
  * Some public API functions depend on the "real" type of the
83
108
  * archive object.
84
109
  */
85
- struct archive_vtable *vtable;
110
+ const struct archive_vtable *vtable;
86
111
 
87
112
  int archive_format;
88
113
  const char *archive_format_name;
89
114
 
90
- int compression_code; /* Currently active compression. */
91
- const char *compression_name;
92
-
93
- /* Position in UNCOMPRESSED data stream. */
94
- int64_t file_position;
95
- /* Position in COMPRESSED data stream. */
96
- int64_t raw_position;
97
115
  /* Number of file entries processed. */
98
116
  int file_count;
99
117
 
100
118
  int archive_error_number;
101
119
  const char *error;
102
120
  struct archive_string error_string;
121
+
122
+ char *current_code;
123
+ unsigned current_codepage; /* Current ACP(ANSI CodePage). */
124
+ unsigned current_oemcp; /* Current OEMCP(OEM CodePage). */
125
+ struct archive_string_conv *sconv;
126
+
127
+ /*
128
+ * Used by archive_read_data() to track blocks and copy
129
+ * data to client buffers, filling gaps with zero bytes.
130
+ */
131
+ const char *read_data_block;
132
+ int64_t read_data_offset;
133
+ int64_t read_data_output_offset;
134
+ size_t read_data_remaining;
135
+
136
+ /*
137
+ * Used by formats/filters to determine the amount of data
138
+ * requested from a call to archive_read_data(). This is only
139
+ * useful when the format/filter has seek support.
140
+ */
141
+ char read_data_is_posix_read;
142
+ size_t read_data_requested;
103
143
  };
104
144
 
105
- /* Check magic value and state; exit if it isn't valid. */
106
- void __archive_check_magic(struct archive *, unsigned int magic,
145
+ /* Check magic value and state; return(ARCHIVE_FATAL) if it isn't valid. */
146
+ int __archive_check_magic(struct archive *, unsigned int magic,
107
147
  unsigned int state, const char *func);
148
+ #define archive_check_magic(a, expected_magic, allowed_states, function_name) \
149
+ do { \
150
+ int magic_test = __archive_check_magic((a), (expected_magic), \
151
+ (allowed_states), (function_name)); \
152
+ if (magic_test == ARCHIVE_FATAL) \
153
+ return ARCHIVE_FATAL; \
154
+ } while (0)
108
155
 
109
156
  void __archive_errx(int retvalue, const char *msg) __LA_DEAD;
110
157
 
111
- int __archive_parse_options(const char *p, const char *fn,
112
- int keysize, char *key, int valsize, char *val);
158
+ void __archive_ensure_cloexec_flag(int fd);
159
+ int __archive_mktemp(const char *tmpdir);
160
+ #if defined(_WIN32) && !defined(__CYGWIN__)
161
+ int __archive_mkstemp(wchar_t *template);
162
+ #else
163
+ int __archive_mkstemp(char *template);
164
+ #endif
165
+
166
+ int __archive_clean(struct archive *);
167
+
168
+ void __archive_reset_read_data(struct archive *);
113
169
 
114
170
  #define err_combine(a,b) ((a) < (b) ? (a) : (b))
115
171