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,107 @@
1
+ /**
2
+ * \file lzma/index_hash.h
3
+ * \brief Validate Index by using a hash function
4
+ *
5
+ * Hashing makes it possible to use constant amount of memory to validate
6
+ * Index of arbitrary size.
7
+ */
8
+
9
+ /*
10
+ * Author: Lasse Collin
11
+ *
12
+ * This file has been put into the public domain.
13
+ * You can do whatever you want with this file.
14
+ *
15
+ * See ../lzma.h for information about liblzma as a whole.
16
+ */
17
+
18
+ #ifndef LZMA_H_INTERNAL
19
+ # error Never include this file directly. Use <lzma.h> instead.
20
+ #endif
21
+
22
+ /**
23
+ * \brief Opaque data type to hold the Index hash
24
+ */
25
+ typedef struct lzma_index_hash_s lzma_index_hash;
26
+
27
+
28
+ /**
29
+ * \brief Allocate and initialize a new lzma_index_hash structure
30
+ *
31
+ * If index_hash is NULL, a new lzma_index_hash structure is allocated,
32
+ * initialized, and a pointer to it returned. If allocation fails, NULL
33
+ * is returned.
34
+ *
35
+ * If index_hash is non-NULL, it is reinitialized and the same pointer
36
+ * returned. In this case, return value cannot be NULL or a different
37
+ * pointer than the index_hash that was given as an argument.
38
+ */
39
+ extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
40
+ lzma_index_hash *index_hash, const lzma_allocator *allocator)
41
+ lzma_nothrow lzma_attr_warn_unused_result;
42
+
43
+
44
+ /**
45
+ * \brief Deallocate lzma_index_hash structure
46
+ */
47
+ extern LZMA_API(void) lzma_index_hash_end(
48
+ lzma_index_hash *index_hash, const lzma_allocator *allocator)
49
+ lzma_nothrow;
50
+
51
+
52
+ /**
53
+ * \brief Add a new Record to an Index hash
54
+ *
55
+ * \param index Pointer to a lzma_index_hash structure
56
+ * \param unpadded_size Unpadded Size of a Block
57
+ * \param uncompressed_size Uncompressed Size of a Block
58
+ *
59
+ * \return - LZMA_OK
60
+ * - LZMA_DATA_ERROR: Compressed or uncompressed size of the
61
+ * Stream or size of the Index field would grow too big.
62
+ * - LZMA_PROG_ERROR: Invalid arguments or this function is being
63
+ * used when lzma_index_hash_decode() has already been used.
64
+ */
65
+ extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
66
+ lzma_vli unpadded_size, lzma_vli uncompressed_size)
67
+ lzma_nothrow lzma_attr_warn_unused_result;
68
+
69
+
70
+ /**
71
+ * \brief Decode and validate the Index field
72
+ *
73
+ * After telling the sizes of all Blocks with lzma_index_hash_append(),
74
+ * the actual Index field is decoded with this function. Specifically,
75
+ * once decoding of the Index field has been started, no more Records
76
+ * can be added using lzma_index_hash_append().
77
+ *
78
+ * This function doesn't use lzma_stream structure to pass the input data.
79
+ * Instead, the input buffer is specified using three arguments. This is
80
+ * because it matches better the internal APIs of liblzma.
81
+ *
82
+ * \param index_hash Pointer to a lzma_index_hash structure
83
+ * \param in Pointer to the beginning of the input buffer
84
+ * \param in_pos in[*in_pos] is the next byte to process
85
+ * \param in_size in[in_size] is the first byte not to process
86
+ *
87
+ * \return - LZMA_OK: So far good, but more input is needed.
88
+ * - LZMA_STREAM_END: Index decoded successfully and it matches
89
+ * the Records given with lzma_index_hash_append().
90
+ * - LZMA_DATA_ERROR: Index is corrupt or doesn't match the
91
+ * information given with lzma_index_hash_append().
92
+ * - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
93
+ * - LZMA_PROG_ERROR
94
+ */
95
+ extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
96
+ const uint8_t *in, size_t *in_pos, size_t in_size)
97
+ lzma_nothrow lzma_attr_warn_unused_result;
98
+
99
+
100
+ /**
101
+ * \brief Get the size of the Index field as bytes
102
+ *
103
+ * This is needed to verify the Backward Size field in the Stream Footer.
104
+ */
105
+ extern LZMA_API(lzma_vli) lzma_index_hash_size(
106
+ const lzma_index_hash *index_hash)
107
+ lzma_nothrow lzma_attr_pure;
@@ -0,0 +1,420 @@
1
+ /**
2
+ * \file lzma/lzma12.h
3
+ * \brief LZMA1 and LZMA2 filters
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 LZMA1 Filter ID
22
+ *
23
+ * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils,
24
+ * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from
25
+ * accidentally using LZMA when they actually want LZMA2.
26
+ *
27
+ * LZMA1 shouldn't be used for new applications unless you _really_ know
28
+ * what you are doing. LZMA2 is almost always a better choice.
29
+ */
30
+ #define LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001)
31
+
32
+ /**
33
+ * \brief LZMA2 Filter ID
34
+ *
35
+ * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
36
+ * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
37
+ * when trying to compress uncompressible data), possibility to change
38
+ * lc/lp/pb in the middle of encoding, and some other internal improvements.
39
+ */
40
+ #define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
41
+
42
+
43
+ /**
44
+ * \brief Match finders
45
+ *
46
+ * Match finder has major effect on both speed and compression ratio.
47
+ * Usually hash chains are faster than binary trees.
48
+ *
49
+ * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
50
+ * choice, because binary trees get much higher compression ratio penalty
51
+ * with LZMA_SYNC_FLUSH.
52
+ *
53
+ * The memory usage formulas are only rough estimates, which are closest to
54
+ * reality when dict_size is a power of two. The formulas are more complex
55
+ * in reality, and can also change a little between liblzma versions. Use
56
+ * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
57
+ */
58
+ typedef enum {
59
+ LZMA_MF_HC3 = 0x03,
60
+ /**<
61
+ * \brief Hash Chain with 2- and 3-byte hashing
62
+ *
63
+ * Minimum nice_len: 3
64
+ *
65
+ * Memory usage:
66
+ * - dict_size <= 16 MiB: dict_size * 7.5
67
+ * - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
68
+ */
69
+
70
+ LZMA_MF_HC4 = 0x04,
71
+ /**<
72
+ * \brief Hash Chain with 2-, 3-, and 4-byte hashing
73
+ *
74
+ * Minimum nice_len: 4
75
+ *
76
+ * Memory usage:
77
+ * - dict_size <= 32 MiB: dict_size * 7.5
78
+ * - dict_size > 32 MiB: dict_size * 6.5
79
+ */
80
+
81
+ LZMA_MF_BT2 = 0x12,
82
+ /**<
83
+ * \brief Binary Tree with 2-byte hashing
84
+ *
85
+ * Minimum nice_len: 2
86
+ *
87
+ * Memory usage: dict_size * 9.5
88
+ */
89
+
90
+ LZMA_MF_BT3 = 0x13,
91
+ /**<
92
+ * \brief Binary Tree with 2- and 3-byte hashing
93
+ *
94
+ * Minimum nice_len: 3
95
+ *
96
+ * Memory usage:
97
+ * - dict_size <= 16 MiB: dict_size * 11.5
98
+ * - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
99
+ */
100
+
101
+ LZMA_MF_BT4 = 0x14
102
+ /**<
103
+ * \brief Binary Tree with 2-, 3-, and 4-byte hashing
104
+ *
105
+ * Minimum nice_len: 4
106
+ *
107
+ * Memory usage:
108
+ * - dict_size <= 32 MiB: dict_size * 11.5
109
+ * - dict_size > 32 MiB: dict_size * 10.5
110
+ */
111
+ } lzma_match_finder;
112
+
113
+
114
+ /**
115
+ * \brief Test if given match finder is supported
116
+ *
117
+ * Return true if the given match finder is supported by this liblzma build.
118
+ * Otherwise false is returned. It is safe to call this with a value that
119
+ * isn't listed in lzma_match_finder enumeration; the return value will be
120
+ * false.
121
+ *
122
+ * There is no way to list which match finders are available in this
123
+ * particular liblzma version and build. It would be useless, because
124
+ * a new match finder, which the application developer wasn't aware,
125
+ * could require giving additional options to the encoder that the older
126
+ * match finders don't need.
127
+ */
128
+ extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
129
+ lzma_nothrow lzma_attr_const;
130
+
131
+
132
+ /**
133
+ * \brief Compression modes
134
+ *
135
+ * This selects the function used to analyze the data produced by the match
136
+ * finder.
137
+ */
138
+ typedef enum {
139
+ LZMA_MODE_FAST = 1,
140
+ /**<
141
+ * \brief Fast compression
142
+ *
143
+ * Fast mode is usually at its best when combined with
144
+ * a hash chain match finder.
145
+ */
146
+
147
+ LZMA_MODE_NORMAL = 2
148
+ /**<
149
+ * \brief Normal compression
150
+ *
151
+ * This is usually notably slower than fast mode. Use this
152
+ * together with binary tree match finders to expose the
153
+ * full potential of the LZMA1 or LZMA2 encoder.
154
+ */
155
+ } lzma_mode;
156
+
157
+
158
+ /**
159
+ * \brief Test if given compression mode is supported
160
+ *
161
+ * Return true if the given compression mode is supported by this liblzma
162
+ * build. Otherwise false is returned. It is safe to call this with a value
163
+ * that isn't listed in lzma_mode enumeration; the return value will be false.
164
+ *
165
+ * There is no way to list which modes are available in this particular
166
+ * liblzma version and build. It would be useless, because a new compression
167
+ * mode, which the application developer wasn't aware, could require giving
168
+ * additional options to the encoder that the older modes don't need.
169
+ */
170
+ extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
171
+ lzma_nothrow lzma_attr_const;
172
+
173
+
174
+ /**
175
+ * \brief Options specific to the LZMA1 and LZMA2 filters
176
+ *
177
+ * Since LZMA1 and LZMA2 share most of the code, it's simplest to share
178
+ * the options structure too. For encoding, all but the reserved variables
179
+ * need to be initialized unless specifically mentioned otherwise.
180
+ * lzma_lzma_preset() can be used to get a good starting point.
181
+ *
182
+ * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
183
+ * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
184
+ */
185
+ typedef struct {
186
+ /**
187
+ * \brief Dictionary size in bytes
188
+ *
189
+ * Dictionary size indicates how many bytes of the recently processed
190
+ * uncompressed data is kept in memory. One method to reduce size of
191
+ * the uncompressed data is to store distance-length pairs, which
192
+ * indicate what data to repeat from the dictionary buffer. Thus,
193
+ * the bigger the dictionary, the better the compression ratio
194
+ * usually is.
195
+ *
196
+ * Maximum size of the dictionary depends on multiple things:
197
+ * - Memory usage limit
198
+ * - Available address space (not a problem on 64-bit systems)
199
+ * - Selected match finder (encoder only)
200
+ *
201
+ * Currently the maximum dictionary size for encoding is 1.5 GiB
202
+ * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
203
+ * systems for certain match finder implementation reasons. In the
204
+ * future, there may be match finders that support bigger
205
+ * dictionaries.
206
+ *
207
+ * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
208
+ * UINT32_MAX), so increasing the maximum dictionary size of the
209
+ * encoder won't cause problems for old decoders.
210
+ *
211
+ * Because extremely small dictionaries sizes would have unneeded
212
+ * overhead in the decoder, the minimum dictionary size is 4096 bytes.
213
+ *
214
+ * \note When decoding, too big dictionary does no other harm
215
+ * than wasting memory.
216
+ */
217
+ uint32_t dict_size;
218
+ # define LZMA_DICT_SIZE_MIN UINT32_C(4096)
219
+ # define LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23)
220
+
221
+ /**
222
+ * \brief Pointer to an initial dictionary
223
+ *
224
+ * It is possible to initialize the LZ77 history window using
225
+ * a preset dictionary. It is useful when compressing many
226
+ * similar, relatively small chunks of data independently from
227
+ * each other. The preset dictionary should contain typical
228
+ * strings that occur in the files being compressed. The most
229
+ * probable strings should be near the end of the preset dictionary.
230
+ *
231
+ * This feature should be used only in special situations. For
232
+ * now, it works correctly only with raw encoding and decoding.
233
+ * Currently none of the container formats supported by
234
+ * liblzma allow preset dictionary when decoding, thus if
235
+ * you create a .xz or .lzma file with preset dictionary, it
236
+ * cannot be decoded with the regular decoder functions. In the
237
+ * future, the .xz format will likely get support for preset
238
+ * dictionary though.
239
+ */
240
+ const uint8_t *preset_dict;
241
+
242
+ /**
243
+ * \brief Size of the preset dictionary
244
+ *
245
+ * Specifies the size of the preset dictionary. If the size is
246
+ * bigger than dict_size, only the last dict_size bytes are
247
+ * processed.
248
+ *
249
+ * This variable is read only when preset_dict is not NULL.
250
+ * If preset_dict is not NULL but preset_dict_size is zero,
251
+ * no preset dictionary is used (identical to only setting
252
+ * preset_dict to NULL).
253
+ */
254
+ uint32_t preset_dict_size;
255
+
256
+ /**
257
+ * \brief Number of literal context bits
258
+ *
259
+ * How many of the highest bits of the previous uncompressed
260
+ * eight-bit byte (also known as `literal') are taken into
261
+ * account when predicting the bits of the next literal.
262
+ *
263
+ * E.g. in typical English text, an upper-case letter is
264
+ * often followed by a lower-case letter, and a lower-case
265
+ * letter is usually followed by another lower-case letter.
266
+ * In the US-ASCII character set, the highest three bits are 010
267
+ * for upper-case letters and 011 for lower-case letters.
268
+ * When lc is at least 3, the literal coding can take advantage of
269
+ * this property in the uncompressed data.
270
+ *
271
+ * There is a limit that applies to literal context bits and literal
272
+ * position bits together: lc + lp <= 4. Without this limit the
273
+ * decoding could become very slow, which could have security related
274
+ * results in some cases like email servers doing virus scanning.
275
+ * This limit also simplifies the internal implementation in liblzma.
276
+ *
277
+ * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
278
+ * lc would be 8). It is not possible to decode such streams with
279
+ * liblzma.
280
+ */
281
+ uint32_t lc;
282
+ # define LZMA_LCLP_MIN 0
283
+ # define LZMA_LCLP_MAX 4
284
+ # define LZMA_LC_DEFAULT 3
285
+
286
+ /**
287
+ * \brief Number of literal position bits
288
+ *
289
+ * lp affects what kind of alignment in the uncompressed data is
290
+ * assumed when encoding literals. A literal is a single 8-bit byte.
291
+ * See pb below for more information about alignment.
292
+ */
293
+ uint32_t lp;
294
+ # define LZMA_LP_DEFAULT 0
295
+
296
+ /**
297
+ * \brief Number of position bits
298
+ *
299
+ * pb affects what kind of alignment in the uncompressed data is
300
+ * assumed in general. The default means four-byte alignment
301
+ * (2^ pb =2^2=4), which is often a good choice when there's
302
+ * no better guess.
303
+ *
304
+ * When the aligment is known, setting pb accordingly may reduce
305
+ * the file size a little. E.g. with text files having one-byte
306
+ * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
307
+ * improve compression slightly. For UTF-16 text, pb=1 is a good
308
+ * choice. If the alignment is an odd number like 3 bytes, pb=0
309
+ * might be the best choice.
310
+ *
311
+ * Even though the assumed alignment can be adjusted with pb and
312
+ * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
313
+ * It might be worth taking into account when designing file formats
314
+ * that are likely to be often compressed with LZMA1 or LZMA2.
315
+ */
316
+ uint32_t pb;
317
+ # define LZMA_PB_MIN 0
318
+ # define LZMA_PB_MAX 4
319
+ # define LZMA_PB_DEFAULT 2
320
+
321
+ /** Compression mode */
322
+ lzma_mode mode;
323
+
324
+ /**
325
+ * \brief Nice length of a match
326
+ *
327
+ * This determines how many bytes the encoder compares from the match
328
+ * candidates when looking for the best match. Once a match of at
329
+ * least nice_len bytes long is found, the encoder stops looking for
330
+ * better candidates and encodes the match. (Naturally, if the found
331
+ * match is actually longer than nice_len, the actual length is
332
+ * encoded; it's not truncated to nice_len.)
333
+ *
334
+ * Bigger values usually increase the compression ratio and
335
+ * compression time. For most files, 32 to 128 is a good value,
336
+ * which gives very good compression ratio at good speed.
337
+ *
338
+ * The exact minimum value depends on the match finder. The maximum
339
+ * is 273, which is the maximum length of a match that LZMA1 and
340
+ * LZMA2 can encode.
341
+ */
342
+ uint32_t nice_len;
343
+
344
+ /** Match finder ID */
345
+ lzma_match_finder mf;
346
+
347
+ /**
348
+ * \brief Maximum search depth in the match finder
349
+ *
350
+ * For every input byte, match finder searches through the hash chain
351
+ * or binary tree in a loop, each iteration going one step deeper in
352
+ * the chain or tree. The searching stops if
353
+ * - a match of at least nice_len bytes long is found;
354
+ * - all match candidates from the hash chain or binary tree have
355
+ * been checked; or
356
+ * - maximum search depth is reached.
357
+ *
358
+ * Maximum search depth is needed to prevent the match finder from
359
+ * wasting too much time in case there are lots of short match
360
+ * candidates. On the other hand, stopping the search before all
361
+ * candidates have been checked can reduce compression ratio.
362
+ *
363
+ * Setting depth to zero tells liblzma to use an automatic default
364
+ * value, that depends on the selected match finder and nice_len.
365
+ * The default is in the range [4, 200] or so (it may vary between
366
+ * liblzma versions).
367
+ *
368
+ * Using a bigger depth value than the default can increase
369
+ * compression ratio in some cases. There is no strict maximum value,
370
+ * but high values (thousands or millions) should be used with care:
371
+ * the encoder could remain fast enough with typical input, but
372
+ * malicious input could cause the match finder to slow down
373
+ * dramatically, possibly creating a denial of service attack.
374
+ */
375
+ uint32_t depth;
376
+
377
+ /*
378
+ * Reserved space to allow possible future extensions without
379
+ * breaking the ABI. You should not touch these, because the names
380
+ * of these variables may change. These are and will never be used
381
+ * with the currently supported options, so it is safe to leave these
382
+ * uninitialized.
383
+ */
384
+ uint32_t reserved_int1;
385
+ uint32_t reserved_int2;
386
+ uint32_t reserved_int3;
387
+ uint32_t reserved_int4;
388
+ uint32_t reserved_int5;
389
+ uint32_t reserved_int6;
390
+ uint32_t reserved_int7;
391
+ uint32_t reserved_int8;
392
+ lzma_reserved_enum reserved_enum1;
393
+ lzma_reserved_enum reserved_enum2;
394
+ lzma_reserved_enum reserved_enum3;
395
+ lzma_reserved_enum reserved_enum4;
396
+ void *reserved_ptr1;
397
+ void *reserved_ptr2;
398
+
399
+ } lzma_options_lzma;
400
+
401
+
402
+ /**
403
+ * \brief Set a compression preset to lzma_options_lzma structure
404
+ *
405
+ * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9
406
+ * of the xz command line tool. In addition, it is possible to bitwise-or
407
+ * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported.
408
+ * The flags are defined in container.h, because the flags are used also
409
+ * with lzma_easy_encoder().
410
+ *
411
+ * The preset values are subject to changes between liblzma versions.
412
+ *
413
+ * This function is available only if LZMA1 or LZMA2 encoder has been enabled
414
+ * when building liblzma.
415
+ *
416
+ * \return On success, false is returned. If the preset is not
417
+ * supported, true is returned.
418
+ */
419
+ extern LZMA_API(lzma_bool) lzma_lzma_preset(
420
+ lzma_options_lzma *options, uint32_t preset) lzma_nothrow;