laag-xz 5.2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (393) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +57 -0
  3. data/LICENSE.txt +65 -0
  4. data/README.org +34 -0
  5. data/ext/laag/xz/extconf.rb +21 -0
  6. data/laag-xz.gemspec +20 -0
  7. data/lib/laag/xz.rb +29 -0
  8. data/vendor/git.tukaani.org/xz/.gitignore +66 -0
  9. data/vendor/git.tukaani.org/xz/AUTHORS +27 -0
  10. data/vendor/git.tukaani.org/xz/COPYING +65 -0
  11. data/vendor/git.tukaani.org/xz/COPYING.GPLv2 +339 -0
  12. data/vendor/git.tukaani.org/xz/COPYING.GPLv3 +674 -0
  13. data/vendor/git.tukaani.org/xz/COPYING.LGPLv2.1 +502 -0
  14. data/vendor/git.tukaani.org/xz/ChangeLog +7 -0
  15. data/vendor/git.tukaani.org/xz/Doxyfile.in +1234 -0
  16. data/vendor/git.tukaani.org/xz/INSTALL +618 -0
  17. data/vendor/git.tukaani.org/xz/INSTALL.generic +365 -0
  18. data/vendor/git.tukaani.org/xz/Makefile.am +110 -0
  19. data/vendor/git.tukaani.org/xz/NEWS +571 -0
  20. data/vendor/git.tukaani.org/xz/PACKAGERS +231 -0
  21. data/vendor/git.tukaani.org/xz/README +308 -0
  22. data/vendor/git.tukaani.org/xz/THANKS +124 -0
  23. data/vendor/git.tukaani.org/xz/TODO +111 -0
  24. data/vendor/git.tukaani.org/xz/autogen.sh +22 -0
  25. data/vendor/git.tukaani.org/xz/build-aux/manconv.sh +58 -0
  26. data/vendor/git.tukaani.org/xz/build-aux/version.sh +24 -0
  27. data/vendor/git.tukaani.org/xz/configure.ac +900 -0
  28. data/vendor/git.tukaani.org/xz/debug/Makefile.am +30 -0
  29. data/vendor/git.tukaani.org/xz/debug/README +17 -0
  30. data/vendor/git.tukaani.org/xz/debug/crc32.c +39 -0
  31. data/vendor/git.tukaani.org/xz/debug/full_flush.c +103 -0
  32. data/vendor/git.tukaani.org/xz/debug/hex2bin.c +53 -0
  33. data/vendor/git.tukaani.org/xz/debug/known_sizes.c +129 -0
  34. data/vendor/git.tukaani.org/xz/debug/memusage.c +51 -0
  35. data/vendor/git.tukaani.org/xz/debug/repeat.c +36 -0
  36. data/vendor/git.tukaani.org/xz/debug/sync_flush.c +125 -0
  37. data/vendor/git.tukaani.org/xz/debug/translation.bash +100 -0
  38. data/vendor/git.tukaani.org/xz/doc/examples/00_README.txt +31 -0
  39. data/vendor/git.tukaani.org/xz/doc/examples/01_compress_easy.c +297 -0
  40. data/vendor/git.tukaani.org/xz/doc/examples/02_decompress.c +287 -0
  41. data/vendor/git.tukaani.org/xz/doc/examples/03_compress_custom.c +193 -0
  42. data/vendor/git.tukaani.org/xz/doc/examples/04_compress_easy_mt.c +206 -0
  43. data/vendor/git.tukaani.org/xz/doc/examples/Makefile +24 -0
  44. data/vendor/git.tukaani.org/xz/doc/examples_old/xz_pipe_comp.c +127 -0
  45. data/vendor/git.tukaani.org/xz/doc/examples_old/xz_pipe_decomp.c +123 -0
  46. data/vendor/git.tukaani.org/xz/doc/faq.txt +224 -0
  47. data/vendor/git.tukaani.org/xz/doc/history.txt +150 -0
  48. data/vendor/git.tukaani.org/xz/doc/lzma-file-format.txt +166 -0
  49. data/vendor/git.tukaani.org/xz/doc/xz-file-format.txt +1150 -0
  50. data/vendor/git.tukaani.org/xz/dos/INSTALL.txt +79 -0
  51. data/vendor/git.tukaani.org/xz/dos/Makefile +147 -0
  52. data/vendor/git.tukaani.org/xz/dos/README.txt +123 -0
  53. data/vendor/git.tukaani.org/xz/dos/config.h +136 -0
  54. data/vendor/git.tukaani.org/xz/extra/7z2lzma/7z2lzma.bash +115 -0
  55. data/vendor/git.tukaani.org/xz/extra/scanlzma/scanlzma.c +88 -0
  56. data/vendor/git.tukaani.org/xz/lib/Makefile.am +32 -0
  57. data/vendor/git.tukaani.org/xz/lib/getopt.c +1197 -0
  58. data/vendor/git.tukaani.org/xz/lib/getopt.in.h +226 -0
  59. data/vendor/git.tukaani.org/xz/lib/getopt1.c +171 -0
  60. data/vendor/git.tukaani.org/xz/lib/getopt_int.h +131 -0
  61. data/vendor/git.tukaani.org/xz/m4/.gitignore +38 -0
  62. data/vendor/git.tukaani.org/xz/m4/ax_check_capsicum.m4 +85 -0
  63. data/vendor/git.tukaani.org/xz/m4/ax_pthread.m4 +332 -0
  64. data/vendor/git.tukaani.org/xz/m4/getopt.m4 +71 -0
  65. data/vendor/git.tukaani.org/xz/m4/posix-shell.m4 +63 -0
  66. data/vendor/git.tukaani.org/xz/m4/tuklib_common.m4 +22 -0
  67. data/vendor/git.tukaani.org/xz/m4/tuklib_cpucores.m4 +176 -0
  68. data/vendor/git.tukaani.org/xz/m4/tuklib_integer.m4 +74 -0
  69. data/vendor/git.tukaani.org/xz/m4/tuklib_mbstr.m4 +30 -0
  70. data/vendor/git.tukaani.org/xz/m4/tuklib_physmem.m4 +212 -0
  71. data/vendor/git.tukaani.org/xz/m4/tuklib_progname.m4 +25 -0
  72. data/vendor/git.tukaani.org/xz/macosx/build.sh +113 -0
  73. data/vendor/git.tukaani.org/xz/po/.gitignore +31 -0
  74. data/vendor/git.tukaani.org/xz/po/LINGUAS +6 -0
  75. data/vendor/git.tukaani.org/xz/po/Makevars +46 -0
  76. data/vendor/git.tukaani.org/xz/po/POTFILES.in +13 -0
  77. data/vendor/git.tukaani.org/xz/po/cs.po +949 -0
  78. data/vendor/git.tukaani.org/xz/po/de.po +993 -0
  79. data/vendor/git.tukaani.org/xz/po/fr.po +978 -0
  80. data/vendor/git.tukaani.org/xz/po/it.po +1067 -0
  81. data/vendor/git.tukaani.org/xz/po/pl.po +968 -0
  82. data/vendor/git.tukaani.org/xz/po/vi.po +1039 -0
  83. data/vendor/git.tukaani.org/xz/src/Makefile.am +42 -0
  84. data/vendor/git.tukaani.org/xz/src/common/common_w32res.rc +50 -0
  85. data/vendor/git.tukaani.org/xz/src/common/mythread.h +521 -0
  86. data/vendor/git.tukaani.org/xz/src/common/sysdefs.h +202 -0
  87. data/vendor/git.tukaani.org/xz/src/common/tuklib_common.h +71 -0
  88. data/vendor/git.tukaani.org/xz/src/common/tuklib_config.h +7 -0
  89. data/vendor/git.tukaani.org/xz/src/common/tuklib_cpucores.c +100 -0
  90. data/vendor/git.tukaani.org/xz/src/common/tuklib_cpucores.h +23 -0
  91. data/vendor/git.tukaani.org/xz/src/common/tuklib_exit.c +57 -0
  92. data/vendor/git.tukaani.org/xz/src/common/tuklib_exit.h +25 -0
  93. data/vendor/git.tukaani.org/xz/src/common/tuklib_gettext.h +44 -0
  94. data/vendor/git.tukaani.org/xz/src/common/tuklib_integer.h +534 -0
  95. data/vendor/git.tukaani.org/xz/src/common/tuklib_mbstr.h +66 -0
  96. data/vendor/git.tukaani.org/xz/src/common/tuklib_mbstr_fw.c +31 -0
  97. data/vendor/git.tukaani.org/xz/src/common/tuklib_mbstr_width.c +64 -0
  98. data/vendor/git.tukaani.org/xz/src/common/tuklib_open_stdxxx.c +57 -0
  99. data/vendor/git.tukaani.org/xz/src/common/tuklib_open_stdxxx.h +23 -0
  100. data/vendor/git.tukaani.org/xz/src/common/tuklib_physmem.c +216 -0
  101. data/vendor/git.tukaani.org/xz/src/common/tuklib_physmem.h +28 -0
  102. data/vendor/git.tukaani.org/xz/src/common/tuklib_progname.c +50 -0
  103. data/vendor/git.tukaani.org/xz/src/common/tuklib_progname.h +32 -0
  104. data/vendor/git.tukaani.org/xz/src/liblzma/Makefile.am +122 -0
  105. data/vendor/git.tukaani.org/xz/src/liblzma/api/Makefile.am +23 -0
  106. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma.h +325 -0
  107. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/base.h +659 -0
  108. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/bcj.h +90 -0
  109. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/block.h +581 -0
  110. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/check.h +150 -0
  111. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/container.h +632 -0
  112. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/delta.h +77 -0
  113. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/filter.h +425 -0
  114. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/hardware.h +64 -0
  115. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/index.h +686 -0
  116. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/index_hash.h +107 -0
  117. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/lzma12.h +420 -0
  118. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/stream_flags.h +223 -0
  119. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/version.h +121 -0
  120. data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/vli.h +166 -0
  121. data/vendor/git.tukaani.org/xz/src/liblzma/check/Makefile.inc +53 -0
  122. data/vendor/git.tukaani.org/xz/src/liblzma/check/check.c +174 -0
  123. data/vendor/git.tukaani.org/xz/src/liblzma/check/check.h +172 -0
  124. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_fast.c +82 -0
  125. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_small.c +61 -0
  126. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_table.c +19 -0
  127. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_table_be.h +525 -0
  128. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_table_le.h +525 -0
  129. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_tablegen.c +117 -0
  130. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_x86.S +304 -0
  131. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_fast.c +72 -0
  132. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_small.c +53 -0
  133. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_table.c +19 -0
  134. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_table_be.h +521 -0
  135. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_table_le.h +521 -0
  136. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_tablegen.c +88 -0
  137. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_x86.S +287 -0
  138. data/vendor/git.tukaani.org/xz/src/liblzma/check/crc_macros.h +30 -0
  139. data/vendor/git.tukaani.org/xz/src/liblzma/check/sha256.c +196 -0
  140. data/vendor/git.tukaani.org/xz/src/liblzma/common/Makefile.inc +79 -0
  141. data/vendor/git.tukaani.org/xz/src/liblzma/common/alone_decoder.c +243 -0
  142. data/vendor/git.tukaani.org/xz/src/liblzma/common/alone_decoder.h +23 -0
  143. data/vendor/git.tukaani.org/xz/src/liblzma/common/alone_encoder.c +163 -0
  144. data/vendor/git.tukaani.org/xz/src/liblzma/common/auto_decoder.c +195 -0
  145. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_buffer_decoder.c +80 -0
  146. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_buffer_encoder.c +337 -0
  147. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_buffer_encoder.h +24 -0
  148. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_decoder.c +257 -0
  149. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_decoder.h +22 -0
  150. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_encoder.c +223 -0
  151. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_encoder.h +47 -0
  152. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_header_decoder.c +124 -0
  153. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_header_encoder.c +132 -0
  154. data/vendor/git.tukaani.org/xz/src/liblzma/common/block_util.c +90 -0
  155. data/vendor/git.tukaani.org/xz/src/liblzma/common/common.c +445 -0
  156. data/vendor/git.tukaani.org/xz/src/liblzma/common/common.h +314 -0
  157. data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_buffer_encoder.c +27 -0
  158. data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_decoder_memusage.c +24 -0
  159. data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_encoder.c +24 -0
  160. data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_encoder_memusage.c +24 -0
  161. data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_preset.c +27 -0
  162. data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_preset.h +32 -0
  163. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_buffer_decoder.c +88 -0
  164. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_buffer_encoder.c +55 -0
  165. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_common.c +337 -0
  166. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_common.h +48 -0
  167. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_decoder.c +184 -0
  168. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_decoder.h +23 -0
  169. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_encoder.c +286 -0
  170. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_encoder.h +27 -0
  171. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_flags_decoder.c +46 -0
  172. data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_flags_encoder.c +56 -0
  173. data/vendor/git.tukaani.org/xz/src/liblzma/common/hardware_cputhreads.c +22 -0
  174. data/vendor/git.tukaani.org/xz/src/liblzma/common/hardware_physmem.c +25 -0
  175. data/vendor/git.tukaani.org/xz/src/liblzma/common/index.c +1250 -0
  176. data/vendor/git.tukaani.org/xz/src/liblzma/common/index.h +73 -0
  177. data/vendor/git.tukaani.org/xz/src/liblzma/common/index_decoder.c +352 -0
  178. data/vendor/git.tukaani.org/xz/src/liblzma/common/index_encoder.c +256 -0
  179. data/vendor/git.tukaani.org/xz/src/liblzma/common/index_encoder.h +23 -0
  180. data/vendor/git.tukaani.org/xz/src/liblzma/common/index_hash.c +334 -0
  181. data/vendor/git.tukaani.org/xz/src/liblzma/common/memcmplen.h +175 -0
  182. data/vendor/git.tukaani.org/xz/src/liblzma/common/outqueue.c +184 -0
  183. data/vendor/git.tukaani.org/xz/src/liblzma/common/outqueue.h +156 -0
  184. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_buffer_decoder.c +91 -0
  185. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_buffer_encoder.c +141 -0
  186. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_decoder.c +467 -0
  187. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_decoder.h +22 -0
  188. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_encoder.c +340 -0
  189. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_encoder_mt.c +1143 -0
  190. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_common.c +47 -0
  191. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_common.h +33 -0
  192. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_decoder.c +82 -0
  193. data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_encoder.c +86 -0
  194. data/vendor/git.tukaani.org/xz/src/liblzma/common/vli_decoder.c +86 -0
  195. data/vendor/git.tukaani.org/xz/src/liblzma/common/vli_encoder.c +69 -0
  196. data/vendor/git.tukaani.org/xz/src/liblzma/common/vli_size.c +30 -0
  197. data/vendor/git.tukaani.org/xz/src/liblzma/delta/Makefile.inc +23 -0
  198. data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_common.c +73 -0
  199. data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_common.h +20 -0
  200. data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_decoder.c +78 -0
  201. data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_decoder.h +26 -0
  202. data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_encoder.c +125 -0
  203. data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_encoder.h +24 -0
  204. data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_private.h +37 -0
  205. data/vendor/git.tukaani.org/xz/src/liblzma/liblzma.map +108 -0
  206. data/vendor/git.tukaani.org/xz/src/liblzma/liblzma.pc.in +19 -0
  207. data/vendor/git.tukaani.org/xz/src/liblzma/liblzma_w32res.rc +12 -0
  208. data/vendor/git.tukaani.org/xz/src/liblzma/lz/Makefile.inc +22 -0
  209. data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_decoder.c +306 -0
  210. data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_decoder.h +234 -0
  211. data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder.c +616 -0
  212. data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder.h +327 -0
  213. data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder_hash.h +108 -0
  214. data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder_hash_table.h +68 -0
  215. data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder_mf.c +744 -0
  216. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/Makefile.inc +47 -0
  217. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/fastpos.h +141 -0
  218. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/fastpos_table.c +519 -0
  219. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/fastpos_tablegen.c +56 -0
  220. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_decoder.c +310 -0
  221. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_decoder.h +29 -0
  222. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_encoder.c +410 -0
  223. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_encoder.h +43 -0
  224. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_common.h +224 -0
  225. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_decoder.c +1064 -0
  226. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_decoder.h +53 -0
  227. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder.c +677 -0
  228. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder.h +58 -0
  229. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c +170 -0
  230. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c +855 -0
  231. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_presets.c +64 -0
  232. data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_private.h +148 -0
  233. data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/Makefile.inc +21 -0
  234. data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/price.h +92 -0
  235. data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/price_table.c +22 -0
  236. data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/price_tablegen.c +87 -0
  237. data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/range_common.h +71 -0
  238. data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/range_decoder.h +185 -0
  239. data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/range_encoder.h +231 -0
  240. data/vendor/git.tukaani.org/xz/src/liblzma/simple/Makefile.inc +47 -0
  241. data/vendor/git.tukaani.org/xz/src/liblzma/simple/arm.c +71 -0
  242. data/vendor/git.tukaani.org/xz/src/liblzma/simple/armthumb.c +76 -0
  243. data/vendor/git.tukaani.org/xz/src/liblzma/simple/ia64.c +112 -0
  244. data/vendor/git.tukaani.org/xz/src/liblzma/simple/powerpc.c +75 -0
  245. data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_coder.c +282 -0
  246. data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_coder.h +72 -0
  247. data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_decoder.c +40 -0
  248. data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_decoder.h +22 -0
  249. data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_encoder.c +38 -0
  250. data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_encoder.h +23 -0
  251. data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_private.h +74 -0
  252. data/vendor/git.tukaani.org/xz/src/liblzma/simple/sparc.c +83 -0
  253. data/vendor/git.tukaani.org/xz/src/liblzma/simple/x86.c +159 -0
  254. data/vendor/git.tukaani.org/xz/src/liblzma/validate_map.sh +68 -0
  255. data/vendor/git.tukaani.org/xz/src/lzmainfo/Makefile.am +39 -0
  256. data/vendor/git.tukaani.org/xz/src/lzmainfo/lzmainfo.1 +60 -0
  257. data/vendor/git.tukaani.org/xz/src/lzmainfo/lzmainfo.c +219 -0
  258. data/vendor/git.tukaani.org/xz/src/lzmainfo/lzmainfo_w32res.rc +12 -0
  259. data/vendor/git.tukaani.org/xz/src/scripts/Makefile.am +55 -0
  260. data/vendor/git.tukaani.org/xz/src/scripts/xzdiff.1 +77 -0
  261. data/vendor/git.tukaani.org/xz/src/scripts/xzdiff.in +200 -0
  262. data/vendor/git.tukaani.org/xz/src/scripts/xzgrep.1 +98 -0
  263. data/vendor/git.tukaani.org/xz/src/scripts/xzgrep.in +215 -0
  264. data/vendor/git.tukaani.org/xz/src/scripts/xzless.1 +69 -0
  265. data/vendor/git.tukaani.org/xz/src/scripts/xzless.in +58 -0
  266. data/vendor/git.tukaani.org/xz/src/scripts/xzmore.1 +55 -0
  267. data/vendor/git.tukaani.org/xz/src/scripts/xzmore.in +78 -0
  268. data/vendor/git.tukaani.org/xz/src/xz/Makefile.am +111 -0
  269. data/vendor/git.tukaani.org/xz/src/xz/args.c +700 -0
  270. data/vendor/git.tukaani.org/xz/src/xz/args.h +44 -0
  271. data/vendor/git.tukaani.org/xz/src/xz/coder.c +936 -0
  272. data/vendor/git.tukaani.org/xz/src/xz/coder.h +76 -0
  273. data/vendor/git.tukaani.org/xz/src/xz/file_io.c +1300 -0
  274. data/vendor/git.tukaani.org/xz/src/xz/file_io.h +156 -0
  275. data/vendor/git.tukaani.org/xz/src/xz/hardware.c +150 -0
  276. data/vendor/git.tukaani.org/xz/src/xz/hardware.h +37 -0
  277. data/vendor/git.tukaani.org/xz/src/xz/list.c +1192 -0
  278. data/vendor/git.tukaani.org/xz/src/xz/list.h +18 -0
  279. data/vendor/git.tukaani.org/xz/src/xz/main.c +330 -0
  280. data/vendor/git.tukaani.org/xz/src/xz/main.h +30 -0
  281. data/vendor/git.tukaani.org/xz/src/xz/message.c +1258 -0
  282. data/vendor/git.tukaani.org/xz/src/xz/message.h +167 -0
  283. data/vendor/git.tukaani.org/xz/src/xz/mytime.c +89 -0
  284. data/vendor/git.tukaani.org/xz/src/xz/mytime.h +47 -0
  285. data/vendor/git.tukaani.org/xz/src/xz/options.c +363 -0
  286. data/vendor/git.tukaani.org/xz/src/xz/options.h +31 -0
  287. data/vendor/git.tukaani.org/xz/src/xz/private.h +66 -0
  288. data/vendor/git.tukaani.org/xz/src/xz/signals.c +209 -0
  289. data/vendor/git.tukaani.org/xz/src/xz/signals.h +43 -0
  290. data/vendor/git.tukaani.org/xz/src/xz/suffix.c +399 -0
  291. data/vendor/git.tukaani.org/xz/src/xz/suffix.h +28 -0
  292. data/vendor/git.tukaani.org/xz/src/xz/util.c +288 -0
  293. data/vendor/git.tukaani.org/xz/src/xz/util.h +123 -0
  294. data/vendor/git.tukaani.org/xz/src/xz/xz.1 +2786 -0
  295. data/vendor/git.tukaani.org/xz/src/xz/xz_w32res.rc +12 -0
  296. data/vendor/git.tukaani.org/xz/src/xzdec/Makefile.am +82 -0
  297. data/vendor/git.tukaani.org/xz/src/xzdec/lzmadec_w32res.rc +12 -0
  298. data/vendor/git.tukaani.org/xz/src/xzdec/xzdec.1 +146 -0
  299. data/vendor/git.tukaani.org/xz/src/xzdec/xzdec.c +323 -0
  300. data/vendor/git.tukaani.org/xz/src/xzdec/xzdec_w32res.rc +12 -0
  301. data/vendor/git.tukaani.org/xz/tests/Makefile.am +57 -0
  302. data/vendor/git.tukaani.org/xz/tests/bcj_test.c +65 -0
  303. data/vendor/git.tukaani.org/xz/tests/compress_prepared_bcj_sparc +0 -0
  304. data/vendor/git.tukaani.org/xz/tests/compress_prepared_bcj_x86 +0 -0
  305. data/vendor/git.tukaani.org/xz/tests/create_compress_files.c +158 -0
  306. data/vendor/git.tukaani.org/xz/tests/files/README +240 -0
  307. data/vendor/git.tukaani.org/xz/tests/files/bad-0-backward_size.xz +0 -0
  308. data/vendor/git.tukaani.org/xz/tests/files/bad-0-empty-truncated.xz +0 -0
  309. data/vendor/git.tukaani.org/xz/tests/files/bad-0-footer_magic.xz +0 -0
  310. data/vendor/git.tukaani.org/xz/tests/files/bad-0-header_magic.xz +0 -0
  311. data/vendor/git.tukaani.org/xz/tests/files/bad-0-nonempty_index.xz +0 -0
  312. data/vendor/git.tukaani.org/xz/tests/files/bad-0cat-alone.xz +0 -0
  313. data/vendor/git.tukaani.org/xz/tests/files/bad-0cat-header_magic.xz +0 -0
  314. data/vendor/git.tukaani.org/xz/tests/files/bad-0catpad-empty.xz +0 -0
  315. data/vendor/git.tukaani.org/xz/tests/files/bad-0pad-empty.xz +0 -0
  316. data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-1.xz +0 -0
  317. data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-2.xz +0 -0
  318. data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-3.xz +0 -0
  319. data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-4.xz +0 -0
  320. data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-5.xz +0 -0
  321. data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-6.xz +0 -0
  322. data/vendor/git.tukaani.org/xz/tests/files/bad-1-check-crc32.xz +0 -0
  323. data/vendor/git.tukaani.org/xz/tests/files/bad-1-check-crc64.xz +0 -0
  324. data/vendor/git.tukaani.org/xz/tests/files/bad-1-check-sha256.xz +0 -0
  325. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-1.xz +0 -0
  326. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-2.xz +0 -0
  327. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-3.xz +0 -0
  328. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-4.xz +0 -0
  329. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-5.xz +0 -0
  330. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-6.xz +0 -0
  331. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-7.xz +0 -0
  332. data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-8.xz +0 -0
  333. data/vendor/git.tukaani.org/xz/tests/files/bad-1-stream_flags-1.xz +0 -0
  334. data/vendor/git.tukaani.org/xz/tests/files/bad-1-stream_flags-2.xz +0 -0
  335. data/vendor/git.tukaani.org/xz/tests/files/bad-1-stream_flags-3.xz +0 -0
  336. data/vendor/git.tukaani.org/xz/tests/files/bad-1-vli-1.xz +0 -0
  337. data/vendor/git.tukaani.org/xz/tests/files/bad-1-vli-2.xz +0 -0
  338. data/vendor/git.tukaani.org/xz/tests/files/bad-2-compressed_data_padding.xz +0 -0
  339. data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-1.xz +0 -0
  340. data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-2.xz +0 -0
  341. data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-3.xz +0 -0
  342. data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-4.xz +0 -0
  343. data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-5.xz +0 -0
  344. data/vendor/git.tukaani.org/xz/tests/files/good-0-empty.xz +0 -0
  345. data/vendor/git.tukaani.org/xz/tests/files/good-0cat-empty.xz +0 -0
  346. data/vendor/git.tukaani.org/xz/tests/files/good-0catpad-empty.xz +0 -0
  347. data/vendor/git.tukaani.org/xz/tests/files/good-0pad-empty.xz +0 -0
  348. data/vendor/git.tukaani.org/xz/tests/files/good-1-3delta-lzma2.xz +0 -0
  349. data/vendor/git.tukaani.org/xz/tests/files/good-1-block_header-1.xz +0 -0
  350. data/vendor/git.tukaani.org/xz/tests/files/good-1-block_header-2.xz +0 -0
  351. data/vendor/git.tukaani.org/xz/tests/files/good-1-block_header-3.xz +0 -0
  352. data/vendor/git.tukaani.org/xz/tests/files/good-1-check-crc32.xz +0 -0
  353. data/vendor/git.tukaani.org/xz/tests/files/good-1-check-crc64.xz +0 -0
  354. data/vendor/git.tukaani.org/xz/tests/files/good-1-check-none.xz +0 -0
  355. data/vendor/git.tukaani.org/xz/tests/files/good-1-check-sha256.xz +0 -0
  356. data/vendor/git.tukaani.org/xz/tests/files/good-1-delta-lzma2.tiff.xz +0 -0
  357. data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-1.xz +0 -0
  358. data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-2.xz +0 -0
  359. data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-3.xz +0 -0
  360. data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-4.xz +0 -0
  361. data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-5.xz +0 -0
  362. data/vendor/git.tukaani.org/xz/tests/files/good-1-sparc-lzma2.xz +0 -0
  363. data/vendor/git.tukaani.org/xz/tests/files/good-1-x86-lzma2.xz +0 -0
  364. data/vendor/git.tukaani.org/xz/tests/files/good-2-lzma2.xz +0 -0
  365. data/vendor/git.tukaani.org/xz/tests/files/unsupported-block_header.xz +0 -0
  366. data/vendor/git.tukaani.org/xz/tests/files/unsupported-check.xz +0 -0
  367. data/vendor/git.tukaani.org/xz/tests/files/unsupported-filter_flags-1.xz +0 -0
  368. data/vendor/git.tukaani.org/xz/tests/files/unsupported-filter_flags-2.xz +0 -0
  369. data/vendor/git.tukaani.org/xz/tests/files/unsupported-filter_flags-3.xz +0 -0
  370. data/vendor/git.tukaani.org/xz/tests/test_bcj_exact_size.c +113 -0
  371. data/vendor/git.tukaani.org/xz/tests/test_block_header.c +240 -0
  372. data/vendor/git.tukaani.org/xz/tests/test_check.c +83 -0
  373. data/vendor/git.tukaani.org/xz/tests/test_compress.sh +142 -0
  374. data/vendor/git.tukaani.org/xz/tests/test_files.sh +57 -0
  375. data/vendor/git.tukaani.org/xz/tests/test_filter_flags.c +258 -0
  376. data/vendor/git.tukaani.org/xz/tests/test_index.c +689 -0
  377. data/vendor/git.tukaani.org/xz/tests/test_scripts.sh +76 -0
  378. data/vendor/git.tukaani.org/xz/tests/test_stream_flags.c +180 -0
  379. data/vendor/git.tukaani.org/xz/tests/tests.h +124 -0
  380. data/vendor/git.tukaani.org/xz/tests/xzgrep_expected_output +39 -0
  381. data/vendor/git.tukaani.org/xz/windows/INSTALL-MSVC.txt +47 -0
  382. data/vendor/git.tukaani.org/xz/windows/INSTALL-MinGW.txt +138 -0
  383. data/vendor/git.tukaani.org/xz/windows/README-Windows.txt +122 -0
  384. data/vendor/git.tukaani.org/xz/windows/build.bash +203 -0
  385. data/vendor/git.tukaani.org/xz/windows/vs2013/config.h +148 -0
  386. data/vendor/git.tukaani.org/xz/windows/vs2013/liblzma.vcxproj +354 -0
  387. data/vendor/git.tukaani.org/xz/windows/vs2013/liblzma_dll.vcxproj +383 -0
  388. data/vendor/git.tukaani.org/xz/windows/vs2013/xz_win.sln +48 -0
  389. data/vendor/git.tukaani.org/xz/windows/vs2017/config.h +148 -0
  390. data/vendor/git.tukaani.org/xz/windows/vs2017/liblzma.vcxproj +355 -0
  391. data/vendor/git.tukaani.org/xz/windows/vs2017/liblzma_dll.vcxproj +384 -0
  392. data/vendor/git.tukaani.org/xz/windows/vs2017/xz_win.sln +48 -0
  393. metadata +457 -0
@@ -0,0 +1,659 @@
1
+ /**
2
+ * \file lzma/base.h
3
+ * \brief Data types and functions used in many places in liblzma API
4
+ */
5
+
6
+ /*
7
+ * Author: Lasse Collin
8
+ *
9
+ * This file has been put into the public domain.
10
+ * You can do whatever you want with this file.
11
+ *
12
+ * See ../lzma.h for information about liblzma as a whole.
13
+ */
14
+
15
+ #ifndef LZMA_H_INTERNAL
16
+ # error Never include this file directly. Use <lzma.h> instead.
17
+ #endif
18
+
19
+
20
+ /**
21
+ * \brief Boolean
22
+ *
23
+ * This is here because C89 doesn't have stdbool.h. To set a value for
24
+ * variables having type lzma_bool, you can use
25
+ * - C99's `true' and `false' from stdbool.h;
26
+ * - C++'s internal `true' and `false'; or
27
+ * - integers one (true) and zero (false).
28
+ */
29
+ typedef unsigned char lzma_bool;
30
+
31
+
32
+ /**
33
+ * \brief Type of reserved enumeration variable in structures
34
+ *
35
+ * To avoid breaking library ABI when new features are added, several
36
+ * structures contain extra variables that may be used in future. Since
37
+ * sizeof(enum) can be different than sizeof(int), and sizeof(enum) may
38
+ * even vary depending on the range of enumeration constants, we specify
39
+ * a separate type to be used for reserved enumeration variables. All
40
+ * enumeration constants in liblzma API will be non-negative and less
41
+ * than 128, which should guarantee that the ABI won't break even when
42
+ * new constants are added to existing enumerations.
43
+ */
44
+ typedef enum {
45
+ LZMA_RESERVED_ENUM = 0
46
+ } lzma_reserved_enum;
47
+
48
+
49
+ /**
50
+ * \brief Return values used by several functions in liblzma
51
+ *
52
+ * Check the descriptions of specific functions to find out which return
53
+ * values they can return. With some functions the return values may have
54
+ * more specific meanings than described here; those differences are
55
+ * described per-function basis.
56
+ */
57
+ typedef enum {
58
+ LZMA_OK = 0,
59
+ /**<
60
+ * \brief Operation completed successfully
61
+ */
62
+
63
+ LZMA_STREAM_END = 1,
64
+ /**<
65
+ * \brief End of stream was reached
66
+ *
67
+ * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
68
+ * LZMA_FINISH was finished. In decoder, this indicates
69
+ * that all the data was successfully decoded.
70
+ *
71
+ * In all cases, when LZMA_STREAM_END is returned, the last
72
+ * output bytes should be picked from strm->next_out.
73
+ */
74
+
75
+ LZMA_NO_CHECK = 2,
76
+ /**<
77
+ * \brief Input stream has no integrity check
78
+ *
79
+ * This return value can be returned only if the
80
+ * LZMA_TELL_NO_CHECK flag was used when initializing
81
+ * the decoder. LZMA_NO_CHECK is just a warning, and
82
+ * the decoding can be continued normally.
83
+ *
84
+ * It is possible to call lzma_get_check() immediately after
85
+ * lzma_code has returned LZMA_NO_CHECK. The result will
86
+ * naturally be LZMA_CHECK_NONE, but the possibility to call
87
+ * lzma_get_check() may be convenient in some applications.
88
+ */
89
+
90
+ LZMA_UNSUPPORTED_CHECK = 3,
91
+ /**<
92
+ * \brief Cannot calculate the integrity check
93
+ *
94
+ * The usage of this return value is different in encoders
95
+ * and decoders.
96
+ *
97
+ * Encoders can return this value only from the initialization
98
+ * function. If initialization fails with this value, the
99
+ * encoding cannot be done, because there's no way to produce
100
+ * output with the correct integrity check.
101
+ *
102
+ * Decoders can return this value only from lzma_code() and
103
+ * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
104
+ * initializing the decoder. The decoding can still be
105
+ * continued normally even if the check type is unsupported,
106
+ * but naturally the check will not be validated, and possible
107
+ * errors may go undetected.
108
+ *
109
+ * With decoder, it is possible to call lzma_get_check()
110
+ * immediately after lzma_code() has returned
111
+ * LZMA_UNSUPPORTED_CHECK. This way it is possible to find
112
+ * out what the unsupported Check ID was.
113
+ */
114
+
115
+ LZMA_GET_CHECK = 4,
116
+ /**<
117
+ * \brief Integrity check type is now available
118
+ *
119
+ * This value can be returned only by the lzma_code() function
120
+ * and only if the decoder was initialized with the
121
+ * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
122
+ * application that it may now call lzma_get_check() to find
123
+ * out the Check ID. This can be used, for example, to
124
+ * implement a decoder that accepts only files that have
125
+ * strong enough integrity check.
126
+ */
127
+
128
+ LZMA_MEM_ERROR = 5,
129
+ /**<
130
+ * \brief Cannot allocate memory
131
+ *
132
+ * Memory allocation failed, or the size of the allocation
133
+ * would be greater than SIZE_MAX.
134
+ *
135
+ * Due to internal implementation reasons, the coding cannot
136
+ * be continued even if more memory were made available after
137
+ * LZMA_MEM_ERROR.
138
+ */
139
+
140
+ LZMA_MEMLIMIT_ERROR = 6,
141
+ /**
142
+ * \brief Memory usage limit was reached
143
+ *
144
+ * Decoder would need more memory than allowed by the
145
+ * specified memory usage limit. To continue decoding,
146
+ * the memory usage limit has to be increased with
147
+ * lzma_memlimit_set().
148
+ */
149
+
150
+ LZMA_FORMAT_ERROR = 7,
151
+ /**<
152
+ * \brief File format not recognized
153
+ *
154
+ * The decoder did not recognize the input as supported file
155
+ * format. This error can occur, for example, when trying to
156
+ * decode .lzma format file with lzma_stream_decoder,
157
+ * because lzma_stream_decoder accepts only the .xz format.
158
+ */
159
+
160
+ LZMA_OPTIONS_ERROR = 8,
161
+ /**<
162
+ * \brief Invalid or unsupported options
163
+ *
164
+ * Invalid or unsupported options, for example
165
+ * - unsupported filter(s) or filter options; or
166
+ * - reserved bits set in headers (decoder only).
167
+ *
168
+ * Rebuilding liblzma with more features enabled, or
169
+ * upgrading to a newer version of liblzma may help.
170
+ */
171
+
172
+ LZMA_DATA_ERROR = 9,
173
+ /**<
174
+ * \brief Data is corrupt
175
+ *
176
+ * The usage of this return value is different in encoders
177
+ * and decoders. In both encoder and decoder, the coding
178
+ * cannot continue after this error.
179
+ *
180
+ * Encoders return this if size limits of the target file
181
+ * format would be exceeded. These limits are huge, thus
182
+ * getting this error from an encoder is mostly theoretical.
183
+ * For example, the maximum compressed and uncompressed
184
+ * size of a .xz Stream is roughly 8 EiB (2^63 bytes).
185
+ *
186
+ * Decoders return this error if the input data is corrupt.
187
+ * This can mean, for example, invalid CRC32 in headers
188
+ * or invalid check of uncompressed data.
189
+ */
190
+
191
+ LZMA_BUF_ERROR = 10,
192
+ /**<
193
+ * \brief No progress is possible
194
+ *
195
+ * This error code is returned when the coder cannot consume
196
+ * any new input and produce any new output. The most common
197
+ * reason for this error is that the input stream being
198
+ * decoded is truncated or corrupt.
199
+ *
200
+ * This error is not fatal. Coding can be continued normally
201
+ * by providing more input and/or more output space, if
202
+ * possible.
203
+ *
204
+ * Typically the first call to lzma_code() that can do no
205
+ * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
206
+ * the second consecutive call doing no progress will return
207
+ * LZMA_BUF_ERROR. This is intentional.
208
+ *
209
+ * With zlib, Z_BUF_ERROR may be returned even if the
210
+ * application is doing nothing wrong, so apps will need
211
+ * to handle Z_BUF_ERROR specially. The above hack
212
+ * guarantees that liblzma never returns LZMA_BUF_ERROR
213
+ * to properly written applications unless the input file
214
+ * is truncated or corrupt. This should simplify the
215
+ * applications a little.
216
+ */
217
+
218
+ LZMA_PROG_ERROR = 11,
219
+ /**<
220
+ * \brief Programming error
221
+ *
222
+ * This indicates that the arguments given to the function are
223
+ * invalid or the internal state of the decoder is corrupt.
224
+ * - Function arguments are invalid or the structures
225
+ * pointed by the argument pointers are invalid
226
+ * e.g. if strm->next_out has been set to NULL and
227
+ * strm->avail_out > 0 when calling lzma_code().
228
+ * - lzma_* functions have been called in wrong order
229
+ * e.g. lzma_code() was called right after lzma_end().
230
+ * - If errors occur randomly, the reason might be flaky
231
+ * hardware.
232
+ *
233
+ * If you think that your code is correct, this error code
234
+ * can be a sign of a bug in liblzma. See the documentation
235
+ * how to report bugs.
236
+ */
237
+ } lzma_ret;
238
+
239
+
240
+ /**
241
+ * \brief The `action' argument for lzma_code()
242
+ *
243
+ * After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER,
244
+ * or LZMA_FINISH, the same `action' must is used until lzma_code() returns
245
+ * LZMA_STREAM_END. Also, the amount of input (that is, strm->avail_in) must
246
+ * not be modified by the application until lzma_code() returns
247
+ * LZMA_STREAM_END. Changing the `action' or modifying the amount of input
248
+ * will make lzma_code() return LZMA_PROG_ERROR.
249
+ */
250
+ typedef enum {
251
+ LZMA_RUN = 0,
252
+ /**<
253
+ * \brief Continue coding
254
+ *
255
+ * Encoder: Encode as much input as possible. Some internal
256
+ * buffering will probably be done (depends on the filter
257
+ * chain in use), which causes latency: the input used won't
258
+ * usually be decodeable from the output of the same
259
+ * lzma_code() call.
260
+ *
261
+ * Decoder: Decode as much input as possible and produce as
262
+ * much output as possible.
263
+ */
264
+
265
+ LZMA_SYNC_FLUSH = 1,
266
+ /**<
267
+ * \brief Make all the input available at output
268
+ *
269
+ * Normally the encoder introduces some latency.
270
+ * LZMA_SYNC_FLUSH forces all the buffered data to be
271
+ * available at output without resetting the internal
272
+ * state of the encoder. This way it is possible to use
273
+ * compressed stream for example for communication over
274
+ * network.
275
+ *
276
+ * Only some filters support LZMA_SYNC_FLUSH. Trying to use
277
+ * LZMA_SYNC_FLUSH with filters that don't support it will
278
+ * make lzma_code() return LZMA_OPTIONS_ERROR. For example,
279
+ * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
280
+ *
281
+ * Using LZMA_SYNC_FLUSH very often can dramatically reduce
282
+ * the compression ratio. With some filters (for example,
283
+ * LZMA2), fine-tuning the compression options may help
284
+ * mitigate this problem significantly (for example,
285
+ * match finder with LZMA2).
286
+ *
287
+ * Decoders don't support LZMA_SYNC_FLUSH.
288
+ */
289
+
290
+ LZMA_FULL_FLUSH = 2,
291
+ /**<
292
+ * \brief Finish encoding of the current Block
293
+ *
294
+ * All the input data going to the current Block must have
295
+ * been given to the encoder (the last bytes can still be
296
+ * pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH
297
+ * until it returns LZMA_STREAM_END. Then continue normally
298
+ * with LZMA_RUN or finish the Stream with LZMA_FINISH.
299
+ *
300
+ * This action is currently supported only by Stream encoder
301
+ * and easy encoder (which uses Stream encoder). If there is
302
+ * no unfinished Block, no empty Block is created.
303
+ */
304
+
305
+ LZMA_FULL_BARRIER = 4,
306
+ /**<
307
+ * \brief Finish encoding of the current Block
308
+ *
309
+ * This is like LZMA_FULL_FLUSH except that this doesn't
310
+ * necessarily wait until all the input has been made
311
+ * available via the output buffer. That is, lzma_code()
312
+ * might return LZMA_STREAM_END as soon as all the input
313
+ * has been consumed (avail_in == 0).
314
+ *
315
+ * LZMA_FULL_BARRIER is useful with a threaded encoder if
316
+ * one wants to split the .xz Stream into Blocks at specific
317
+ * offsets but doesn't care if the output isn't flushed
318
+ * immediately. Using LZMA_FULL_BARRIER allows keeping
319
+ * the threads busy while LZMA_FULL_FLUSH would make
320
+ * lzma_code() wait until all the threads have finished
321
+ * until more data could be passed to the encoder.
322
+ *
323
+ * With a lzma_stream initialized with the single-threaded
324
+ * lzma_stream_encoder() or lzma_easy_encoder(),
325
+ * LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH.
326
+ */
327
+
328
+ LZMA_FINISH = 3
329
+ /**<
330
+ * \brief Finish the coding operation
331
+ *
332
+ * All the input data must have been given to the encoder
333
+ * (the last bytes can still be pending in next_in).
334
+ * Call lzma_code() with LZMA_FINISH until it returns
335
+ * LZMA_STREAM_END. Once LZMA_FINISH has been used,
336
+ * the amount of input must no longer be changed by
337
+ * the application.
338
+ *
339
+ * When decoding, using LZMA_FINISH is optional unless the
340
+ * LZMA_CONCATENATED flag was used when the decoder was
341
+ * initialized. When LZMA_CONCATENATED was not used, the only
342
+ * effect of LZMA_FINISH is that the amount of input must not
343
+ * be changed just like in the encoder.
344
+ */
345
+ } lzma_action;
346
+
347
+
348
+ /**
349
+ * \brief Custom functions for memory handling
350
+ *
351
+ * A pointer to lzma_allocator may be passed via lzma_stream structure
352
+ * to liblzma, and some advanced functions take a pointer to lzma_allocator
353
+ * as a separate function argument. The library will use the functions
354
+ * specified in lzma_allocator for memory handling instead of the default
355
+ * malloc() and free(). C++ users should note that the custom memory
356
+ * handling functions must not throw exceptions.
357
+ *
358
+ * Single-threaded mode only: liblzma doesn't make an internal copy of
359
+ * lzma_allocator. Thus, it is OK to change these function pointers in
360
+ * the middle of the coding process, but obviously it must be done
361
+ * carefully to make sure that the replacement `free' can deallocate
362
+ * memory allocated by the earlier `alloc' function(s).
363
+ *
364
+ * Multithreaded mode: liblzma might internally store pointers to the
365
+ * lzma_allocator given via the lzma_stream structure. The application
366
+ * must not change the allocator pointer in lzma_stream or the contents
367
+ * of the pointed lzma_allocator structure until lzma_end() has been used
368
+ * to free the memory associated with that lzma_stream. The allocation
369
+ * functions might be called simultaneously from multiple threads, and
370
+ * thus they must be thread safe.
371
+ */
372
+ typedef struct {
373
+ /**
374
+ * \brief Pointer to a custom memory allocation function
375
+ *
376
+ * If you don't want a custom allocator, but still want
377
+ * custom free(), set this to NULL and liblzma will use
378
+ * the standard malloc().
379
+ *
380
+ * \param opaque lzma_allocator.opaque (see below)
381
+ * \param nmemb Number of elements like in calloc(). liblzma
382
+ * will always set nmemb to 1, so it is safe to
383
+ * ignore nmemb in a custom allocator if you like.
384
+ * The nmemb argument exists only for
385
+ * compatibility with zlib and libbzip2.
386
+ * \param size Size of an element in bytes.
387
+ * liblzma never sets this to zero.
388
+ *
389
+ * \return Pointer to the beginning of a memory block of
390
+ * `size' bytes, or NULL if allocation fails
391
+ * for some reason. When allocation fails, functions
392
+ * of liblzma return LZMA_MEM_ERROR.
393
+ *
394
+ * The allocator should not waste time zeroing the allocated buffers.
395
+ * This is not only about speed, but also memory usage, since the
396
+ * operating system kernel doesn't necessarily allocate the requested
397
+ * memory in physical memory until it is actually used. With small
398
+ * input files, liblzma may actually need only a fraction of the
399
+ * memory that it requested for allocation.
400
+ *
401
+ * \note LZMA_MEM_ERROR is also used when the size of the
402
+ * allocation would be greater than SIZE_MAX. Thus,
403
+ * don't assume that the custom allocator must have
404
+ * returned NULL if some function from liblzma
405
+ * returns LZMA_MEM_ERROR.
406
+ */
407
+ void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
408
+
409
+ /**
410
+ * \brief Pointer to a custom memory freeing function
411
+ *
412
+ * If you don't want a custom freeing function, but still
413
+ * want a custom allocator, set this to NULL and liblzma
414
+ * will use the standard free().
415
+ *
416
+ * \param opaque lzma_allocator.opaque (see below)
417
+ * \param ptr Pointer returned by lzma_allocator.alloc(),
418
+ * or when it is set to NULL, a pointer returned
419
+ * by the standard malloc().
420
+ */
421
+ void (LZMA_API_CALL *free)(void *opaque, void *ptr);
422
+
423
+ /**
424
+ * \brief Pointer passed to .alloc() and .free()
425
+ *
426
+ * opaque is passed as the first argument to lzma_allocator.alloc()
427
+ * and lzma_allocator.free(). This intended to ease implementing
428
+ * custom memory allocation functions for use with liblzma.
429
+ *
430
+ * If you don't need this, you should set this to NULL.
431
+ */
432
+ void *opaque;
433
+
434
+ } lzma_allocator;
435
+
436
+
437
+ /**
438
+ * \brief Internal data structure
439
+ *
440
+ * The contents of this structure is not visible outside the library.
441
+ */
442
+ typedef struct lzma_internal_s lzma_internal;
443
+
444
+
445
+ /**
446
+ * \brief Passing data to and from liblzma
447
+ *
448
+ * The lzma_stream structure is used for
449
+ * - passing pointers to input and output buffers to liblzma;
450
+ * - defining custom memory hander functions; and
451
+ * - holding a pointer to coder-specific internal data structures.
452
+ *
453
+ * Typical usage:
454
+ *
455
+ * - After allocating lzma_stream (on stack or with malloc()), it must be
456
+ * initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).
457
+ *
458
+ * - Initialize a coder to the lzma_stream, for example by using
459
+ * lzma_easy_encoder() or lzma_auto_decoder(). Some notes:
460
+ * - In contrast to zlib, strm->next_in and strm->next_out are
461
+ * ignored by all initialization functions, thus it is safe
462
+ * to not initialize them yet.
463
+ * - The initialization functions always set strm->total_in and
464
+ * strm->total_out to zero.
465
+ * - If the initialization function fails, no memory is left allocated
466
+ * that would require freeing with lzma_end() even if some memory was
467
+ * associated with the lzma_stream structure when the initialization
468
+ * function was called.
469
+ *
470
+ * - Use lzma_code() to do the actual work.
471
+ *
472
+ * - Once the coding has been finished, the existing lzma_stream can be
473
+ * reused. It is OK to reuse lzma_stream with different initialization
474
+ * function without calling lzma_end() first. Old allocations are
475
+ * automatically freed.
476
+ *
477
+ * - Finally, use lzma_end() to free the allocated memory. lzma_end() never
478
+ * frees the lzma_stream structure itself.
479
+ *
480
+ * Application may modify the values of total_in and total_out as it wants.
481
+ * They are updated by liblzma to match the amount of data read and
482
+ * written but aren't used for anything else except as a possible return
483
+ * values from lzma_get_progress().
484
+ */
485
+ typedef struct {
486
+ const uint8_t *next_in; /**< Pointer to the next input byte. */
487
+ size_t avail_in; /**< Number of available input bytes in next_in. */
488
+ uint64_t total_in; /**< Total number of bytes read by liblzma. */
489
+
490
+ uint8_t *next_out; /**< Pointer to the next output position. */
491
+ size_t avail_out; /**< Amount of free space in next_out. */
492
+ uint64_t total_out; /**< Total number of bytes written by liblzma. */
493
+
494
+ /**
495
+ * \brief Custom memory allocation functions
496
+ *
497
+ * In most cases this is NULL which makes liblzma use
498
+ * the standard malloc() and free().
499
+ *
500
+ * \note In 5.0.x this is not a const pointer.
501
+ */
502
+ const lzma_allocator *allocator;
503
+
504
+ /** Internal state is not visible to applications. */
505
+ lzma_internal *internal;
506
+
507
+ /*
508
+ * Reserved space to allow possible future extensions without
509
+ * breaking the ABI. Excluding the initialization of this structure,
510
+ * you should not touch these, because the names of these variables
511
+ * may change.
512
+ */
513
+ void *reserved_ptr1;
514
+ void *reserved_ptr2;
515
+ void *reserved_ptr3;
516
+ void *reserved_ptr4;
517
+ uint64_t reserved_int1;
518
+ uint64_t reserved_int2;
519
+ size_t reserved_int3;
520
+ size_t reserved_int4;
521
+ lzma_reserved_enum reserved_enum1;
522
+ lzma_reserved_enum reserved_enum2;
523
+
524
+ } lzma_stream;
525
+
526
+
527
+ /**
528
+ * \brief Initialization for lzma_stream
529
+ *
530
+ * When you declare an instance of lzma_stream, you can immediately
531
+ * initialize it so that initialization functions know that no memory
532
+ * has been allocated yet:
533
+ *
534
+ * lzma_stream strm = LZMA_STREAM_INIT;
535
+ *
536
+ * If you need to initialize a dynamically allocated lzma_stream, you can use
537
+ * memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this
538
+ * violates the C standard since NULL may have different internal
539
+ * representation than zero, but it should be portable enough in practice.
540
+ * Anyway, for maximum portability, you can use something like this:
541
+ *
542
+ * lzma_stream tmp = LZMA_STREAM_INIT;
543
+ * *strm = tmp;
544
+ */
545
+ #define LZMA_STREAM_INIT \
546
+ { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
547
+ NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
548
+ LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
549
+
550
+
551
+ /**
552
+ * \brief Encode or decode data
553
+ *
554
+ * Once the lzma_stream has been successfully initialized (e.g. with
555
+ * lzma_stream_encoder()), the actual encoding or decoding is done
556
+ * using this function. The application has to update strm->next_in,
557
+ * strm->avail_in, strm->next_out, and strm->avail_out to pass input
558
+ * to and get output from liblzma.
559
+ *
560
+ * See the description of the coder-specific initialization function to find
561
+ * out what `action' values are supported by the coder.
562
+ */
563
+ extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
564
+ lzma_nothrow lzma_attr_warn_unused_result;
565
+
566
+
567
+ /**
568
+ * \brief Free memory allocated for the coder data structures
569
+ *
570
+ * \param strm Pointer to lzma_stream that is at least initialized
571
+ * with LZMA_STREAM_INIT.
572
+ *
573
+ * After lzma_end(strm), strm->internal is guaranteed to be NULL. No other
574
+ * members of the lzma_stream structure are touched.
575
+ *
576
+ * \note zlib indicates an error if application end()s unfinished
577
+ * stream structure. liblzma doesn't do this, and assumes that
578
+ * application knows what it is doing.
579
+ */
580
+ extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
581
+
582
+
583
+ /**
584
+ * \brief Get progress information
585
+ *
586
+ * In single-threaded mode, applications can get progress information from
587
+ * strm->total_in and strm->total_out. In multi-threaded mode this is less
588
+ * useful because a significant amount of both input and output data gets
589
+ * buffered internally by liblzma. This makes total_in and total_out give
590
+ * misleading information and also makes the progress indicator updates
591
+ * non-smooth.
592
+ *
593
+ * This function gives realistic progress information also in multi-threaded
594
+ * mode by taking into account the progress made by each thread. In
595
+ * single-threaded mode *progress_in and *progress_out are set to
596
+ * strm->total_in and strm->total_out, respectively.
597
+ */
598
+ extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
599
+ uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
600
+
601
+
602
+ /**
603
+ * \brief Get the memory usage of decoder filter chain
604
+ *
605
+ * This function is currently supported only when *strm has been initialized
606
+ * with a function that takes a memlimit argument. With other functions, you
607
+ * should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage()
608
+ * to estimate the memory requirements.
609
+ *
610
+ * This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big
611
+ * the memory usage limit should have been to decode the input. Note that
612
+ * this may give misleading information if decoding .xz Streams that have
613
+ * multiple Blocks, because each Block can have different memory requirements.
614
+ *
615
+ * \return How much memory is currently allocated for the filter
616
+ * decoders. If no filter chain is currently allocated,
617
+ * some non-zero value is still returned, which is less than
618
+ * or equal to what any filter chain would indicate as its
619
+ * memory requirement.
620
+ *
621
+ * If this function isn't supported by *strm or some other error
622
+ * occurs, zero is returned.
623
+ */
624
+ extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
625
+ lzma_nothrow lzma_attr_pure;
626
+
627
+
628
+ /**
629
+ * \brief Get the current memory usage limit
630
+ *
631
+ * This function is supported only when *strm has been initialized with
632
+ * a function that takes a memlimit argument.
633
+ *
634
+ * \return On success, the current memory usage limit is returned
635
+ * (always non-zero). On error, zero is returned.
636
+ */
637
+ extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
638
+ lzma_nothrow lzma_attr_pure;
639
+
640
+
641
+ /**
642
+ * \brief Set the memory usage limit
643
+ *
644
+ * This function is supported only when *strm has been initialized with
645
+ * a function that takes a memlimit argument.
646
+ *
647
+ * liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes
648
+ * this function to do nothing (leaving the limit unchanged) and still
649
+ * return LZMA_OK. Later versions treat 0 as if 1 had been specified (so
650
+ * lzma_memlimit_get() will return 1 even if you specify 0 here).
651
+ *
652
+ * \return - LZMA_OK: New memory usage limit successfully set.
653
+ * - LZMA_MEMLIMIT_ERROR: The new limit is too small.
654
+ * The limit was not changed.
655
+ * - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
656
+ * support memory usage limit.
657
+ */
658
+ extern LZMA_API(lzma_ret) lzma_memlimit_set(
659
+ lzma_stream *strm, uint64_t memlimit) lzma_nothrow;