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
@@ -1,19 +1,23 @@
1
1
  /* gzlib.c -- zlib functions common to reading and writing gzip files
2
- * Copyright (C) 2004, 2010 Mark Adler
2
+ * Copyright (C) 2004-2019 Mark Adler
3
3
  * For conditions of distribution and use, see copyright notice in zlib.h
4
4
  */
5
5
 
6
6
  #include "gzguts.h"
7
7
 
8
+ #if defined(_WIN32) && !defined(__BORLANDC__)
9
+ # define LSEEK _lseeki64
10
+ #else
8
11
  #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
9
12
  # define LSEEK lseek64
10
13
  #else
11
14
  # define LSEEK lseek
12
15
  #endif
16
+ #endif
13
17
 
14
18
  /* Local functions */
15
19
  local void gz_reset OF((gz_statep));
16
- local gzFile gz_open OF((const char *, int, const char *));
20
+ local gzFile gz_open OF((const void *, int, const char *));
17
21
 
18
22
  #if defined UNDER_CE
19
23
 
@@ -26,7 +30,7 @@ local gzFile gz_open OF((const char *, int, const char *));
26
30
 
27
31
  The gz_strwinerror function does not change the current setting of
28
32
  GetLastError. */
29
- char ZLIB_INTERNAL *gz_strwinerror (error)
33
+ char ZLIB_INTERNAL *gz_strwinerror(error)
30
34
  DWORD error;
31
35
  {
32
36
  static char buf[1024];
@@ -71,28 +75,42 @@ char ZLIB_INTERNAL *gz_strwinerror (error)
71
75
  local void gz_reset(state)
72
76
  gz_statep state;
73
77
  {
78
+ state->x.have = 0; /* no output data available */
74
79
  if (state->mode == GZ_READ) { /* for reading ... */
75
- state->have = 0; /* no output data available */
76
80
  state->eof = 0; /* not at end of file */
81
+ state->past = 0; /* have not read past end yet */
77
82
  state->how = LOOK; /* look for gzip header */
78
- state->direct = 1; /* default for empty file */
79
83
  }
84
+ else /* for writing ... */
85
+ state->reset = 0; /* no deflateReset pending */
80
86
  state->seek = 0; /* no seek request pending */
81
87
  gz_error(state, Z_OK, NULL); /* clear error */
82
- state->pos = 0; /* no uncompressed data yet */
88
+ state->x.pos = 0; /* no uncompressed data yet */
83
89
  state->strm.avail_in = 0; /* no input data yet */
84
90
  }
85
91
 
86
92
  /* Open a gzip file either by name or file descriptor. */
87
93
  local gzFile gz_open(path, fd, mode)
88
- const char *path;
94
+ const void *path;
89
95
  int fd;
90
96
  const char *mode;
91
97
  {
92
98
  gz_statep state;
99
+ z_size_t len;
100
+ int oflag;
101
+ #ifdef O_CLOEXEC
102
+ int cloexec = 0;
103
+ #endif
104
+ #ifdef O_EXCL
105
+ int exclusive = 0;
106
+ #endif
107
+
108
+ /* check input */
109
+ if (path == NULL)
110
+ return NULL;
93
111
 
94
112
  /* allocate gzFile structure to return */
95
- state = malloc(sizeof(gz_state));
113
+ state = (gz_statep)malloc(sizeof(gz_state));
96
114
  if (state == NULL)
97
115
  return NULL;
98
116
  state->size = 0; /* no buffers allocated yet */
@@ -103,6 +121,7 @@ local gzFile gz_open(path, fd, mode)
103
121
  state->mode = GZ_NONE;
104
122
  state->level = Z_DEFAULT_COMPRESSION;
105
123
  state->strategy = Z_DEFAULT_STRATEGY;
124
+ state->direct = 0;
106
125
  while (*mode) {
107
126
  if (*mode >= '0' && *mode <= '9')
108
127
  state->level = *mode - '0';
@@ -124,6 +143,16 @@ local gzFile gz_open(path, fd, mode)
124
143
  return NULL;
125
144
  case 'b': /* ignore -- will request binary anyway */
126
145
  break;
146
+ #ifdef O_CLOEXEC
147
+ case 'e':
148
+ cloexec = 1;
149
+ break;
150
+ #endif
151
+ #ifdef O_EXCL
152
+ case 'x':
153
+ exclusive = 1;
154
+ break;
155
+ #endif
127
156
  case 'f':
128
157
  state->strategy = Z_FILTERED;
129
158
  break;
@@ -135,6 +164,10 @@ local gzFile gz_open(path, fd, mode)
135
164
  break;
136
165
  case 'F':
137
166
  state->strategy = Z_FIXED;
167
+ break;
168
+ case 'T':
169
+ state->direct = 1;
170
+ break;
138
171
  default: /* could consider as an error, but just ignore */
139
172
  ;
140
173
  }
@@ -147,37 +180,80 @@ local gzFile gz_open(path, fd, mode)
147
180
  return NULL;
148
181
  }
149
182
 
183
+ /* can't force transparent read */
184
+ if (state->mode == GZ_READ) {
185
+ if (state->direct) {
186
+ free(state);
187
+ return NULL;
188
+ }
189
+ state->direct = 1; /* for empty file */
190
+ }
191
+
150
192
  /* save the path name for error messages */
151
- state->path = malloc(strlen(path) + 1);
193
+ #ifdef WIDECHAR
194
+ if (fd == -2) {
195
+ len = wcstombs(NULL, path, 0);
196
+ if (len == (z_size_t)-1)
197
+ len = 0;
198
+ }
199
+ else
200
+ #endif
201
+ len = strlen((const char *)path);
202
+ state->path = (char *)malloc(len + 1);
152
203
  if (state->path == NULL) {
153
204
  free(state);
154
205
  return NULL;
155
206
  }
156
- strcpy(state->path, path);
207
+ #ifdef WIDECHAR
208
+ if (fd == -2)
209
+ if (len)
210
+ wcstombs(state->path, path, len + 1);
211
+ else
212
+ *(state->path) = 0;
213
+ else
214
+ #endif
215
+ #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
216
+ (void)snprintf(state->path, len + 1, "%s", (const char *)path);
217
+ #else
218
+ strcpy(state->path, path);
219
+ #endif
157
220
 
158
- /* open the file with the appropriate mode (or just use fd) */
159
- state->fd = fd != -1 ? fd :
160
- open(path,
221
+ /* compute the flags for open() */
222
+ oflag =
161
223
  #ifdef O_LARGEFILE
162
- O_LARGEFILE |
224
+ O_LARGEFILE |
163
225
  #endif
164
226
  #ifdef O_BINARY
165
- O_BINARY |
227
+ O_BINARY |
228
+ #endif
229
+ #ifdef O_CLOEXEC
230
+ (cloexec ? O_CLOEXEC : 0) |
166
231
  #endif
167
- (state->mode == GZ_READ ?
168
- O_RDONLY :
169
- (O_WRONLY | O_CREAT | (
170
- state->mode == GZ_WRITE ?
171
- O_TRUNC :
172
- O_APPEND))),
173
- 0666);
232
+ (state->mode == GZ_READ ?
233
+ O_RDONLY :
234
+ (O_WRONLY | O_CREAT |
235
+ #ifdef O_EXCL
236
+ (exclusive ? O_EXCL : 0) |
237
+ #endif
238
+ (state->mode == GZ_WRITE ?
239
+ O_TRUNC :
240
+ O_APPEND)));
241
+
242
+ /* open the file with the appropriate flags (or just use fd) */
243
+ state->fd = fd > -1 ? fd : (
244
+ #ifdef WIDECHAR
245
+ fd == -2 ? _wopen(path, oflag, 0666) :
246
+ #endif
247
+ open((const char *)path, oflag, 0666));
174
248
  if (state->fd == -1) {
175
249
  free(state->path);
176
250
  free(state);
177
251
  return NULL;
178
252
  }
179
- if (state->mode == GZ_APPEND)
253
+ if (state->mode == GZ_APPEND) {
254
+ LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */
180
255
  state->mode = GZ_WRITE; /* simplify later checks */
256
+ }
181
257
 
182
258
  /* save the current position for rewinding (only if reading) */
183
259
  if (state->mode == GZ_READ) {
@@ -216,14 +292,28 @@ gzFile ZEXPORT gzdopen(fd, mode)
216
292
  char *path; /* identifier for error messages */
217
293
  gzFile gz;
218
294
 
219
- if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
295
+ if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
220
296
  return NULL;
297
+ #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
298
+ (void)snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd);
299
+ #else
221
300
  sprintf(path, "<fd:%d>", fd); /* for debugging */
301
+ #endif
222
302
  gz = gz_open(path, fd, mode);
223
303
  free(path);
224
304
  return gz;
225
305
  }
226
306
 
307
+ /* -- see zlib.h -- */
308
+ #ifdef WIDECHAR
309
+ gzFile ZEXPORT gzopen_w(path, mode)
310
+ const wchar_t *path;
311
+ const char *mode;
312
+ {
313
+ return gz_open(path, -2, mode);
314
+ }
315
+ #endif
316
+
227
317
  /* -- see zlib.h -- */
228
318
  int ZEXPORT gzbuffer(file, size)
229
319
  gzFile file;
@@ -243,8 +333,10 @@ int ZEXPORT gzbuffer(file, size)
243
333
  return -1;
244
334
 
245
335
  /* check and set requested size */
246
- if (size == 0)
247
- return -1;
336
+ if ((size << 1) < size)
337
+ return -1; /* need to be able to double it */
338
+ if (size < 2)
339
+ size = 2; /* need two bytes to check magic header */
248
340
  state->want = size;
249
341
  return 0;
250
342
  }
@@ -261,7 +353,8 @@ int ZEXPORT gzrewind(file)
261
353
  state = (gz_statep)file;
262
354
 
263
355
  /* check that we're reading and that there's no error */
264
- if (state->mode != GZ_READ || state->err != Z_OK)
356
+ if (state->mode != GZ_READ ||
357
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
265
358
  return -1;
266
359
 
267
360
  /* back up and start over */
@@ -289,7 +382,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
289
382
  return -1;
290
383
 
291
384
  /* check that there's no error */
292
- if (state->err != Z_OK)
385
+ if (state->err != Z_OK && state->err != Z_BUF_ERROR)
293
386
  return -1;
294
387
 
295
388
  /* can only seek from start or relative to current position */
@@ -298,31 +391,32 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
298
391
 
299
392
  /* normalize offset to a SEEK_CUR specification */
300
393
  if (whence == SEEK_SET)
301
- offset -= state->pos;
394
+ offset -= state->x.pos;
302
395
  else if (state->seek)
303
396
  offset += state->skip;
304
397
  state->seek = 0;
305
398
 
306
399
  /* if within raw area while reading, just go there */
307
400
  if (state->mode == GZ_READ && state->how == COPY &&
308
- state->pos + offset >= state->raw) {
309
- ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
401
+ state->x.pos + offset >= 0) {
402
+ ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR);
310
403
  if (ret == -1)
311
404
  return -1;
312
- state->have = 0;
405
+ state->x.have = 0;
313
406
  state->eof = 0;
407
+ state->past = 0;
314
408
  state->seek = 0;
315
409
  gz_error(state, Z_OK, NULL);
316
410
  state->strm.avail_in = 0;
317
- state->pos += offset;
318
- return state->pos;
411
+ state->x.pos += offset;
412
+ return state->x.pos;
319
413
  }
320
414
 
321
415
  /* calculate skip amount, rewinding if needed for back seek when reading */
322
416
  if (offset < 0) {
323
417
  if (state->mode != GZ_READ) /* writing -- can't go backwards */
324
418
  return -1;
325
- offset += state->pos;
419
+ offset += state->x.pos;
326
420
  if (offset < 0) /* before start of file! */
327
421
  return -1;
328
422
  if (gzrewind(file) == -1) /* rewind, then skip to offset */
@@ -331,11 +425,11 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
331
425
 
332
426
  /* if reading, skip what's in output buffer (one less gzgetc() check) */
333
427
  if (state->mode == GZ_READ) {
334
- n = GT_OFF(state->have) || (z_off64_t)state->have > offset ?
335
- (unsigned)offset : state->have;
336
- state->have -= n;
337
- state->next += n;
338
- state->pos += n;
428
+ n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ?
429
+ (unsigned)offset : state->x.have;
430
+ state->x.have -= n;
431
+ state->x.next += n;
432
+ state->x.pos += n;
339
433
  offset -= n;
340
434
  }
341
435
 
@@ -344,7 +438,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
344
438
  state->seek = 1;
345
439
  state->skip = offset;
346
440
  }
347
- return state->pos + offset;
441
+ return state->x.pos + offset;
348
442
  }
349
443
 
350
444
  /* -- see zlib.h -- */
@@ -373,7 +467,7 @@ z_off64_t ZEXPORT gztell64(file)
373
467
  return -1;
374
468
 
375
469
  /* return position */
376
- return state->pos + (state->seek ? state->skip : 0);
470
+ return state->x.pos + (state->seek ? state->skip : 0);
377
471
  }
378
472
 
379
473
  /* -- see zlib.h -- */
@@ -433,8 +527,7 @@ int ZEXPORT gzeof(file)
433
527
  return 0;
434
528
 
435
529
  /* return end-of-file state */
436
- return state->mode == GZ_READ ?
437
- (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
530
+ return state->mode == GZ_READ ? state->past : 0;
438
531
  }
439
532
 
440
533
  /* -- see zlib.h -- */
@@ -454,7 +547,8 @@ const char * ZEXPORT gzerror(file, errnum)
454
547
  /* return error information */
455
548
  if (errnum != NULL)
456
549
  *errnum = state->err;
457
- return state->msg == NULL ? "" : state->msg;
550
+ return state->err == Z_MEM_ERROR ? "out of memory" :
551
+ (state->msg == NULL ? "" : state->msg);
458
552
  }
459
553
 
460
554
  /* -- see zlib.h -- */
@@ -471,8 +565,10 @@ void ZEXPORT gzclearerr(file)
471
565
  return;
472
566
 
473
567
  /* clear error and end-of-file */
474
- if (state->mode == GZ_READ)
568
+ if (state->mode == GZ_READ) {
475
569
  state->eof = 0;
570
+ state->past = 0;
571
+ }
476
572
  gz_error(state, Z_OK, NULL);
477
573
  }
478
574
 
@@ -494,27 +590,33 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
494
590
  state->msg = NULL;
495
591
  }
496
592
 
593
+ /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */
594
+ if (err != Z_OK && err != Z_BUF_ERROR)
595
+ state->x.have = 0;
596
+
497
597
  /* set error code, and if no message, then done */
498
598
  state->err = err;
499
599
  if (msg == NULL)
500
600
  return;
501
601
 
502
- /* for an out of memory error, save as static string */
503
- if (err == Z_MEM_ERROR) {
504
- state->msg = (char *)msg;
602
+ /* for an out of memory error, return literal string when requested */
603
+ if (err == Z_MEM_ERROR)
505
604
  return;
506
- }
507
605
 
508
606
  /* construct error message with path */
509
- if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) {
607
+ if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
608
+ NULL) {
510
609
  state->err = Z_MEM_ERROR;
511
- state->msg = (char *)"out of memory";
512
610
  return;
513
611
  }
612
+ #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
613
+ (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
614
+ "%s%s%s", state->path, ": ", msg);
615
+ #else
514
616
  strcpy(state->msg, state->path);
515
617
  strcat(state->msg, ": ");
516
618
  strcat(state->msg, msg);
517
- return;
619
+ #endif
518
620
  }
519
621
 
520
622
  #ifndef INT_MAX