node-liblzma 1.0.4 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (880) hide show
  1. package/History.md +5 -0
  2. package/README.md +65 -37
  3. package/binding.gyp +671 -43
  4. package/package.json +39 -24
  5. package/prebuilds/linux-x64/node_lzma.node +0 -0
  6. package/prebuilds/mac-x64/node_lzma.node +0 -0
  7. package/prebuilds/win-x64/node_lzma.node +0 -0
  8. package/scripts/download_extract_deps.py +29 -0
  9. package/scripts/prebuildify.py +13 -0
  10. package/scripts/walk_sources.py +7 -0
  11. package/src/bindings/module.cpp +86 -86
  12. package/src/bindings/node-liblzma.cpp +292 -273
  13. package/src/bindings/node-liblzma.hpp +62 -90
  14. package/src/lzma.coffee +25 -18
  15. package/.npmignore +0 -1
  16. package/.travis.yml +0 -35
  17. package/build/Makefile +0 -329
  18. package/build/Release/.deps/Release/node-liblzma.node.d +0 -1
  19. package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +0 -1
  20. package/build/Release/.deps/Release/obj.target/node-liblzma/src/bindings/module.o.d +0 -89
  21. package/build/Release/.deps/Release/obj.target/node-liblzma/src/bindings/node-liblzma.o.d +0 -89
  22. package/build/Release/.deps/Release/obj.target/node-liblzma.node.d +0 -1
  23. package/build/Release/.deps/home/o2/dev/node-liblzma/build/node-liblzma.node.d +0 -1
  24. package/build/Release/node-liblzma.node +0 -0
  25. package/build/Release/obj.target/action_after_build.stamp +0 -0
  26. package/build/Release/obj.target/node-liblzma/src/bindings/module.o +0 -0
  27. package/build/Release/obj.target/node-liblzma/src/bindings/node-liblzma.o +0 -0
  28. package/build/Release/obj.target/node-liblzma.node +0 -0
  29. package/build/action_after_build.target.mk +0 -32
  30. package/build/binding.Makefile +0 -6
  31. package/build/config.gypi +0 -143
  32. package/build/node-liblzma.node +0 -0
  33. package/build/node-liblzma.target.mk +0 -144
  34. package/build.yml +0 -65
  35. package/deps/xz/ABOUT-NLS +0 -1327
  36. package/deps/xz/AUTHORS +0 -27
  37. package/deps/xz/COPYING +0 -65
  38. package/deps/xz/COPYING.GPLv2 +0 -339
  39. package/deps/xz/COPYING.GPLv3 +0 -674
  40. package/deps/xz/COPYING.LGPLv2.1 +0 -502
  41. package/deps/xz/ChangeLog +0 -14953
  42. package/deps/xz/Doxyfile +0 -1234
  43. package/deps/xz/Doxyfile.in +0 -1234
  44. package/deps/xz/INSTALL +0 -554
  45. package/deps/xz/INSTALL.generic +0 -365
  46. package/deps/xz/Makefile +0 -1067
  47. package/deps/xz/Makefile.am +0 -109
  48. package/deps/xz/Makefile.in +0 -1067
  49. package/deps/xz/NEWS +0 -505
  50. package/deps/xz/PACKAGERS +0 -231
  51. package/deps/xz/README +0 -308
  52. package/deps/xz/THANKS +0 -116
  53. package/deps/xz/TODO +0 -111
  54. package/deps/xz/aclocal.m4 +0 -1225
  55. package/deps/xz/autogen.sh +0 -22
  56. package/deps/xz/autom4te.cache/output.0 +0 -21751
  57. package/deps/xz/autom4te.cache/output.1 +0 -21751
  58. package/deps/xz/autom4te.cache/requests +0 -415
  59. package/deps/xz/autom4te.cache/traces.0 +0 -6996
  60. package/deps/xz/autom4te.cache/traces.1 +0 -1783
  61. package/deps/xz/build-aux/compile +0 -347
  62. package/deps/xz/build-aux/config.guess +0 -1558
  63. package/deps/xz/build-aux/config.rpath +0 -672
  64. package/deps/xz/build-aux/config.sub +0 -1791
  65. package/deps/xz/build-aux/depcomp +0 -791
  66. package/deps/xz/build-aux/install-sh +0 -527
  67. package/deps/xz/build-aux/ltmain.sh +0 -9661
  68. package/deps/xz/build-aux/manconv.sh +0 -58
  69. package/deps/xz/build-aux/missing +0 -215
  70. package/deps/xz/build-aux/version.sh +0 -24
  71. package/deps/xz/config.h +0 -487
  72. package/deps/xz/config.h.in +0 -486
  73. package/deps/xz/config.h.in~ +0 -485
  74. package/deps/xz/config.log +0 -5446
  75. package/deps/xz/config.status +0 -2587
  76. package/deps/xz/configure +0 -21751
  77. package/deps/xz/configure.ac +0 -842
  78. package/deps/xz/debug/.deps/crc32.Po +0 -1
  79. package/deps/xz/debug/.deps/full_flush.Po +0 -1
  80. package/deps/xz/debug/.deps/hex2bin.Po +0 -1
  81. package/deps/xz/debug/.deps/known_sizes.Po +0 -1
  82. package/deps/xz/debug/.deps/memusage.Po +0 -1
  83. package/deps/xz/debug/.deps/repeat.Po +0 -1
  84. package/deps/xz/debug/.deps/sync_flush.Po +0 -1
  85. package/deps/xz/debug/Makefile +0 -691
  86. package/deps/xz/debug/Makefile.am +0 -30
  87. package/deps/xz/debug/Makefile.in +0 -691
  88. package/deps/xz/debug/README +0 -17
  89. package/deps/xz/debug/crc32.c +0 -39
  90. package/deps/xz/debug/full_flush.c +0 -103
  91. package/deps/xz/debug/hex2bin.c +0 -53
  92. package/deps/xz/debug/known_sizes.c +0 -129
  93. package/deps/xz/debug/memusage.c +0 -51
  94. package/deps/xz/debug/repeat.c +0 -36
  95. package/deps/xz/debug/sync_flush.c +0 -125
  96. package/deps/xz/debug/translation.bash +0 -100
  97. package/deps/xz/doc/examples/00_README.txt +0 -31
  98. package/deps/xz/doc/examples/01_compress_easy.c +0 -297
  99. package/deps/xz/doc/examples/02_decompress.c +0 -287
  100. package/deps/xz/doc/examples/03_compress_custom.c +0 -193
  101. package/deps/xz/doc/examples/04_compress_easy_mt.c +0 -206
  102. package/deps/xz/doc/examples/Makefile +0 -24
  103. package/deps/xz/doc/examples_old/xz_pipe_comp.c +0 -127
  104. package/deps/xz/doc/examples_old/xz_pipe_decomp.c +0 -123
  105. package/deps/xz/doc/faq.txt +0 -224
  106. package/deps/xz/doc/history.txt +0 -150
  107. package/deps/xz/doc/lzma-file-format.txt +0 -166
  108. package/deps/xz/doc/man/pdf-a4/lzmainfo-a4.pdf +0 -0
  109. package/deps/xz/doc/man/pdf-a4/xz-a4.pdf +0 -0
  110. package/deps/xz/doc/man/pdf-a4/xzdec-a4.pdf +0 -0
  111. package/deps/xz/doc/man/pdf-a4/xzdiff-a4.pdf +0 -0
  112. package/deps/xz/doc/man/pdf-a4/xzgrep-a4.pdf +0 -0
  113. package/deps/xz/doc/man/pdf-a4/xzless-a4.pdf +0 -0
  114. package/deps/xz/doc/man/pdf-a4/xzmore-a4.pdf +0 -0
  115. package/deps/xz/doc/man/pdf-letter/lzmainfo-letter.pdf +0 -0
  116. package/deps/xz/doc/man/pdf-letter/xz-letter.pdf +0 -0
  117. package/deps/xz/doc/man/pdf-letter/xzdec-letter.pdf +0 -0
  118. package/deps/xz/doc/man/pdf-letter/xzdiff-letter.pdf +0 -0
  119. package/deps/xz/doc/man/pdf-letter/xzgrep-letter.pdf +0 -0
  120. package/deps/xz/doc/man/pdf-letter/xzless-letter.pdf +0 -0
  121. package/deps/xz/doc/man/pdf-letter/xzmore-letter.pdf +0 -0
  122. package/deps/xz/doc/man/txt/lzmainfo.txt +0 -40
  123. package/deps/xz/doc/man/txt/xz.txt +0 -1483
  124. package/deps/xz/doc/man/txt/xzdec.txt +0 -80
  125. package/deps/xz/doc/man/txt/xzdiff.txt +0 -36
  126. package/deps/xz/doc/man/txt/xzgrep.txt +0 -39
  127. package/deps/xz/doc/man/txt/xzless.txt +0 -39
  128. package/deps/xz/doc/man/txt/xzmore.txt +0 -34
  129. package/deps/xz/doc/xz-file-format.txt +0 -1150
  130. package/deps/xz/dos/INSTALL.txt +0 -79
  131. package/deps/xz/dos/Makefile +0 -147
  132. package/deps/xz/dos/README.txt +0 -123
  133. package/deps/xz/dos/config.h +0 -130
  134. package/deps/xz/extra/7z2lzma/7z2lzma.bash +0 -115
  135. package/deps/xz/extra/scanlzma/scanlzma.c +0 -84
  136. package/deps/xz/include/lzma/base.h +0 -654
  137. package/deps/xz/include/lzma/bcj.h +0 -90
  138. package/deps/xz/include/lzma/block.h +0 -581
  139. package/deps/xz/include/lzma/check.h +0 -150
  140. package/deps/xz/include/lzma/container.h +0 -619
  141. package/deps/xz/include/lzma/delta.h +0 -77
  142. package/deps/xz/include/lzma/filter.h +0 -425
  143. package/deps/xz/include/lzma/hardware.h +0 -64
  144. package/deps/xz/include/lzma/index.h +0 -682
  145. package/deps/xz/include/lzma/index_hash.h +0 -107
  146. package/deps/xz/include/lzma/lzma12.h +0 -420
  147. package/deps/xz/include/lzma/stream_flags.h +0 -223
  148. package/deps/xz/include/lzma/version.h +0 -121
  149. package/deps/xz/include/lzma/vli.h +0 -166
  150. package/deps/xz/include/lzma.h +0 -321
  151. package/deps/xz/lib/.deps/getopt.Po +0 -1
  152. package/deps/xz/lib/.deps/getopt1.Po +0 -1
  153. package/deps/xz/lib/Makefile +0 -566
  154. package/deps/xz/lib/Makefile.am +0 -32
  155. package/deps/xz/lib/Makefile.in +0 -566
  156. package/deps/xz/lib/getopt.c +0 -1197
  157. package/deps/xz/lib/getopt.in.h +0 -226
  158. package/deps/xz/lib/getopt1.c +0 -171
  159. package/deps/xz/lib/getopt_int.h +0 -131
  160. package/deps/xz/lib/liblzma.a +0 -0
  161. package/deps/xz/lib/liblzma.la +0 -41
  162. package/deps/xz/lib/pkgconfig/liblzma.pc +0 -19
  163. package/deps/xz/libtool +0 -10221
  164. package/deps/xz/m4/ax_pthread.m4 +0 -332
  165. package/deps/xz/m4/codeset.m4 +0 -21
  166. package/deps/xz/m4/fcntl-o.m4 +0 -81
  167. package/deps/xz/m4/getopt.m4 +0 -71
  168. package/deps/xz/m4/gettext.m4 +0 -383
  169. package/deps/xz/m4/glibc2.m4 +0 -30
  170. package/deps/xz/m4/glibc21.m4 +0 -30
  171. package/deps/xz/m4/iconv.m4 +0 -199
  172. package/deps/xz/m4/intdiv0.m4 +0 -84
  173. package/deps/xz/m4/intl.m4 +0 -294
  174. package/deps/xz/m4/intldir.m4 +0 -19
  175. package/deps/xz/m4/intlmacosx.m4 +0 -51
  176. package/deps/xz/m4/intmax.m4 +0 -33
  177. package/deps/xz/m4/inttypes-pri.m4 +0 -36
  178. package/deps/xz/m4/inttypes_h.m4 +0 -26
  179. package/deps/xz/m4/lcmessage.m4 +0 -31
  180. package/deps/xz/m4/lib-ld.m4 +0 -110
  181. package/deps/xz/m4/lib-link.m4 +0 -774
  182. package/deps/xz/m4/lib-prefix.m4 +0 -224
  183. package/deps/xz/m4/libtool.m4 +0 -7997
  184. package/deps/xz/m4/lock.m4 +0 -37
  185. package/deps/xz/m4/longlong.m4 +0 -106
  186. package/deps/xz/m4/ltoptions.m4 +0 -384
  187. package/deps/xz/m4/ltsugar.m4 +0 -123
  188. package/deps/xz/m4/ltversion.m4 +0 -23
  189. package/deps/xz/m4/lt~obsolete.m4 +0 -98
  190. package/deps/xz/m4/nls.m4 +0 -32
  191. package/deps/xz/m4/po.m4 +0 -449
  192. package/deps/xz/m4/posix-shell.m4 +0 -63
  193. package/deps/xz/m4/printf-posix.m4 +0 -45
  194. package/deps/xz/m4/progtest.m4 +0 -92
  195. package/deps/xz/m4/size_max.m4 +0 -75
  196. package/deps/xz/m4/stdint_h.m4 +0 -26
  197. package/deps/xz/m4/threadlib.m4 +0 -347
  198. package/deps/xz/m4/tuklib_common.m4 +0 -22
  199. package/deps/xz/m4/tuklib_cpucores.m4 +0 -148
  200. package/deps/xz/m4/tuklib_integer.m4 +0 -74
  201. package/deps/xz/m4/tuklib_mbstr.m4 +0 -30
  202. package/deps/xz/m4/tuklib_physmem.m4 +0 -212
  203. package/deps/xz/m4/tuklib_progname.m4 +0 -25
  204. package/deps/xz/m4/uintmax_t.m4 +0 -30
  205. package/deps/xz/m4/visibility.m4 +0 -74
  206. package/deps/xz/m4/wchar_t.m4 +0 -20
  207. package/deps/xz/m4/wint_t.m4 +0 -28
  208. package/deps/xz/m4/xsize.m4 +0 -13
  209. package/deps/xz/macosx/build.sh +0 -113
  210. package/deps/xz/po/LINGUAS +0 -6
  211. package/deps/xz/po/Makefile +0 -549
  212. package/deps/xz/po/Makefile.in +0 -444
  213. package/deps/xz/po/Makefile.in.in +0 -444
  214. package/deps/xz/po/Makevars +0 -46
  215. package/deps/xz/po/Makevars.template +0 -41
  216. package/deps/xz/po/POTFILES +0 -12
  217. package/deps/xz/po/POTFILES.in +0 -13
  218. package/deps/xz/po/Rules-quot +0 -47
  219. package/deps/xz/po/boldquot.sed +0 -10
  220. package/deps/xz/po/cs.gmo +0 -0
  221. package/deps/xz/po/cs.po +0 -989
  222. package/deps/xz/po/de.gmo +0 -0
  223. package/deps/xz/po/de.po +0 -990
  224. package/deps/xz/po/en@boldquot.header +0 -25
  225. package/deps/xz/po/en@quot.header +0 -22
  226. package/deps/xz/po/fr.gmo +0 -0
  227. package/deps/xz/po/fr.po +0 -974
  228. package/deps/xz/po/insert-header.sin +0 -23
  229. package/deps/xz/po/it.gmo +0 -0
  230. package/deps/xz/po/it.po +0 -975
  231. package/deps/xz/po/pl.gmo +0 -0
  232. package/deps/xz/po/pl.po +0 -964
  233. package/deps/xz/po/quot.sed +0 -6
  234. package/deps/xz/po/remove-potcdate.sin +0 -19
  235. package/deps/xz/po/stamp-po +0 -1
  236. package/deps/xz/po/vi.gmo +0 -0
  237. package/deps/xz/po/vi.po +0 -970
  238. package/deps/xz/po/xz.pot +0 -854
  239. package/deps/xz/share/doc/xz/AUTHORS +0 -27
  240. package/deps/xz/share/doc/xz/COPYING +0 -65
  241. package/deps/xz/share/doc/xz/COPYING.GPLv2 +0 -339
  242. package/deps/xz/share/doc/xz/NEWS +0 -505
  243. package/deps/xz/share/doc/xz/README +0 -308
  244. package/deps/xz/share/doc/xz/THANKS +0 -116
  245. package/deps/xz/share/doc/xz/TODO +0 -111
  246. package/deps/xz/share/doc/xz/examples/00_README.txt +0 -31
  247. package/deps/xz/share/doc/xz/examples/01_compress_easy.c +0 -297
  248. package/deps/xz/share/doc/xz/examples/02_decompress.c +0 -287
  249. package/deps/xz/share/doc/xz/examples/03_compress_custom.c +0 -193
  250. package/deps/xz/share/doc/xz/examples/04_compress_easy_mt.c +0 -206
  251. package/deps/xz/share/doc/xz/examples/Makefile +0 -24
  252. package/deps/xz/share/doc/xz/examples_old/xz_pipe_comp.c +0 -127
  253. package/deps/xz/share/doc/xz/examples_old/xz_pipe_decomp.c +0 -123
  254. package/deps/xz/share/doc/xz/faq.txt +0 -224
  255. package/deps/xz/share/doc/xz/history.txt +0 -150
  256. package/deps/xz/share/doc/xz/lzma-file-format.txt +0 -166
  257. package/deps/xz/share/doc/xz/xz-file-format.txt +0 -1150
  258. package/deps/xz/share/locale/cs/LC_MESSAGES/xz.mo +0 -0
  259. package/deps/xz/share/locale/de/LC_MESSAGES/xz.mo +0 -0
  260. package/deps/xz/share/locale/fr/LC_MESSAGES/xz.mo +0 -0
  261. package/deps/xz/share/locale/it/LC_MESSAGES/xz.mo +0 -0
  262. package/deps/xz/share/locale/pl/LC_MESSAGES/xz.mo +0 -0
  263. package/deps/xz/share/locale/vi/LC_MESSAGES/xz.mo +0 -0
  264. package/deps/xz/src/Makefile +0 -674
  265. package/deps/xz/src/Makefile.am +0 -42
  266. package/deps/xz/src/Makefile.in +0 -674
  267. package/deps/xz/src/common/common_w32res.rc +0 -50
  268. package/deps/xz/src/common/mythread.h +0 -521
  269. package/deps/xz/src/common/sysdefs.h +0 -202
  270. package/deps/xz/src/common/tuklib_common.h +0 -71
  271. package/deps/xz/src/common/tuklib_config.h +0 -7
  272. package/deps/xz/src/common/tuklib_cpucores.c +0 -91
  273. package/deps/xz/src/common/tuklib_cpucores.h +0 -23
  274. package/deps/xz/src/common/tuklib_exit.c +0 -57
  275. package/deps/xz/src/common/tuklib_exit.h +0 -25
  276. package/deps/xz/src/common/tuklib_gettext.h +0 -44
  277. package/deps/xz/src/common/tuklib_integer.h +0 -523
  278. package/deps/xz/src/common/tuklib_mbstr.h +0 -66
  279. package/deps/xz/src/common/tuklib_mbstr_fw.c +0 -31
  280. package/deps/xz/src/common/tuklib_mbstr_width.c +0 -64
  281. package/deps/xz/src/common/tuklib_open_stdxxx.c +0 -57
  282. package/deps/xz/src/common/tuklib_open_stdxxx.h +0 -23
  283. package/deps/xz/src/common/tuklib_physmem.c +0 -215
  284. package/deps/xz/src/common/tuklib_physmem.h +0 -28
  285. package/deps/xz/src/common/tuklib_progname.c +0 -50
  286. package/deps/xz/src/common/tuklib_progname.h +0 -32
  287. package/deps/xz/src/liblzma/.deps/liblzma_la-alone_decoder.Plo +0 -269
  288. package/deps/xz/src/liblzma/.deps/liblzma_la-alone_encoder.Plo +0 -263
  289. package/deps/xz/src/liblzma/.deps/liblzma_la-arm.Plo +0 -263
  290. package/deps/xz/src/liblzma/.deps/liblzma_la-armthumb.Plo +0 -263
  291. package/deps/xz/src/liblzma/.deps/liblzma_la-auto_decoder.Plo +0 -263
  292. package/deps/xz/src/liblzma/.deps/liblzma_la-block_buffer_decoder.Plo +0 -261
  293. package/deps/xz/src/liblzma/.deps/liblzma_la-block_buffer_encoder.Plo +0 -273
  294. package/deps/xz/src/liblzma/.deps/liblzma_la-block_decoder.Plo +0 -268
  295. package/deps/xz/src/liblzma/.deps/liblzma_la-block_encoder.Plo +0 -268
  296. package/deps/xz/src/liblzma/.deps/liblzma_la-block_header_decoder.Plo +0 -263
  297. package/deps/xz/src/liblzma/.deps/liblzma_la-block_header_encoder.Plo +0 -263
  298. package/deps/xz/src/liblzma/.deps/liblzma_la-block_util.Plo +0 -260
  299. package/deps/xz/src/liblzma/.deps/liblzma_la-check.Plo +0 -261
  300. package/deps/xz/src/liblzma/.deps/liblzma_la-common.Plo +0 -258
  301. package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_fast.Plo +0 -263
  302. package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_small.Plo +0 -1
  303. package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_table.Plo +0 -260
  304. package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_x86.Plo +0 -1
  305. package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_fast.Plo +0 -263
  306. package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_small.Plo +0 -1
  307. package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_table.Plo +0 -260
  308. package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_x86.Plo +0 -1
  309. package/deps/xz/src/liblzma/.deps/liblzma_la-delta_common.Plo +0 -263
  310. package/deps/xz/src/liblzma/.deps/liblzma_la-delta_decoder.Plo +0 -265
  311. package/deps/xz/src/liblzma/.deps/liblzma_la-delta_encoder.Plo +0 -265
  312. package/deps/xz/src/liblzma/.deps/liblzma_la-easy_buffer_encoder.Plo +0 -261
  313. package/deps/xz/src/liblzma/.deps/liblzma_la-easy_decoder_memusage.Plo +0 -261
  314. package/deps/xz/src/liblzma/.deps/liblzma_la-easy_encoder.Plo +0 -261
  315. package/deps/xz/src/liblzma/.deps/liblzma_la-easy_encoder_memusage.Plo +0 -261
  316. package/deps/xz/src/liblzma/.deps/liblzma_la-easy_preset.Plo +0 -261
  317. package/deps/xz/src/liblzma/.deps/liblzma_la-fastpos_table.Plo +0 -261
  318. package/deps/xz/src/liblzma/.deps/liblzma_la-filter_buffer_decoder.Plo +0 -261
  319. package/deps/xz/src/liblzma/.deps/liblzma_la-filter_buffer_encoder.Plo +0 -261
  320. package/deps/xz/src/liblzma/.deps/liblzma_la-filter_common.Plo +0 -261
  321. package/deps/xz/src/liblzma/.deps/liblzma_la-filter_decoder.Plo +0 -283
  322. package/deps/xz/src/liblzma/.deps/liblzma_la-filter_encoder.Plo +0 -283
  323. package/deps/xz/src/liblzma/.deps/liblzma_la-filter_flags_decoder.Plo +0 -261
  324. package/deps/xz/src/liblzma/.deps/liblzma_la-filter_flags_encoder.Plo +0 -261
  325. package/deps/xz/src/liblzma/.deps/liblzma_la-hardware_cputhreads.Plo +0 -260
  326. package/deps/xz/src/liblzma/.deps/liblzma_la-hardware_physmem.Plo +0 -260
  327. package/deps/xz/src/liblzma/.deps/liblzma_la-ia64.Plo +0 -263
  328. package/deps/xz/src/liblzma/.deps/liblzma_la-index.Plo +0 -262
  329. package/deps/xz/src/liblzma/.deps/liblzma_la-index_decoder.Plo +0 -266
  330. package/deps/xz/src/liblzma/.deps/liblzma_la-index_encoder.Plo +0 -268
  331. package/deps/xz/src/liblzma/.deps/liblzma_la-index_hash.Plo +0 -265
  332. package/deps/xz/src/liblzma/.deps/liblzma_la-lz_decoder.Plo +0 -261
  333. package/deps/xz/src/liblzma/.deps/liblzma_la-lz_encoder.Plo +0 -286
  334. package/deps/xz/src/liblzma/.deps/liblzma_la-lz_encoder_mf.Plo +0 -286
  335. package/deps/xz/src/liblzma/.deps/liblzma_la-lzma2_decoder.Plo +0 -266
  336. package/deps/xz/src/liblzma/.deps/liblzma_la-lzma2_encoder.Plo +0 -268
  337. package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_decoder.Plo +0 -274
  338. package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder.Plo +0 -285
  339. package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder_optimum_fast.Plo +0 -300
  340. package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder_optimum_normal.Plo +0 -303
  341. package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder_presets.Plo +0 -259
  342. package/deps/xz/src/liblzma/.deps/liblzma_la-outqueue.Plo +0 -260
  343. package/deps/xz/src/liblzma/.deps/liblzma_la-powerpc.Plo +0 -263
  344. package/deps/xz/src/liblzma/.deps/liblzma_la-price_table.Plo +0 -266
  345. package/deps/xz/src/liblzma/.deps/liblzma_la-sha256.Plo +0 -261
  346. package/deps/xz/src/liblzma/.deps/liblzma_la-simple_coder.Plo +0 -263
  347. package/deps/xz/src/liblzma/.deps/liblzma_la-simple_decoder.Plo +0 -263
  348. package/deps/xz/src/liblzma/.deps/liblzma_la-simple_encoder.Plo +0 -263
  349. package/deps/xz/src/liblzma/.deps/liblzma_la-sparc.Plo +0 -263
  350. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_buffer_decoder.Plo +0 -261
  351. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_buffer_encoder.Plo +0 -261
  352. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_decoder.Plo +0 -263
  353. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_encoder.Plo +0 -263
  354. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_encoder_mt.Plo +0 -273
  355. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_flags_common.Plo +0 -261
  356. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_flags_decoder.Plo +0 -261
  357. package/deps/xz/src/liblzma/.deps/liblzma_la-stream_flags_encoder.Plo +0 -261
  358. package/deps/xz/src/liblzma/.deps/liblzma_la-tuklib_cpucores.Plo +0 -170
  359. package/deps/xz/src/liblzma/.deps/liblzma_la-tuklib_physmem.Plo +0 -170
  360. package/deps/xz/src/liblzma/.deps/liblzma_la-vli_decoder.Plo +0 -258
  361. package/deps/xz/src/liblzma/.deps/liblzma_la-vli_encoder.Plo +0 -258
  362. package/deps/xz/src/liblzma/.deps/liblzma_la-vli_size.Plo +0 -258
  363. package/deps/xz/src/liblzma/.deps/liblzma_la-x86.Plo +0 -263
  364. package/deps/xz/src/liblzma/.libs/liblzma.a +0 -0
  365. package/deps/xz/src/liblzma/.libs/liblzma.lai +0 -41
  366. package/deps/xz/src/liblzma/Makefile +0 -1858
  367. package/deps/xz/src/liblzma/Makefile.am +0 -122
  368. package/deps/xz/src/liblzma/Makefile.in +0 -1858
  369. package/deps/xz/src/liblzma/api/Makefile +0 -608
  370. package/deps/xz/src/liblzma/api/Makefile.am +0 -23
  371. package/deps/xz/src/liblzma/api/Makefile.in +0 -608
  372. package/deps/xz/src/liblzma/api/lzma/base.h +0 -654
  373. package/deps/xz/src/liblzma/api/lzma/bcj.h +0 -90
  374. package/deps/xz/src/liblzma/api/lzma/block.h +0 -581
  375. package/deps/xz/src/liblzma/api/lzma/check.h +0 -150
  376. package/deps/xz/src/liblzma/api/lzma/container.h +0 -619
  377. package/deps/xz/src/liblzma/api/lzma/delta.h +0 -77
  378. package/deps/xz/src/liblzma/api/lzma/filter.h +0 -425
  379. package/deps/xz/src/liblzma/api/lzma/hardware.h +0 -64
  380. package/deps/xz/src/liblzma/api/lzma/index.h +0 -682
  381. package/deps/xz/src/liblzma/api/lzma/index_hash.h +0 -107
  382. package/deps/xz/src/liblzma/api/lzma/lzma12.h +0 -420
  383. package/deps/xz/src/liblzma/api/lzma/stream_flags.h +0 -223
  384. package/deps/xz/src/liblzma/api/lzma/version.h +0 -121
  385. package/deps/xz/src/liblzma/api/lzma/vli.h +0 -166
  386. package/deps/xz/src/liblzma/api/lzma.h +0 -321
  387. package/deps/xz/src/liblzma/check/Makefile.inc +0 -53
  388. package/deps/xz/src/liblzma/check/check.c +0 -174
  389. package/deps/xz/src/liblzma/check/check.h +0 -162
  390. package/deps/xz/src/liblzma/check/crc32_fast.c +0 -82
  391. package/deps/xz/src/liblzma/check/crc32_small.c +0 -61
  392. package/deps/xz/src/liblzma/check/crc32_table.c +0 -19
  393. package/deps/xz/src/liblzma/check/crc32_table_be.h +0 -525
  394. package/deps/xz/src/liblzma/check/crc32_table_le.h +0 -525
  395. package/deps/xz/src/liblzma/check/crc32_tablegen.c +0 -117
  396. package/deps/xz/src/liblzma/check/crc32_x86.S +0 -304
  397. package/deps/xz/src/liblzma/check/crc64_fast.c +0 -72
  398. package/deps/xz/src/liblzma/check/crc64_small.c +0 -53
  399. package/deps/xz/src/liblzma/check/crc64_table.c +0 -19
  400. package/deps/xz/src/liblzma/check/crc64_table_be.h +0 -521
  401. package/deps/xz/src/liblzma/check/crc64_table_le.h +0 -521
  402. package/deps/xz/src/liblzma/check/crc64_tablegen.c +0 -88
  403. package/deps/xz/src/liblzma/check/crc64_x86.S +0 -287
  404. package/deps/xz/src/liblzma/check/crc_macros.h +0 -30
  405. package/deps/xz/src/liblzma/check/sha256.c +0 -196
  406. package/deps/xz/src/liblzma/common/Makefile.inc +0 -76
  407. package/deps/xz/src/liblzma/common/alone_decoder.c +0 -238
  408. package/deps/xz/src/liblzma/common/alone_decoder.h +0 -23
  409. package/deps/xz/src/liblzma/common/alone_encoder.c +0 -157
  410. package/deps/xz/src/liblzma/common/auto_decoder.c +0 -186
  411. package/deps/xz/src/liblzma/common/block_buffer_decoder.c +0 -80
  412. package/deps/xz/src/liblzma/common/block_buffer_encoder.c +0 -337
  413. package/deps/xz/src/liblzma/common/block_buffer_encoder.h +0 -24
  414. package/deps/xz/src/liblzma/common/block_decoder.c +0 -252
  415. package/deps/xz/src/liblzma/common/block_decoder.h +0 -22
  416. package/deps/xz/src/liblzma/common/block_encoder.c +0 -217
  417. package/deps/xz/src/liblzma/common/block_encoder.h +0 -47
  418. package/deps/xz/src/liblzma/common/block_header_decoder.c +0 -124
  419. package/deps/xz/src/liblzma/common/block_header_encoder.c +0 -132
  420. package/deps/xz/src/liblzma/common/block_util.c +0 -90
  421. package/deps/xz/src/liblzma/common/common.c +0 -443
  422. package/deps/xz/src/liblzma/common/common.h +0 -318
  423. package/deps/xz/src/liblzma/common/easy_buffer_encoder.c +0 -27
  424. package/deps/xz/src/liblzma/common/easy_decoder_memusage.c +0 -24
  425. package/deps/xz/src/liblzma/common/easy_encoder.c +0 -24
  426. package/deps/xz/src/liblzma/common/easy_encoder_memusage.c +0 -24
  427. package/deps/xz/src/liblzma/common/easy_preset.c +0 -27
  428. package/deps/xz/src/liblzma/common/easy_preset.h +0 -32
  429. package/deps/xz/src/liblzma/common/filter_buffer_decoder.c +0 -88
  430. package/deps/xz/src/liblzma/common/filter_buffer_encoder.c +0 -55
  431. package/deps/xz/src/liblzma/common/filter_common.c +0 -337
  432. package/deps/xz/src/liblzma/common/filter_common.h +0 -48
  433. package/deps/xz/src/liblzma/common/filter_decoder.c +0 -184
  434. package/deps/xz/src/liblzma/common/filter_decoder.h +0 -23
  435. package/deps/xz/src/liblzma/common/filter_encoder.c +0 -286
  436. package/deps/xz/src/liblzma/common/filter_encoder.h +0 -27
  437. package/deps/xz/src/liblzma/common/filter_flags_decoder.c +0 -46
  438. package/deps/xz/src/liblzma/common/filter_flags_encoder.c +0 -56
  439. package/deps/xz/src/liblzma/common/hardware_cputhreads.c +0 -22
  440. package/deps/xz/src/liblzma/common/hardware_physmem.c +0 -25
  441. package/deps/xz/src/liblzma/common/index.c +0 -1246
  442. package/deps/xz/src/liblzma/common/index.h +0 -73
  443. package/deps/xz/src/liblzma/common/index_decoder.c +0 -345
  444. package/deps/xz/src/liblzma/common/index_encoder.c +0 -254
  445. package/deps/xz/src/liblzma/common/index_encoder.h +0 -23
  446. package/deps/xz/src/liblzma/common/index_hash.c +0 -334
  447. package/deps/xz/src/liblzma/common/memcmplen.h +0 -175
  448. package/deps/xz/src/liblzma/common/outqueue.c +0 -184
  449. package/deps/xz/src/liblzma/common/outqueue.h +0 -156
  450. package/deps/xz/src/liblzma/common/stream_buffer_decoder.c +0 -91
  451. package/deps/xz/src/liblzma/common/stream_buffer_encoder.c +0 -141
  452. package/deps/xz/src/liblzma/common/stream_decoder.c +0 -462
  453. package/deps/xz/src/liblzma/common/stream_decoder.h +0 -22
  454. package/deps/xz/src/liblzma/common/stream_encoder.c +0 -332
  455. package/deps/xz/src/liblzma/common/stream_encoder_mt.c +0 -1131
  456. package/deps/xz/src/liblzma/common/stream_flags_common.c +0 -47
  457. package/deps/xz/src/liblzma/common/stream_flags_common.h +0 -33
  458. package/deps/xz/src/liblzma/common/stream_flags_decoder.c +0 -82
  459. package/deps/xz/src/liblzma/common/stream_flags_encoder.c +0 -86
  460. package/deps/xz/src/liblzma/common/vli_decoder.c +0 -86
  461. package/deps/xz/src/liblzma/common/vli_encoder.c +0 -69
  462. package/deps/xz/src/liblzma/common/vli_size.c +0 -30
  463. package/deps/xz/src/liblzma/delta/Makefile.inc +0 -23
  464. package/deps/xz/src/liblzma/delta/delta_common.c +0 -70
  465. package/deps/xz/src/liblzma/delta/delta_common.h +0 -20
  466. package/deps/xz/src/liblzma/delta/delta_decoder.c +0 -76
  467. package/deps/xz/src/liblzma/delta/delta_decoder.h +0 -26
  468. package/deps/xz/src/liblzma/delta/delta_encoder.c +0 -121
  469. package/deps/xz/src/liblzma/delta/delta_encoder.h +0 -24
  470. package/deps/xz/src/liblzma/delta/delta_private.h +0 -37
  471. package/deps/xz/src/liblzma/liblzma.la +0 -41
  472. package/deps/xz/src/liblzma/liblzma.map +0 -108
  473. package/deps/xz/src/liblzma/liblzma.pc +0 -19
  474. package/deps/xz/src/liblzma/liblzma.pc.in +0 -19
  475. package/deps/xz/src/liblzma/liblzma_la-alone_decoder.lo +0 -12
  476. package/deps/xz/src/liblzma/liblzma_la-alone_decoder.o +0 -0
  477. package/deps/xz/src/liblzma/liblzma_la-alone_encoder.lo +0 -12
  478. package/deps/xz/src/liblzma/liblzma_la-alone_encoder.o +0 -0
  479. package/deps/xz/src/liblzma/liblzma_la-arm.lo +0 -12
  480. package/deps/xz/src/liblzma/liblzma_la-arm.o +0 -0
  481. package/deps/xz/src/liblzma/liblzma_la-armthumb.lo +0 -12
  482. package/deps/xz/src/liblzma/liblzma_la-armthumb.o +0 -0
  483. package/deps/xz/src/liblzma/liblzma_la-auto_decoder.lo +0 -12
  484. package/deps/xz/src/liblzma/liblzma_la-auto_decoder.o +0 -0
  485. package/deps/xz/src/liblzma/liblzma_la-block_buffer_decoder.lo +0 -12
  486. package/deps/xz/src/liblzma/liblzma_la-block_buffer_decoder.o +0 -0
  487. package/deps/xz/src/liblzma/liblzma_la-block_buffer_encoder.lo +0 -12
  488. package/deps/xz/src/liblzma/liblzma_la-block_buffer_encoder.o +0 -0
  489. package/deps/xz/src/liblzma/liblzma_la-block_decoder.lo +0 -12
  490. package/deps/xz/src/liblzma/liblzma_la-block_decoder.o +0 -0
  491. package/deps/xz/src/liblzma/liblzma_la-block_encoder.lo +0 -12
  492. package/deps/xz/src/liblzma/liblzma_la-block_encoder.o +0 -0
  493. package/deps/xz/src/liblzma/liblzma_la-block_header_decoder.lo +0 -12
  494. package/deps/xz/src/liblzma/liblzma_la-block_header_decoder.o +0 -0
  495. package/deps/xz/src/liblzma/liblzma_la-block_header_encoder.lo +0 -12
  496. package/deps/xz/src/liblzma/liblzma_la-block_header_encoder.o +0 -0
  497. package/deps/xz/src/liblzma/liblzma_la-block_util.lo +0 -12
  498. package/deps/xz/src/liblzma/liblzma_la-block_util.o +0 -0
  499. package/deps/xz/src/liblzma/liblzma_la-check.lo +0 -12
  500. package/deps/xz/src/liblzma/liblzma_la-check.o +0 -0
  501. package/deps/xz/src/liblzma/liblzma_la-common.lo +0 -12
  502. package/deps/xz/src/liblzma/liblzma_la-common.o +0 -0
  503. package/deps/xz/src/liblzma/liblzma_la-crc32_fast.lo +0 -12
  504. package/deps/xz/src/liblzma/liblzma_la-crc32_fast.o +0 -0
  505. package/deps/xz/src/liblzma/liblzma_la-crc32_table.lo +0 -12
  506. package/deps/xz/src/liblzma/liblzma_la-crc32_table.o +0 -0
  507. package/deps/xz/src/liblzma/liblzma_la-crc64_fast.lo +0 -12
  508. package/deps/xz/src/liblzma/liblzma_la-crc64_fast.o +0 -0
  509. package/deps/xz/src/liblzma/liblzma_la-crc64_table.lo +0 -12
  510. package/deps/xz/src/liblzma/liblzma_la-crc64_table.o +0 -0
  511. package/deps/xz/src/liblzma/liblzma_la-delta_common.lo +0 -12
  512. package/deps/xz/src/liblzma/liblzma_la-delta_common.o +0 -0
  513. package/deps/xz/src/liblzma/liblzma_la-delta_decoder.lo +0 -12
  514. package/deps/xz/src/liblzma/liblzma_la-delta_decoder.o +0 -0
  515. package/deps/xz/src/liblzma/liblzma_la-delta_encoder.lo +0 -12
  516. package/deps/xz/src/liblzma/liblzma_la-delta_encoder.o +0 -0
  517. package/deps/xz/src/liblzma/liblzma_la-easy_buffer_encoder.lo +0 -12
  518. package/deps/xz/src/liblzma/liblzma_la-easy_buffer_encoder.o +0 -0
  519. package/deps/xz/src/liblzma/liblzma_la-easy_decoder_memusage.lo +0 -12
  520. package/deps/xz/src/liblzma/liblzma_la-easy_decoder_memusage.o +0 -0
  521. package/deps/xz/src/liblzma/liblzma_la-easy_encoder.lo +0 -12
  522. package/deps/xz/src/liblzma/liblzma_la-easy_encoder.o +0 -0
  523. package/deps/xz/src/liblzma/liblzma_la-easy_encoder_memusage.lo +0 -12
  524. package/deps/xz/src/liblzma/liblzma_la-easy_encoder_memusage.o +0 -0
  525. package/deps/xz/src/liblzma/liblzma_la-easy_preset.lo +0 -12
  526. package/deps/xz/src/liblzma/liblzma_la-easy_preset.o +0 -0
  527. package/deps/xz/src/liblzma/liblzma_la-fastpos_table.lo +0 -12
  528. package/deps/xz/src/liblzma/liblzma_la-fastpos_table.o +0 -0
  529. package/deps/xz/src/liblzma/liblzma_la-filter_buffer_decoder.lo +0 -12
  530. package/deps/xz/src/liblzma/liblzma_la-filter_buffer_decoder.o +0 -0
  531. package/deps/xz/src/liblzma/liblzma_la-filter_buffer_encoder.lo +0 -12
  532. package/deps/xz/src/liblzma/liblzma_la-filter_buffer_encoder.o +0 -0
  533. package/deps/xz/src/liblzma/liblzma_la-filter_common.lo +0 -12
  534. package/deps/xz/src/liblzma/liblzma_la-filter_common.o +0 -0
  535. package/deps/xz/src/liblzma/liblzma_la-filter_decoder.lo +0 -12
  536. package/deps/xz/src/liblzma/liblzma_la-filter_decoder.o +0 -0
  537. package/deps/xz/src/liblzma/liblzma_la-filter_encoder.lo +0 -12
  538. package/deps/xz/src/liblzma/liblzma_la-filter_encoder.o +0 -0
  539. package/deps/xz/src/liblzma/liblzma_la-filter_flags_decoder.lo +0 -12
  540. package/deps/xz/src/liblzma/liblzma_la-filter_flags_decoder.o +0 -0
  541. package/deps/xz/src/liblzma/liblzma_la-filter_flags_encoder.lo +0 -12
  542. package/deps/xz/src/liblzma/liblzma_la-filter_flags_encoder.o +0 -0
  543. package/deps/xz/src/liblzma/liblzma_la-hardware_cputhreads.lo +0 -12
  544. package/deps/xz/src/liblzma/liblzma_la-hardware_cputhreads.o +0 -0
  545. package/deps/xz/src/liblzma/liblzma_la-hardware_physmem.lo +0 -12
  546. package/deps/xz/src/liblzma/liblzma_la-hardware_physmem.o +0 -0
  547. package/deps/xz/src/liblzma/liblzma_la-ia64.lo +0 -12
  548. package/deps/xz/src/liblzma/liblzma_la-ia64.o +0 -0
  549. package/deps/xz/src/liblzma/liblzma_la-index.lo +0 -12
  550. package/deps/xz/src/liblzma/liblzma_la-index.o +0 -0
  551. package/deps/xz/src/liblzma/liblzma_la-index_decoder.lo +0 -12
  552. package/deps/xz/src/liblzma/liblzma_la-index_decoder.o +0 -0
  553. package/deps/xz/src/liblzma/liblzma_la-index_encoder.lo +0 -12
  554. package/deps/xz/src/liblzma/liblzma_la-index_encoder.o +0 -0
  555. package/deps/xz/src/liblzma/liblzma_la-index_hash.lo +0 -12
  556. package/deps/xz/src/liblzma/liblzma_la-index_hash.o +0 -0
  557. package/deps/xz/src/liblzma/liblzma_la-lz_decoder.lo +0 -12
  558. package/deps/xz/src/liblzma/liblzma_la-lz_decoder.o +0 -0
  559. package/deps/xz/src/liblzma/liblzma_la-lz_encoder.lo +0 -12
  560. package/deps/xz/src/liblzma/liblzma_la-lz_encoder.o +0 -0
  561. package/deps/xz/src/liblzma/liblzma_la-lz_encoder_mf.lo +0 -12
  562. package/deps/xz/src/liblzma/liblzma_la-lz_encoder_mf.o +0 -0
  563. package/deps/xz/src/liblzma/liblzma_la-lzma2_decoder.lo +0 -12
  564. package/deps/xz/src/liblzma/liblzma_la-lzma2_decoder.o +0 -0
  565. package/deps/xz/src/liblzma/liblzma_la-lzma2_encoder.lo +0 -12
  566. package/deps/xz/src/liblzma/liblzma_la-lzma2_encoder.o +0 -0
  567. package/deps/xz/src/liblzma/liblzma_la-lzma_decoder.lo +0 -12
  568. package/deps/xz/src/liblzma/liblzma_la-lzma_decoder.o +0 -0
  569. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder.lo +0 -12
  570. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder.o +0 -0
  571. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_fast.lo +0 -12
  572. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_fast.o +0 -0
  573. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_normal.lo +0 -12
  574. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_normal.o +0 -0
  575. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_presets.lo +0 -12
  576. package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_presets.o +0 -0
  577. package/deps/xz/src/liblzma/liblzma_la-outqueue.lo +0 -12
  578. package/deps/xz/src/liblzma/liblzma_la-outqueue.o +0 -0
  579. package/deps/xz/src/liblzma/liblzma_la-powerpc.lo +0 -12
  580. package/deps/xz/src/liblzma/liblzma_la-powerpc.o +0 -0
  581. package/deps/xz/src/liblzma/liblzma_la-price_table.lo +0 -12
  582. package/deps/xz/src/liblzma/liblzma_la-price_table.o +0 -0
  583. package/deps/xz/src/liblzma/liblzma_la-sha256.lo +0 -12
  584. package/deps/xz/src/liblzma/liblzma_la-sha256.o +0 -0
  585. package/deps/xz/src/liblzma/liblzma_la-simple_coder.lo +0 -12
  586. package/deps/xz/src/liblzma/liblzma_la-simple_coder.o +0 -0
  587. package/deps/xz/src/liblzma/liblzma_la-simple_decoder.lo +0 -12
  588. package/deps/xz/src/liblzma/liblzma_la-simple_decoder.o +0 -0
  589. package/deps/xz/src/liblzma/liblzma_la-simple_encoder.lo +0 -12
  590. package/deps/xz/src/liblzma/liblzma_la-simple_encoder.o +0 -0
  591. package/deps/xz/src/liblzma/liblzma_la-sparc.lo +0 -12
  592. package/deps/xz/src/liblzma/liblzma_la-sparc.o +0 -0
  593. package/deps/xz/src/liblzma/liblzma_la-stream_buffer_decoder.lo +0 -12
  594. package/deps/xz/src/liblzma/liblzma_la-stream_buffer_decoder.o +0 -0
  595. package/deps/xz/src/liblzma/liblzma_la-stream_buffer_encoder.lo +0 -12
  596. package/deps/xz/src/liblzma/liblzma_la-stream_buffer_encoder.o +0 -0
  597. package/deps/xz/src/liblzma/liblzma_la-stream_decoder.lo +0 -12
  598. package/deps/xz/src/liblzma/liblzma_la-stream_decoder.o +0 -0
  599. package/deps/xz/src/liblzma/liblzma_la-stream_encoder.lo +0 -12
  600. package/deps/xz/src/liblzma/liblzma_la-stream_encoder.o +0 -0
  601. package/deps/xz/src/liblzma/liblzma_la-stream_encoder_mt.lo +0 -12
  602. package/deps/xz/src/liblzma/liblzma_la-stream_encoder_mt.o +0 -0
  603. package/deps/xz/src/liblzma/liblzma_la-stream_flags_common.lo +0 -12
  604. package/deps/xz/src/liblzma/liblzma_la-stream_flags_common.o +0 -0
  605. package/deps/xz/src/liblzma/liblzma_la-stream_flags_decoder.lo +0 -12
  606. package/deps/xz/src/liblzma/liblzma_la-stream_flags_decoder.o +0 -0
  607. package/deps/xz/src/liblzma/liblzma_la-stream_flags_encoder.lo +0 -12
  608. package/deps/xz/src/liblzma/liblzma_la-stream_flags_encoder.o +0 -0
  609. package/deps/xz/src/liblzma/liblzma_la-tuklib_cpucores.lo +0 -12
  610. package/deps/xz/src/liblzma/liblzma_la-tuklib_cpucores.o +0 -0
  611. package/deps/xz/src/liblzma/liblzma_la-tuklib_physmem.lo +0 -12
  612. package/deps/xz/src/liblzma/liblzma_la-tuklib_physmem.o +0 -0
  613. package/deps/xz/src/liblzma/liblzma_la-vli_decoder.lo +0 -12
  614. package/deps/xz/src/liblzma/liblzma_la-vli_decoder.o +0 -0
  615. package/deps/xz/src/liblzma/liblzma_la-vli_encoder.lo +0 -12
  616. package/deps/xz/src/liblzma/liblzma_la-vli_encoder.o +0 -0
  617. package/deps/xz/src/liblzma/liblzma_la-vli_size.lo +0 -12
  618. package/deps/xz/src/liblzma/liblzma_la-vli_size.o +0 -0
  619. package/deps/xz/src/liblzma/liblzma_la-x86.lo +0 -12
  620. package/deps/xz/src/liblzma/liblzma_la-x86.o +0 -0
  621. package/deps/xz/src/liblzma/liblzma_w32res.rc +0 -12
  622. package/deps/xz/src/liblzma/lz/Makefile.inc +0 -22
  623. package/deps/xz/src/liblzma/lz/lz_decoder.c +0 -300
  624. package/deps/xz/src/liblzma/lz/lz_decoder.h +0 -235
  625. package/deps/xz/src/liblzma/lz/lz_encoder.c +0 -605
  626. package/deps/xz/src/liblzma/lz/lz_encoder.h +0 -328
  627. package/deps/xz/src/liblzma/lz/lz_encoder_hash.h +0 -108
  628. package/deps/xz/src/liblzma/lz/lz_encoder_hash_table.h +0 -68
  629. package/deps/xz/src/liblzma/lz/lz_encoder_mf.c +0 -744
  630. package/deps/xz/src/liblzma/lzma/Makefile.inc +0 -43
  631. package/deps/xz/src/liblzma/lzma/fastpos.h +0 -141
  632. package/deps/xz/src/liblzma/lzma/fastpos_table.c +0 -519
  633. package/deps/xz/src/liblzma/lzma/fastpos_tablegen.c +0 -56
  634. package/deps/xz/src/liblzma/lzma/lzma2_decoder.c +0 -304
  635. package/deps/xz/src/liblzma/lzma/lzma2_decoder.h +0 -29
  636. package/deps/xz/src/liblzma/lzma/lzma2_encoder.c +0 -403
  637. package/deps/xz/src/liblzma/lzma/lzma2_encoder.h +0 -43
  638. package/deps/xz/src/liblzma/lzma/lzma_common.h +0 -224
  639. package/deps/xz/src/liblzma/lzma/lzma_decoder.c +0 -1061
  640. package/deps/xz/src/liblzma/lzma/lzma_decoder.h +0 -53
  641. package/deps/xz/src/liblzma/lzma/lzma_encoder.c +0 -676
  642. package/deps/xz/src/liblzma/lzma/lzma_encoder.h +0 -55
  643. package/deps/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c +0 -169
  644. package/deps/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c +0 -854
  645. package/deps/xz/src/liblzma/lzma/lzma_encoder_presets.c +0 -63
  646. package/deps/xz/src/liblzma/lzma/lzma_encoder_private.h +0 -148
  647. package/deps/xz/src/liblzma/rangecoder/Makefile.inc +0 -21
  648. package/deps/xz/src/liblzma/rangecoder/price.h +0 -92
  649. package/deps/xz/src/liblzma/rangecoder/price_table.c +0 -22
  650. package/deps/xz/src/liblzma/rangecoder/price_tablegen.c +0 -87
  651. package/deps/xz/src/liblzma/rangecoder/range_common.h +0 -73
  652. package/deps/xz/src/liblzma/rangecoder/range_decoder.h +0 -185
  653. package/deps/xz/src/liblzma/rangecoder/range_encoder.h +0 -231
  654. package/deps/xz/src/liblzma/simple/Makefile.inc +0 -47
  655. package/deps/xz/src/liblzma/simple/arm.c +0 -71
  656. package/deps/xz/src/liblzma/simple/armthumb.c +0 -76
  657. package/deps/xz/src/liblzma/simple/ia64.c +0 -112
  658. package/deps/xz/src/liblzma/simple/powerpc.c +0 -75
  659. package/deps/xz/src/liblzma/simple/simple_coder.c +0 -277
  660. package/deps/xz/src/liblzma/simple/simple_coder.h +0 -72
  661. package/deps/xz/src/liblzma/simple/simple_decoder.c +0 -40
  662. package/deps/xz/src/liblzma/simple/simple_decoder.h +0 -22
  663. package/deps/xz/src/liblzma/simple/simple_encoder.c +0 -38
  664. package/deps/xz/src/liblzma/simple/simple_encoder.h +0 -23
  665. package/deps/xz/src/liblzma/simple/simple_private.h +0 -76
  666. package/deps/xz/src/liblzma/simple/sparc.c +0 -83
  667. package/deps/xz/src/liblzma/simple/x86.c +0 -156
  668. package/deps/xz/src/liblzma/validate_map.sh +0 -68
  669. package/deps/xz/src/lzmainfo/.deps/lzmainfo-lzmainfo.Po +0 -1
  670. package/deps/xz/src/lzmainfo/.deps/lzmainfo-tuklib_exit.Po +0 -1
  671. package/deps/xz/src/lzmainfo/.deps/lzmainfo-tuklib_progname.Po +0 -1
  672. package/deps/xz/src/lzmainfo/Makefile +0 -802
  673. package/deps/xz/src/lzmainfo/Makefile.am +0 -39
  674. package/deps/xz/src/lzmainfo/Makefile.in +0 -802
  675. package/deps/xz/src/lzmainfo/lzmainfo.1 +0 -60
  676. package/deps/xz/src/lzmainfo/lzmainfo.c +0 -219
  677. package/deps/xz/src/lzmainfo/lzmainfo_w32res.rc +0 -12
  678. package/deps/xz/src/scripts/Makefile +0 -642
  679. package/deps/xz/src/scripts/Makefile.am +0 -55
  680. package/deps/xz/src/scripts/Makefile.in +0 -642
  681. package/deps/xz/src/scripts/xzdiff +0 -200
  682. package/deps/xz/src/scripts/xzdiff.1 +0 -77
  683. package/deps/xz/src/scripts/xzdiff.in +0 -200
  684. package/deps/xz/src/scripts/xzgrep +0 -215
  685. package/deps/xz/src/scripts/xzgrep.1 +0 -98
  686. package/deps/xz/src/scripts/xzgrep.in +0 -215
  687. package/deps/xz/src/scripts/xzless +0 -58
  688. package/deps/xz/src/scripts/xzless.1 +0 -69
  689. package/deps/xz/src/scripts/xzless.in +0 -58
  690. package/deps/xz/src/scripts/xzmore +0 -78
  691. package/deps/xz/src/scripts/xzmore.1 +0 -55
  692. package/deps/xz/src/scripts/xzmore.in +0 -78
  693. package/deps/xz/src/xz/.deps/xz-args.Po +0 -1
  694. package/deps/xz/src/xz/.deps/xz-coder.Po +0 -1
  695. package/deps/xz/src/xz/.deps/xz-file_io.Po +0 -1
  696. package/deps/xz/src/xz/.deps/xz-hardware.Po +0 -1
  697. package/deps/xz/src/xz/.deps/xz-list.Po +0 -1
  698. package/deps/xz/src/xz/.deps/xz-main.Po +0 -1
  699. package/deps/xz/src/xz/.deps/xz-message.Po +0 -1
  700. package/deps/xz/src/xz/.deps/xz-mytime.Po +0 -1
  701. package/deps/xz/src/xz/.deps/xz-options.Po +0 -1
  702. package/deps/xz/src/xz/.deps/xz-signals.Po +0 -1
  703. package/deps/xz/src/xz/.deps/xz-suffix.Po +0 -1
  704. package/deps/xz/src/xz/.deps/xz-tuklib_exit.Po +0 -1
  705. package/deps/xz/src/xz/.deps/xz-tuklib_mbstr_fw.Po +0 -1
  706. package/deps/xz/src/xz/.deps/xz-tuklib_mbstr_width.Po +0 -1
  707. package/deps/xz/src/xz/.deps/xz-tuklib_open_stdxxx.Po +0 -1
  708. package/deps/xz/src/xz/.deps/xz-tuklib_progname.Po +0 -1
  709. package/deps/xz/src/xz/.deps/xz-util.Po +0 -1
  710. package/deps/xz/src/xz/Makefile +0 -1066
  711. package/deps/xz/src/xz/Makefile.am +0 -107
  712. package/deps/xz/src/xz/Makefile.in +0 -1066
  713. package/deps/xz/src/xz/args.c +0 -684
  714. package/deps/xz/src/xz/args.h +0 -44
  715. package/deps/xz/src/xz/coder.c +0 -919
  716. package/deps/xz/src/xz/coder.h +0 -76
  717. package/deps/xz/src/xz/file_io.c +0 -1184
  718. package/deps/xz/src/xz/file_io.h +0 -150
  719. package/deps/xz/src/xz/hardware.c +0 -150
  720. package/deps/xz/src/xz/hardware.h +0 -37
  721. package/deps/xz/src/xz/list.c +0 -1186
  722. package/deps/xz/src/xz/list.h +0 -18
  723. package/deps/xz/src/xz/main.c +0 -307
  724. package/deps/xz/src/xz/main.h +0 -30
  725. package/deps/xz/src/xz/message.c +0 -1258
  726. package/deps/xz/src/xz/message.h +0 -167
  727. package/deps/xz/src/xz/mytime.c +0 -89
  728. package/deps/xz/src/xz/mytime.h +0 -47
  729. package/deps/xz/src/xz/options.c +0 -363
  730. package/deps/xz/src/xz/options.h +0 -31
  731. package/deps/xz/src/xz/private.h +0 -59
  732. package/deps/xz/src/xz/signals.c +0 -209
  733. package/deps/xz/src/xz/signals.h +0 -43
  734. package/deps/xz/src/xz/suffix.c +0 -399
  735. package/deps/xz/src/xz/suffix.h +0 -28
  736. package/deps/xz/src/xz/util.c +0 -288
  737. package/deps/xz/src/xz/util.h +0 -123
  738. package/deps/xz/src/xz/xz.1 +0 -2786
  739. package/deps/xz/src/xz/xz_w32res.rc +0 -12
  740. package/deps/xz/src/xzdec/.deps/lzmadec-tuklib_exit.Po +0 -1
  741. package/deps/xz/src/xzdec/.deps/lzmadec-tuklib_progname.Po +0 -1
  742. package/deps/xz/src/xzdec/.deps/lzmadec-xzdec.Po +0 -1
  743. package/deps/xz/src/xzdec/.deps/xzdec-tuklib_exit.Po +0 -1
  744. package/deps/xz/src/xzdec/.deps/xzdec-tuklib_progname.Po +0 -1
  745. package/deps/xz/src/xzdec/.deps/xzdec-xzdec.Po +0 -1
  746. package/deps/xz/src/xzdec/Makefile +0 -901
  747. package/deps/xz/src/xzdec/Makefile.am +0 -82
  748. package/deps/xz/src/xzdec/Makefile.in +0 -901
  749. package/deps/xz/src/xzdec/lzmadec_w32res.rc +0 -12
  750. package/deps/xz/src/xzdec/xzdec.1 +0 -146
  751. package/deps/xz/src/xzdec/xzdec.c +0 -323
  752. package/deps/xz/src/xzdec/xzdec_w32res.rc +0 -12
  753. package/deps/xz/stamp-h1 +0 -1
  754. package/deps/xz/tests/.deps/create_compress_files.Po +0 -1
  755. package/deps/xz/tests/.deps/test_bcj_exact_size.Po +0 -1
  756. package/deps/xz/tests/.deps/test_block_header.Po +0 -1
  757. package/deps/xz/tests/.deps/test_check.Po +0 -1
  758. package/deps/xz/tests/.deps/test_filter_flags.Po +0 -1
  759. package/deps/xz/tests/.deps/test_index.Po +0 -1
  760. package/deps/xz/tests/.deps/test_stream_flags.Po +0 -1
  761. package/deps/xz/tests/Makefile +0 -832
  762. package/deps/xz/tests/Makefile.am +0 -57
  763. package/deps/xz/tests/Makefile.in +0 -832
  764. package/deps/xz/tests/bcj_test.c +0 -65
  765. package/deps/xz/tests/compress_prepared_bcj_sparc +0 -0
  766. package/deps/xz/tests/compress_prepared_bcj_x86 +0 -0
  767. package/deps/xz/tests/create_compress_files.c +0 -158
  768. package/deps/xz/tests/files/README +0 -240
  769. package/deps/xz/tests/files/bad-0-backward_size.xz +0 -0
  770. package/deps/xz/tests/files/bad-0-empty-truncated.xz +0 -0
  771. package/deps/xz/tests/files/bad-0-footer_magic.xz +0 -0
  772. package/deps/xz/tests/files/bad-0-header_magic.xz +0 -0
  773. package/deps/xz/tests/files/bad-0-nonempty_index.xz +0 -0
  774. package/deps/xz/tests/files/bad-0cat-alone.xz +0 -0
  775. package/deps/xz/tests/files/bad-0cat-header_magic.xz +0 -0
  776. package/deps/xz/tests/files/bad-0catpad-empty.xz +0 -0
  777. package/deps/xz/tests/files/bad-0pad-empty.xz +0 -0
  778. package/deps/xz/tests/files/bad-1-block_header-1.xz +0 -0
  779. package/deps/xz/tests/files/bad-1-block_header-2.xz +0 -0
  780. package/deps/xz/tests/files/bad-1-block_header-3.xz +0 -0
  781. package/deps/xz/tests/files/bad-1-block_header-4.xz +0 -0
  782. package/deps/xz/tests/files/bad-1-block_header-5.xz +0 -0
  783. package/deps/xz/tests/files/bad-1-block_header-6.xz +0 -0
  784. package/deps/xz/tests/files/bad-1-check-crc32.xz +0 -0
  785. package/deps/xz/tests/files/bad-1-check-crc64.xz +0 -0
  786. package/deps/xz/tests/files/bad-1-check-sha256.xz +0 -0
  787. package/deps/xz/tests/files/bad-1-lzma2-1.xz +0 -0
  788. package/deps/xz/tests/files/bad-1-lzma2-2.xz +0 -0
  789. package/deps/xz/tests/files/bad-1-lzma2-3.xz +0 -0
  790. package/deps/xz/tests/files/bad-1-lzma2-4.xz +0 -0
  791. package/deps/xz/tests/files/bad-1-lzma2-5.xz +0 -0
  792. package/deps/xz/tests/files/bad-1-lzma2-6.xz +0 -0
  793. package/deps/xz/tests/files/bad-1-lzma2-7.xz +0 -0
  794. package/deps/xz/tests/files/bad-1-lzma2-8.xz +0 -0
  795. package/deps/xz/tests/files/bad-1-stream_flags-1.xz +0 -0
  796. package/deps/xz/tests/files/bad-1-stream_flags-2.xz +0 -0
  797. package/deps/xz/tests/files/bad-1-stream_flags-3.xz +0 -0
  798. package/deps/xz/tests/files/bad-1-vli-1.xz +0 -0
  799. package/deps/xz/tests/files/bad-1-vli-2.xz +0 -0
  800. package/deps/xz/tests/files/bad-2-compressed_data_padding.xz +0 -0
  801. package/deps/xz/tests/files/bad-2-index-1.xz +0 -0
  802. package/deps/xz/tests/files/bad-2-index-2.xz +0 -0
  803. package/deps/xz/tests/files/bad-2-index-3.xz +0 -0
  804. package/deps/xz/tests/files/bad-2-index-4.xz +0 -0
  805. package/deps/xz/tests/files/bad-2-index-5.xz +0 -0
  806. package/deps/xz/tests/files/good-0-empty.xz +0 -0
  807. package/deps/xz/tests/files/good-0cat-empty.xz +0 -0
  808. package/deps/xz/tests/files/good-0catpad-empty.xz +0 -0
  809. package/deps/xz/tests/files/good-0pad-empty.xz +0 -0
  810. package/deps/xz/tests/files/good-1-3delta-lzma2.xz +0 -0
  811. package/deps/xz/tests/files/good-1-block_header-1.xz +0 -0
  812. package/deps/xz/tests/files/good-1-block_header-2.xz +0 -0
  813. package/deps/xz/tests/files/good-1-block_header-3.xz +0 -0
  814. package/deps/xz/tests/files/good-1-check-crc32.xz +0 -0
  815. package/deps/xz/tests/files/good-1-check-crc64.xz +0 -0
  816. package/deps/xz/tests/files/good-1-check-none.xz +0 -0
  817. package/deps/xz/tests/files/good-1-check-sha256.xz +0 -0
  818. package/deps/xz/tests/files/good-1-delta-lzma2.tiff.xz +0 -0
  819. package/deps/xz/tests/files/good-1-lzma2-1.xz +0 -0
  820. package/deps/xz/tests/files/good-1-lzma2-2.xz +0 -0
  821. package/deps/xz/tests/files/good-1-lzma2-3.xz +0 -0
  822. package/deps/xz/tests/files/good-1-lzma2-4.xz +0 -0
  823. package/deps/xz/tests/files/good-1-lzma2-5.xz +0 -0
  824. package/deps/xz/tests/files/good-1-sparc-lzma2.xz +0 -0
  825. package/deps/xz/tests/files/good-1-x86-lzma2.xz +0 -0
  826. package/deps/xz/tests/files/good-2-lzma2.xz +0 -0
  827. package/deps/xz/tests/files/unsupported-block_header.xz +0 -0
  828. package/deps/xz/tests/files/unsupported-check.xz +0 -0
  829. package/deps/xz/tests/files/unsupported-filter_flags-1.xz +0 -0
  830. package/deps/xz/tests/files/unsupported-filter_flags-2.xz +0 -0
  831. package/deps/xz/tests/files/unsupported-filter_flags-3.xz +0 -0
  832. package/deps/xz/tests/test_bcj_exact_size.c +0 -113
  833. package/deps/xz/tests/test_block_header.c +0 -240
  834. package/deps/xz/tests/test_check.c +0 -83
  835. package/deps/xz/tests/test_compress.sh +0 -142
  836. package/deps/xz/tests/test_files.sh +0 -57
  837. package/deps/xz/tests/test_filter_flags.c +0 -258
  838. package/deps/xz/tests/test_index.c +0 -659
  839. package/deps/xz/tests/test_scripts.sh +0 -76
  840. package/deps/xz/tests/test_stream_flags.c +0 -180
  841. package/deps/xz/tests/tests.h +0 -124
  842. package/deps/xz/tests/xzgrep_expected_output +0 -39
  843. package/deps/xz/windows/INSTALL-MSVC.txt +0 -47
  844. package/deps/xz/windows/INSTALL-MinGW.txt +0 -138
  845. package/deps/xz/windows/README-Windows.txt +0 -122
  846. package/deps/xz/windows/build.bash +0 -203
  847. package/deps/xz/windows/config.h +0 -142
  848. package/deps/xz/windows/liblzma.vcxproj +0 -354
  849. package/deps/xz/windows/liblzma_dll.vcxproj +0 -383
  850. package/deps/xz/windows/xz_win.sln +0 -48
  851. package/lib/lzma.js +0 -377
  852. package/node_modules/node-pre-gyp/CHANGELOG.md +0 -319
  853. package/node_modules/node-pre-gyp/LICENSE +0 -27
  854. package/node_modules/node-pre-gyp/README.md +0 -570
  855. package/node_modules/node-pre-gyp/appveyor.yml +0 -30
  856. package/node_modules/node-pre-gyp/bin/node-pre-gyp +0 -131
  857. package/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd +0 -2
  858. package/node_modules/node-pre-gyp/lib/build.js +0 -43
  859. package/node_modules/node-pre-gyp/lib/clean.js +0 -23
  860. package/node_modules/node-pre-gyp/lib/configure.js +0 -48
  861. package/node_modules/node-pre-gyp/lib/info.js +0 -40
  862. package/node_modules/node-pre-gyp/lib/install.js +0 -215
  863. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +0 -192
  864. package/node_modules/node-pre-gyp/lib/package.js +0 -46
  865. package/node_modules/node-pre-gyp/lib/pre-binding.js +0 -25
  866. package/node_modules/node-pre-gyp/lib/publish.js +0 -77
  867. package/node_modules/node-pre-gyp/lib/rebuild.js +0 -13
  868. package/node_modules/node-pre-gyp/lib/reinstall.js +0 -13
  869. package/node_modules/node-pre-gyp/lib/reveal.js +0 -31
  870. package/node_modules/node-pre-gyp/lib/testbinary.js +0 -73
  871. package/node_modules/node-pre-gyp/lib/testpackage.js +0 -49
  872. package/node_modules/node-pre-gyp/lib/unpublish.js +0 -41
  873. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +0 -1222
  874. package/node_modules/node-pre-gyp/lib/util/compile.js +0 -87
  875. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +0 -94
  876. package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html +0 -26
  877. package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json +0 -9
  878. package/node_modules/node-pre-gyp/lib/util/s3_setup.js +0 -27
  879. package/node_modules/node-pre-gyp/lib/util/versioning.js +0 -308
  880. package/node_modules/node-pre-gyp/package.json +0 -136
@@ -1,1131 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- //
3
- /// \file stream_encoder_mt.c
4
- /// \brief Multithreaded .xz Stream encoder
5
- //
6
- // Author: Lasse Collin
7
- //
8
- // This file has been put into the public domain.
9
- // You can do whatever you want with this file.
10
- //
11
- ///////////////////////////////////////////////////////////////////////////////
12
-
13
- #include "filter_encoder.h"
14
- #include "easy_preset.h"
15
- #include "block_encoder.h"
16
- #include "block_buffer_encoder.h"
17
- #include "index_encoder.h"
18
- #include "outqueue.h"
19
-
20
-
21
- /// Maximum supported block size. This makes it simpler to prevent integer
22
- /// overflows if we are given unusually large block size.
23
- #define BLOCK_SIZE_MAX (UINT64_MAX / LZMA_THREADS_MAX)
24
-
25
-
26
- typedef enum {
27
- /// Waiting for work.
28
- THR_IDLE,
29
-
30
- /// Encoding is in progress.
31
- THR_RUN,
32
-
33
- /// Encoding is in progress but no more input data will
34
- /// be read.
35
- THR_FINISH,
36
-
37
- /// The main thread wants the thread to stop whatever it was doing
38
- /// but not exit.
39
- THR_STOP,
40
-
41
- /// The main thread wants the thread to exit. We could use
42
- /// cancellation but since there's stopped anyway, this is lazier.
43
- THR_EXIT,
44
-
45
- } worker_state;
46
-
47
-
48
- typedef struct worker_thread_s worker_thread;
49
- struct worker_thread_s {
50
- worker_state state;
51
-
52
- /// Input buffer of coder->block_size bytes. The main thread will
53
- /// put new input into this and update in_size accordingly. Once
54
- /// no more input is coming, state will be set to THR_FINISH.
55
- uint8_t *in;
56
-
57
- /// Amount of data available in the input buffer. This is modified
58
- /// only by the main thread.
59
- size_t in_size;
60
-
61
- /// Output buffer for this thread. This is set by the main
62
- /// thread every time a new Block is started with this thread
63
- /// structure.
64
- lzma_outbuf *outbuf;
65
-
66
- /// Pointer to the main structure is needed when putting this
67
- /// thread back to the stack of free threads.
68
- lzma_coder *coder;
69
-
70
- /// The allocator is set by the main thread. Since a copy of the
71
- /// pointer is kept here, the application must not change the
72
- /// allocator before calling lzma_end().
73
- const lzma_allocator *allocator;
74
-
75
- /// Amount of uncompressed data that has already been compressed.
76
- uint64_t progress_in;
77
-
78
- /// Amount of compressed data that is ready.
79
- uint64_t progress_out;
80
-
81
- /// Block encoder
82
- lzma_next_coder block_encoder;
83
-
84
- /// Compression options for this Block
85
- lzma_block block_options;
86
-
87
- /// Next structure in the stack of free worker threads.
88
- worker_thread *next;
89
-
90
- mythread_mutex mutex;
91
- mythread_cond cond;
92
-
93
- /// The ID of this thread is used to join the thread
94
- /// when it's not needed anymore.
95
- mythread thread_id;
96
- };
97
-
98
-
99
- struct lzma_coder_s {
100
- enum {
101
- SEQ_STREAM_HEADER,
102
- SEQ_BLOCK,
103
- SEQ_INDEX,
104
- SEQ_STREAM_FOOTER,
105
- } sequence;
106
-
107
- /// Start a new Block every block_size bytes of input unless
108
- /// LZMA_FULL_FLUSH or LZMA_FULL_BARRIER is used earlier.
109
- size_t block_size;
110
-
111
- /// The filter chain currently in use
112
- lzma_filter filters[LZMA_FILTERS_MAX + 1];
113
-
114
-
115
- /// Index to hold sizes of the Blocks
116
- lzma_index *index;
117
-
118
- /// Index encoder
119
- lzma_next_coder index_encoder;
120
-
121
-
122
- /// Stream Flags for encoding the Stream Header and Stream Footer.
123
- lzma_stream_flags stream_flags;
124
-
125
- /// Buffer to hold Stream Header and Stream Footer.
126
- uint8_t header[LZMA_STREAM_HEADER_SIZE];
127
-
128
- /// Read position in header[]
129
- size_t header_pos;
130
-
131
-
132
- /// Output buffer queue for compressed data
133
- lzma_outq outq;
134
-
135
-
136
- /// Maximum wait time if cannot use all the input and cannot
137
- /// fill the output buffer. This is in milliseconds.
138
- uint32_t timeout;
139
-
140
-
141
- /// Error code from a worker thread
142
- lzma_ret thread_error;
143
-
144
- /// Array of allocated thread-specific structures
145
- worker_thread *threads;
146
-
147
- /// Number of structures in "threads" above. This is also the
148
- /// number of threads that will be created at maximum.
149
- uint32_t threads_max;
150
-
151
- /// Number of thread structures that have been initialized, and
152
- /// thus the number of worker threads actually created so far.
153
- uint32_t threads_initialized;
154
-
155
- /// Stack of free threads. When a thread finishes, it puts itself
156
- /// back into this stack. This starts as empty because threads
157
- /// are created only when actually needed.
158
- worker_thread *threads_free;
159
-
160
- /// The most recent worker thread to which the main thread writes
161
- /// the new input from the application.
162
- worker_thread *thr;
163
-
164
-
165
- /// Amount of uncompressed data in Blocks that have already
166
- /// been finished.
167
- uint64_t progress_in;
168
-
169
- /// Amount of compressed data in Stream Header + Blocks that
170
- /// have already been finished.
171
- uint64_t progress_out;
172
-
173
-
174
- mythread_mutex mutex;
175
- mythread_cond cond;
176
- };
177
-
178
-
179
- /// Tell the main thread that something has gone wrong.
180
- static void
181
- worker_error(worker_thread *thr, lzma_ret ret)
182
- {
183
- assert(ret != LZMA_OK);
184
- assert(ret != LZMA_STREAM_END);
185
-
186
- mythread_sync(thr->coder->mutex) {
187
- if (thr->coder->thread_error == LZMA_OK)
188
- thr->coder->thread_error = ret;
189
-
190
- mythread_cond_signal(&thr->coder->cond);
191
- }
192
-
193
- return;
194
- }
195
-
196
-
197
- static worker_state
198
- worker_encode(worker_thread *thr, worker_state state)
199
- {
200
- assert(thr->progress_in == 0);
201
- assert(thr->progress_out == 0);
202
-
203
- // Set the Block options.
204
- thr->block_options = (lzma_block){
205
- .version = 0,
206
- .check = thr->coder->stream_flags.check,
207
- .compressed_size = thr->coder->outq.buf_size_max,
208
- .uncompressed_size = thr->coder->block_size,
209
-
210
- // TODO: To allow changing the filter chain, the filters
211
- // array must be copied to each worker_thread.
212
- .filters = thr->coder->filters,
213
- };
214
-
215
- // Calculate maximum size of the Block Header. This amount is
216
- // reserved in the beginning of the buffer so that Block Header
217
- // along with Compressed Size and Uncompressed Size can be
218
- // written there.
219
- lzma_ret ret = lzma_block_header_size(&thr->block_options);
220
- if (ret != LZMA_OK) {
221
- worker_error(thr, ret);
222
- return THR_STOP;
223
- }
224
-
225
- // Initialize the Block encoder.
226
- ret = lzma_block_encoder_init(&thr->block_encoder,
227
- thr->allocator, &thr->block_options);
228
- if (ret != LZMA_OK) {
229
- worker_error(thr, ret);
230
- return THR_STOP;
231
- }
232
-
233
- size_t in_pos = 0;
234
- size_t in_size = 0;
235
-
236
- thr->outbuf->size = thr->block_options.header_size;
237
- const size_t out_size = thr->coder->outq.buf_size_max;
238
-
239
- do {
240
- mythread_sync(thr->mutex) {
241
- // Store in_pos and out_pos into *thr so that
242
- // an application may read them via
243
- // lzma_get_progress() to get progress information.
244
- //
245
- // NOTE: These aren't updated when the encoding
246
- // finishes. Instead, the final values are taken
247
- // later from thr->outbuf.
248
- thr->progress_in = in_pos;
249
- thr->progress_out = thr->outbuf->size;
250
-
251
- while (in_size == thr->in_size
252
- && thr->state == THR_RUN)
253
- mythread_cond_wait(&thr->cond, &thr->mutex);
254
-
255
- state = thr->state;
256
- in_size = thr->in_size;
257
- }
258
-
259
- // Return if we were asked to stop or exit.
260
- if (state >= THR_STOP)
261
- return state;
262
-
263
- lzma_action action = state == THR_FINISH
264
- ? LZMA_FINISH : LZMA_RUN;
265
-
266
- // Limit the amount of input given to the Block encoder
267
- // at once. This way this thread can react fairly quickly
268
- // if the main thread wants us to stop or exit.
269
- static const size_t in_chunk_max = 16384;
270
- size_t in_limit = in_size;
271
- if (in_size - in_pos > in_chunk_max) {
272
- in_limit = in_pos + in_chunk_max;
273
- action = LZMA_RUN;
274
- }
275
-
276
- ret = thr->block_encoder.code(
277
- thr->block_encoder.coder, thr->allocator,
278
- thr->in, &in_pos, in_limit, thr->outbuf->buf,
279
- &thr->outbuf->size, out_size, action);
280
- } while (ret == LZMA_OK && thr->outbuf->size < out_size);
281
-
282
- switch (ret) {
283
- case LZMA_STREAM_END:
284
- assert(state == THR_FINISH);
285
-
286
- // Encode the Block Header. By doing it after
287
- // the compression, we can store the Compressed Size
288
- // and Uncompressed Size fields.
289
- ret = lzma_block_header_encode(&thr->block_options,
290
- thr->outbuf->buf);
291
- if (ret != LZMA_OK) {
292
- worker_error(thr, ret);
293
- return THR_STOP;
294
- }
295
-
296
- break;
297
-
298
- case LZMA_OK:
299
- // The data was incompressible. Encode it using uncompressed
300
- // LZMA2 chunks.
301
- //
302
- // First wait that we have gotten all the input.
303
- mythread_sync(thr->mutex) {
304
- while (thr->state == THR_RUN)
305
- mythread_cond_wait(&thr->cond, &thr->mutex);
306
-
307
- state = thr->state;
308
- in_size = thr->in_size;
309
- }
310
-
311
- if (state >= THR_STOP)
312
- return state;
313
-
314
- // Do the encoding. This takes care of the Block Header too.
315
- thr->outbuf->size = 0;
316
- ret = lzma_block_uncomp_encode(&thr->block_options,
317
- thr->in, in_size, thr->outbuf->buf,
318
- &thr->outbuf->size, out_size);
319
-
320
- // It shouldn't fail.
321
- if (ret != LZMA_OK) {
322
- worker_error(thr, LZMA_PROG_ERROR);
323
- return THR_STOP;
324
- }
325
-
326
- break;
327
-
328
- default:
329
- worker_error(thr, ret);
330
- return THR_STOP;
331
- }
332
-
333
- // Set the size information that will be read by the main thread
334
- // to write the Index field.
335
- thr->outbuf->unpadded_size
336
- = lzma_block_unpadded_size(&thr->block_options);
337
- assert(thr->outbuf->unpadded_size != 0);
338
- thr->outbuf->uncompressed_size = thr->block_options.uncompressed_size;
339
-
340
- return THR_FINISH;
341
- }
342
-
343
-
344
- static MYTHREAD_RET_TYPE
345
- worker_start(void *thr_ptr)
346
- {
347
- worker_thread *thr = thr_ptr;
348
- worker_state state = THR_IDLE; // Init to silence a warning
349
-
350
- while (true) {
351
- // Wait for work.
352
- mythread_sync(thr->mutex) {
353
- while (true) {
354
- // The thread is already idle so if we are
355
- // requested to stop, just set the state.
356
- if (thr->state == THR_STOP) {
357
- thr->state = THR_IDLE;
358
- mythread_cond_signal(&thr->cond);
359
- }
360
-
361
- state = thr->state;
362
- if (state != THR_IDLE)
363
- break;
364
-
365
- mythread_cond_wait(&thr->cond, &thr->mutex);
366
- }
367
- }
368
-
369
- assert(state != THR_IDLE);
370
- assert(state != THR_STOP);
371
-
372
- if (state <= THR_FINISH)
373
- state = worker_encode(thr, state);
374
-
375
- if (state == THR_EXIT)
376
- break;
377
-
378
- // Mark the thread as idle unless the main thread has
379
- // told us to exit. Signal is needed for the case
380
- // where the main thread is waiting for the threads to stop.
381
- mythread_sync(thr->mutex) {
382
- if (thr->state != THR_EXIT) {
383
- thr->state = THR_IDLE;
384
- mythread_cond_signal(&thr->cond);
385
- }
386
- }
387
-
388
- mythread_sync(thr->coder->mutex) {
389
- // Mark the output buffer as finished if
390
- // no errors occurred.
391
- thr->outbuf->finished = state == THR_FINISH;
392
-
393
- // Update the main progress info.
394
- thr->coder->progress_in
395
- += thr->outbuf->uncompressed_size;
396
- thr->coder->progress_out += thr->outbuf->size;
397
- thr->progress_in = 0;
398
- thr->progress_out = 0;
399
-
400
- // Return this thread to the stack of free threads.
401
- thr->next = thr->coder->threads_free;
402
- thr->coder->threads_free = thr;
403
-
404
- mythread_cond_signal(&thr->coder->cond);
405
- }
406
- }
407
-
408
- // Exiting, free the resources.
409
- mythread_mutex_destroy(&thr->mutex);
410
- mythread_cond_destroy(&thr->cond);
411
-
412
- lzma_next_end(&thr->block_encoder, thr->allocator);
413
- lzma_free(thr->in, thr->allocator);
414
- return MYTHREAD_RET_VALUE;
415
- }
416
-
417
-
418
- /// Make the threads stop but not exit. Optionally wait for them to stop.
419
- static void
420
- threads_stop(lzma_coder *coder, bool wait_for_threads)
421
- {
422
- // Tell the threads to stop.
423
- for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
424
- mythread_sync(coder->threads[i].mutex) {
425
- coder->threads[i].state = THR_STOP;
426
- mythread_cond_signal(&coder->threads[i].cond);
427
- }
428
- }
429
-
430
- if (!wait_for_threads)
431
- return;
432
-
433
- // Wait for the threads to settle in the idle state.
434
- for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
435
- mythread_sync(coder->threads[i].mutex) {
436
- while (coder->threads[i].state != THR_IDLE)
437
- mythread_cond_wait(&coder->threads[i].cond,
438
- &coder->threads[i].mutex);
439
- }
440
- }
441
-
442
- return;
443
- }
444
-
445
-
446
- /// Stop the threads and free the resources associated with them.
447
- /// Wait until the threads have exited.
448
- static void
449
- threads_end(lzma_coder *coder, const lzma_allocator *allocator)
450
- {
451
- for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
452
- mythread_sync(coder->threads[i].mutex) {
453
- coder->threads[i].state = THR_EXIT;
454
- mythread_cond_signal(&coder->threads[i].cond);
455
- }
456
- }
457
-
458
- for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
459
- int ret = mythread_join(coder->threads[i].thread_id);
460
- assert(ret == 0);
461
- (void)ret;
462
- }
463
-
464
- lzma_free(coder->threads, allocator);
465
- return;
466
- }
467
-
468
-
469
- /// Initialize a new worker_thread structure and create a new thread.
470
- static lzma_ret
471
- initialize_new_thread(lzma_coder *coder, const lzma_allocator *allocator)
472
- {
473
- worker_thread *thr = &coder->threads[coder->threads_initialized];
474
-
475
- thr->in = lzma_alloc(coder->block_size, allocator);
476
- if (thr->in == NULL)
477
- return LZMA_MEM_ERROR;
478
-
479
- if (mythread_mutex_init(&thr->mutex))
480
- goto error_mutex;
481
-
482
- if (mythread_cond_init(&thr->cond))
483
- goto error_cond;
484
-
485
- thr->state = THR_IDLE;
486
- thr->allocator = allocator;
487
- thr->coder = coder;
488
- thr->progress_in = 0;
489
- thr->progress_out = 0;
490
- thr->block_encoder = LZMA_NEXT_CODER_INIT;
491
-
492
- if (mythread_create(&thr->thread_id, &worker_start, thr))
493
- goto error_thread;
494
-
495
- ++coder->threads_initialized;
496
- coder->thr = thr;
497
-
498
- return LZMA_OK;
499
-
500
- error_thread:
501
- mythread_cond_destroy(&thr->cond);
502
-
503
- error_cond:
504
- mythread_mutex_destroy(&thr->mutex);
505
-
506
- error_mutex:
507
- lzma_free(thr->in, allocator);
508
- return LZMA_MEM_ERROR;
509
- }
510
-
511
-
512
- static lzma_ret
513
- get_thread(lzma_coder *coder, const lzma_allocator *allocator)
514
- {
515
- // If there are no free output subqueues, there is no
516
- // point to try getting a thread.
517
- if (!lzma_outq_has_buf(&coder->outq))
518
- return LZMA_OK;
519
-
520
- // If there is a free structure on the stack, use it.
521
- mythread_sync(coder->mutex) {
522
- if (coder->threads_free != NULL) {
523
- coder->thr = coder->threads_free;
524
- coder->threads_free = coder->threads_free->next;
525
- }
526
- }
527
-
528
- if (coder->thr == NULL) {
529
- // If there are no uninitialized structures left, return.
530
- if (coder->threads_initialized == coder->threads_max)
531
- return LZMA_OK;
532
-
533
- // Initialize a new thread.
534
- return_if_error(initialize_new_thread(coder, allocator));
535
- }
536
-
537
- // Reset the parts of the thread state that have to be done
538
- // in the main thread.
539
- mythread_sync(coder->thr->mutex) {
540
- coder->thr->state = THR_RUN;
541
- coder->thr->in_size = 0;
542
- coder->thr->outbuf = lzma_outq_get_buf(&coder->outq);
543
- mythread_cond_signal(&coder->thr->cond);
544
- }
545
-
546
- return LZMA_OK;
547
- }
548
-
549
-
550
- static lzma_ret
551
- stream_encode_in(lzma_coder *coder, const lzma_allocator *allocator,
552
- const uint8_t *restrict in, size_t *restrict in_pos,
553
- size_t in_size, lzma_action action)
554
- {
555
- while (*in_pos < in_size
556
- || (coder->thr != NULL && action != LZMA_RUN)) {
557
- if (coder->thr == NULL) {
558
- // Get a new thread.
559
- const lzma_ret ret = get_thread(coder, allocator);
560
- if (coder->thr == NULL)
561
- return ret;
562
- }
563
-
564
- // Copy the input data to thread's buffer.
565
- size_t thr_in_size = coder->thr->in_size;
566
- lzma_bufcpy(in, in_pos, in_size, coder->thr->in,
567
- &thr_in_size, coder->block_size);
568
-
569
- // Tell the Block encoder to finish if
570
- // - it has got block_size bytes of input; or
571
- // - all input was used and LZMA_FINISH, LZMA_FULL_FLUSH,
572
- // or LZMA_FULL_BARRIER was used.
573
- //
574
- // TODO: LZMA_SYNC_FLUSH and LZMA_SYNC_BARRIER.
575
- const bool finish = thr_in_size == coder->block_size
576
- || (*in_pos == in_size && action != LZMA_RUN);
577
-
578
- bool block_error = false;
579
-
580
- mythread_sync(coder->thr->mutex) {
581
- if (coder->thr->state == THR_IDLE) {
582
- // Something has gone wrong with the Block
583
- // encoder. It has set coder->thread_error
584
- // which we will read a few lines later.
585
- block_error = true;
586
- } else {
587
- // Tell the Block encoder its new amount
588
- // of input and update the state if needed.
589
- coder->thr->in_size = thr_in_size;
590
-
591
- if (finish)
592
- coder->thr->state = THR_FINISH;
593
-
594
- mythread_cond_signal(&coder->thr->cond);
595
- }
596
- }
597
-
598
- if (block_error) {
599
- lzma_ret ret;
600
-
601
- mythread_sync(coder->mutex) {
602
- ret = coder->thread_error;
603
- }
604
-
605
- return ret;
606
- }
607
-
608
- if (finish)
609
- coder->thr = NULL;
610
- }
611
-
612
- return LZMA_OK;
613
- }
614
-
615
-
616
- /// Wait until more input can be consumed, more output can be read, or
617
- /// an optional timeout is reached.
618
- static bool
619
- wait_for_work(lzma_coder *coder, mythread_condtime *wait_abs,
620
- bool *has_blocked, bool has_input)
621
- {
622
- if (coder->timeout != 0 && !*has_blocked) {
623
- // Every time when stream_encode_mt() is called via
624
- // lzma_code(), *has_blocked starts as false. We set it
625
- // to true here and calculate the absolute time when
626
- // we must return if there's nothing to do.
627
- //
628
- // The idea of *has_blocked is to avoid unneeded calls
629
- // to mythread_condtime_set(), which may do a syscall
630
- // depending on the operating system.
631
- *has_blocked = true;
632
- mythread_condtime_set(wait_abs, &coder->cond, coder->timeout);
633
- }
634
-
635
- bool timed_out = false;
636
-
637
- mythread_sync(coder->mutex) {
638
- // There are four things that we wait. If one of them
639
- // becomes possible, we return.
640
- // - If there is input left, we need to get a free
641
- // worker thread and an output buffer for it.
642
- // - Data ready to be read from the output queue.
643
- // - A worker thread indicates an error.
644
- // - Time out occurs.
645
- while ((!has_input || coder->threads_free == NULL
646
- || !lzma_outq_has_buf(&coder->outq))
647
- && !lzma_outq_is_readable(&coder->outq)
648
- && coder->thread_error == LZMA_OK
649
- && !timed_out) {
650
- if (coder->timeout != 0)
651
- timed_out = mythread_cond_timedwait(
652
- &coder->cond, &coder->mutex,
653
- wait_abs) != 0;
654
- else
655
- mythread_cond_wait(&coder->cond,
656
- &coder->mutex);
657
- }
658
- }
659
-
660
- return timed_out;
661
- }
662
-
663
-
664
- static lzma_ret
665
- stream_encode_mt(lzma_coder *coder, const lzma_allocator *allocator,
666
- const uint8_t *restrict in, size_t *restrict in_pos,
667
- size_t in_size, uint8_t *restrict out,
668
- size_t *restrict out_pos, size_t out_size, lzma_action action)
669
- {
670
- switch (coder->sequence) {
671
- case SEQ_STREAM_HEADER:
672
- lzma_bufcpy(coder->header, &coder->header_pos,
673
- sizeof(coder->header),
674
- out, out_pos, out_size);
675
- if (coder->header_pos < sizeof(coder->header))
676
- return LZMA_OK;
677
-
678
- coder->header_pos = 0;
679
- coder->sequence = SEQ_BLOCK;
680
-
681
- // Fall through
682
-
683
- case SEQ_BLOCK: {
684
- // Initialized to silence warnings.
685
- lzma_vli unpadded_size = 0;
686
- lzma_vli uncompressed_size = 0;
687
- lzma_ret ret = LZMA_OK;
688
-
689
- // These are for wait_for_work().
690
- bool has_blocked = false;
691
- mythread_condtime wait_abs;
692
-
693
- while (true) {
694
- mythread_sync(coder->mutex) {
695
- // Check for Block encoder errors.
696
- ret = coder->thread_error;
697
- if (ret != LZMA_OK) {
698
- assert(ret != LZMA_STREAM_END);
699
- break;
700
- }
701
-
702
- // Try to read compressed data to out[].
703
- ret = lzma_outq_read(&coder->outq,
704
- out, out_pos, out_size,
705
- &unpadded_size,
706
- &uncompressed_size);
707
- }
708
-
709
- if (ret == LZMA_STREAM_END) {
710
- // End of Block. Add it to the Index.
711
- ret = lzma_index_append(coder->index,
712
- allocator, unpadded_size,
713
- uncompressed_size);
714
-
715
- // If we didn't fill the output buffer yet,
716
- // try to read more data. Maybe the next
717
- // outbuf has been finished already too.
718
- if (*out_pos < out_size)
719
- continue;
720
- }
721
-
722
- if (ret != LZMA_OK) {
723
- // coder->thread_error was set or
724
- // lzma_index_append() failed.
725
- threads_stop(coder, false);
726
- return ret;
727
- }
728
-
729
- // Try to give uncompressed data to a worker thread.
730
- ret = stream_encode_in(coder, allocator,
731
- in, in_pos, in_size, action);
732
- if (ret != LZMA_OK) {
733
- threads_stop(coder, false);
734
- return ret;
735
- }
736
-
737
- // See if we should wait or return.
738
- //
739
- // TODO: LZMA_SYNC_FLUSH and LZMA_SYNC_BARRIER.
740
- if (*in_pos == in_size) {
741
- // LZMA_RUN: More data is probably coming
742
- // so return to let the caller fill the
743
- // input buffer.
744
- if (action == LZMA_RUN)
745
- return LZMA_OK;
746
-
747
- // LZMA_FULL_BARRIER: The same as with
748
- // LZMA_RUN but tell the caller that the
749
- // barrier was completed.
750
- if (action == LZMA_FULL_BARRIER)
751
- return LZMA_STREAM_END;
752
-
753
- // Finishing or flushing isn't completed until
754
- // all input data has been encoded and copied
755
- // to the output buffer.
756
- if (lzma_outq_is_empty(&coder->outq)) {
757
- // LZMA_FINISH: Continue to encode
758
- // the Index field.
759
- if (action == LZMA_FINISH)
760
- break;
761
-
762
- // LZMA_FULL_FLUSH: Return to tell
763
- // the caller that flushing was
764
- // completed.
765
- if (action == LZMA_FULL_FLUSH)
766
- return LZMA_STREAM_END;
767
- }
768
- }
769
-
770
- // Return if there is no output space left.
771
- // This check must be done after testing the input
772
- // buffer, because we might want to use a different
773
- // return code.
774
- if (*out_pos == out_size)
775
- return LZMA_OK;
776
-
777
- // Neither in nor out has been used completely.
778
- // Wait until there's something we can do.
779
- if (wait_for_work(coder, &wait_abs, &has_blocked,
780
- *in_pos < in_size))
781
- return LZMA_TIMED_OUT;
782
- }
783
-
784
- // All Blocks have been encoded and the threads have stopped.
785
- // Prepare to encode the Index field.
786
- return_if_error(lzma_index_encoder_init(
787
- &coder->index_encoder, allocator,
788
- coder->index));
789
- coder->sequence = SEQ_INDEX;
790
-
791
- // Update the progress info to take the Index and
792
- // Stream Footer into account. Those are very fast to encode
793
- // so in terms of progress information they can be thought
794
- // to be ready to be copied out.
795
- coder->progress_out += lzma_index_size(coder->index)
796
- + LZMA_STREAM_HEADER_SIZE;
797
- }
798
-
799
- // Fall through
800
-
801
- case SEQ_INDEX: {
802
- // Call the Index encoder. It doesn't take any input, so
803
- // those pointers can be NULL.
804
- const lzma_ret ret = coder->index_encoder.code(
805
- coder->index_encoder.coder, allocator,
806
- NULL, NULL, 0,
807
- out, out_pos, out_size, LZMA_RUN);
808
- if (ret != LZMA_STREAM_END)
809
- return ret;
810
-
811
- // Encode the Stream Footer into coder->buffer.
812
- coder->stream_flags.backward_size
813
- = lzma_index_size(coder->index);
814
- if (lzma_stream_footer_encode(&coder->stream_flags,
815
- coder->header) != LZMA_OK)
816
- return LZMA_PROG_ERROR;
817
-
818
- coder->sequence = SEQ_STREAM_FOOTER;
819
- }
820
-
821
- // Fall through
822
-
823
- case SEQ_STREAM_FOOTER:
824
- lzma_bufcpy(coder->header, &coder->header_pos,
825
- sizeof(coder->header),
826
- out, out_pos, out_size);
827
- return coder->header_pos < sizeof(coder->header)
828
- ? LZMA_OK : LZMA_STREAM_END;
829
- }
830
-
831
- assert(0);
832
- return LZMA_PROG_ERROR;
833
- }
834
-
835
-
836
- static void
837
- stream_encoder_mt_end(lzma_coder *coder, const lzma_allocator *allocator)
838
- {
839
- // Threads must be killed before the output queue can be freed.
840
- threads_end(coder, allocator);
841
- lzma_outq_end(&coder->outq, allocator);
842
-
843
- for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
844
- lzma_free(coder->filters[i].options, allocator);
845
-
846
- lzma_next_end(&coder->index_encoder, allocator);
847
- lzma_index_end(coder->index, allocator);
848
-
849
- mythread_cond_destroy(&coder->cond);
850
- mythread_mutex_destroy(&coder->mutex);
851
-
852
- lzma_free(coder, allocator);
853
- return;
854
- }
855
-
856
-
857
- /// Options handling for lzma_stream_encoder_mt_init() and
858
- /// lzma_stream_encoder_mt_memusage()
859
- static lzma_ret
860
- get_options(const lzma_mt *options, lzma_options_easy *opt_easy,
861
- const lzma_filter **filters, uint64_t *block_size,
862
- uint64_t *outbuf_size_max)
863
- {
864
- // Validate some of the options.
865
- if (options == NULL)
866
- return LZMA_PROG_ERROR;
867
-
868
- if (options->flags != 0 || options->threads == 0
869
- || options->threads > LZMA_THREADS_MAX)
870
- return LZMA_OPTIONS_ERROR;
871
-
872
- if (options->filters != NULL) {
873
- // Filter chain was given, use it as is.
874
- *filters = options->filters;
875
- } else {
876
- // Use a preset.
877
- if (lzma_easy_preset(opt_easy, options->preset))
878
- return LZMA_OPTIONS_ERROR;
879
-
880
- *filters = opt_easy->filters;
881
- }
882
-
883
- // Block size
884
- if (options->block_size > 0) {
885
- if (options->block_size > BLOCK_SIZE_MAX)
886
- return LZMA_OPTIONS_ERROR;
887
-
888
- *block_size = options->block_size;
889
- } else {
890
- // Determine the Block size from the filter chain.
891
- *block_size = lzma_mt_block_size(*filters);
892
- if (*block_size == 0)
893
- return LZMA_OPTIONS_ERROR;
894
-
895
- assert(*block_size <= BLOCK_SIZE_MAX);
896
- }
897
-
898
- // Calculate the maximum amount output that a single output buffer
899
- // may need to hold. This is the same as the maximum total size of
900
- // a Block.
901
- *outbuf_size_max = lzma_block_buffer_bound64(*block_size);
902
- if (*outbuf_size_max == 0)
903
- return LZMA_MEM_ERROR;
904
-
905
- return LZMA_OK;
906
- }
907
-
908
-
909
- static void
910
- get_progress(lzma_coder *coder, uint64_t *progress_in, uint64_t *progress_out)
911
- {
912
- // Lock coder->mutex to prevent finishing threads from moving their
913
- // progress info from the worker_thread structure to lzma_coder.
914
- mythread_sync(coder->mutex) {
915
- *progress_in = coder->progress_in;
916
- *progress_out = coder->progress_out;
917
-
918
- for (size_t i = 0; i < coder->threads_initialized; ++i) {
919
- mythread_sync(coder->threads[i].mutex) {
920
- *progress_in += coder->threads[i].progress_in;
921
- *progress_out += coder->threads[i]
922
- .progress_out;
923
- }
924
- }
925
- }
926
-
927
- return;
928
- }
929
-
930
-
931
- static lzma_ret
932
- stream_encoder_mt_init(lzma_next_coder *next, const lzma_allocator *allocator,
933
- const lzma_mt *options)
934
- {
935
- lzma_next_coder_init(&stream_encoder_mt_init, next, allocator);
936
-
937
- // Get the filter chain.
938
- lzma_options_easy easy;
939
- const lzma_filter *filters;
940
- uint64_t block_size;
941
- uint64_t outbuf_size_max;
942
- return_if_error(get_options(options, &easy, &filters,
943
- &block_size, &outbuf_size_max));
944
-
945
- #if SIZE_MAX < UINT64_MAX
946
- if (block_size > SIZE_MAX)
947
- return LZMA_MEM_ERROR;
948
- #endif
949
-
950
- // Validate the filter chain so that we can give an error in this
951
- // function instead of delaying it to the first call to lzma_code().
952
- // The memory usage calculation verifies the filter chain as
953
- // a side effect so we take advatange of that.
954
- if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
955
- return LZMA_OPTIONS_ERROR;
956
-
957
- // Validate the Check ID.
958
- if ((unsigned int)(options->check) > LZMA_CHECK_ID_MAX)
959
- return LZMA_PROG_ERROR;
960
-
961
- if (!lzma_check_is_supported(options->check))
962
- return LZMA_UNSUPPORTED_CHECK;
963
-
964
- // Allocate and initialize the base structure if needed.
965
- if (next->coder == NULL) {
966
- next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
967
- if (next->coder == NULL)
968
- return LZMA_MEM_ERROR;
969
-
970
- // For the mutex and condition variable initializations
971
- // the error handling has to be done here because
972
- // stream_encoder_mt_end() doesn't know if they have
973
- // already been initialized or not.
974
- if (mythread_mutex_init(&next->coder->mutex)) {
975
- lzma_free(next->coder, allocator);
976
- next->coder = NULL;
977
- return LZMA_MEM_ERROR;
978
- }
979
-
980
- if (mythread_cond_init(&next->coder->cond)) {
981
- mythread_mutex_destroy(&next->coder->mutex);
982
- lzma_free(next->coder, allocator);
983
- next->coder = NULL;
984
- return LZMA_MEM_ERROR;
985
- }
986
-
987
- next->code = &stream_encode_mt;
988
- next->end = &stream_encoder_mt_end;
989
- next->get_progress = &get_progress;
990
- // next->update = &stream_encoder_mt_update;
991
-
992
- next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
993
- next->coder->index_encoder = LZMA_NEXT_CODER_INIT;
994
- next->coder->index = NULL;
995
- memzero(&next->coder->outq, sizeof(next->coder->outq));
996
- next->coder->threads = NULL;
997
- next->coder->threads_max = 0;
998
- next->coder->threads_initialized = 0;
999
- }
1000
-
1001
- // Basic initializations
1002
- next->coder->sequence = SEQ_STREAM_HEADER;
1003
- next->coder->block_size = (size_t)(block_size);
1004
- next->coder->thread_error = LZMA_OK;
1005
- next->coder->thr = NULL;
1006
-
1007
- // Allocate the thread-specific base structures.
1008
- assert(options->threads > 0);
1009
- if (next->coder->threads_max != options->threads) {
1010
- threads_end(next->coder, allocator);
1011
-
1012
- next->coder->threads = NULL;
1013
- next->coder->threads_max = 0;
1014
-
1015
- next->coder->threads_initialized = 0;
1016
- next->coder->threads_free = NULL;
1017
-
1018
- next->coder->threads = lzma_alloc(
1019
- options->threads * sizeof(worker_thread),
1020
- allocator);
1021
- if (next->coder->threads == NULL)
1022
- return LZMA_MEM_ERROR;
1023
-
1024
- next->coder->threads_max = options->threads;
1025
- } else {
1026
- // Reuse the old structures and threads. Tell the running
1027
- // threads to stop and wait until they have stopped.
1028
- threads_stop(next->coder, true);
1029
- }
1030
-
1031
- // Output queue
1032
- return_if_error(lzma_outq_init(&next->coder->outq, allocator,
1033
- outbuf_size_max, options->threads));
1034
-
1035
- // Timeout
1036
- next->coder->timeout = options->timeout;
1037
-
1038
- // Free the old filter chain and copy the new one.
1039
- for (size_t i = 0; next->coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
1040
- lzma_free(next->coder->filters[i].options, allocator);
1041
-
1042
- return_if_error(lzma_filters_copy(
1043
- filters, next->coder->filters, allocator));
1044
-
1045
- // Index
1046
- lzma_index_end(next->coder->index, allocator);
1047
- next->coder->index = lzma_index_init(allocator);
1048
- if (next->coder->index == NULL)
1049
- return LZMA_MEM_ERROR;
1050
-
1051
- // Stream Header
1052
- next->coder->stream_flags.version = 0;
1053
- next->coder->stream_flags.check = options->check;
1054
- return_if_error(lzma_stream_header_encode(
1055
- &next->coder->stream_flags, next->coder->header));
1056
-
1057
- next->coder->header_pos = 0;
1058
-
1059
- // Progress info
1060
- next->coder->progress_in = 0;
1061
- next->coder->progress_out = LZMA_STREAM_HEADER_SIZE;
1062
-
1063
- return LZMA_OK;
1064
- }
1065
-
1066
-
1067
- extern LZMA_API(lzma_ret)
1068
- lzma_stream_encoder_mt(lzma_stream *strm, const lzma_mt *options)
1069
- {
1070
- lzma_next_strm_init(stream_encoder_mt_init, strm, options);
1071
-
1072
- strm->internal->supported_actions[LZMA_RUN] = true;
1073
- // strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
1074
- strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
1075
- strm->internal->supported_actions[LZMA_FULL_BARRIER] = true;
1076
- strm->internal->supported_actions[LZMA_FINISH] = true;
1077
-
1078
- return LZMA_OK;
1079
- }
1080
-
1081
-
1082
- // This function name is a monster but it's consistent with the older
1083
- // monster names. :-( 31 chars is the max that C99 requires so in that
1084
- // sense it's not too long. ;-)
1085
- extern LZMA_API(uint64_t)
1086
- lzma_stream_encoder_mt_memusage(const lzma_mt *options)
1087
- {
1088
- lzma_options_easy easy;
1089
- const lzma_filter *filters;
1090
- uint64_t block_size;
1091
- uint64_t outbuf_size_max;
1092
-
1093
- if (get_options(options, &easy, &filters, &block_size,
1094
- &outbuf_size_max) != LZMA_OK)
1095
- return UINT64_MAX;
1096
-
1097
- // Memory usage of the input buffers
1098
- const uint64_t inbuf_memusage = options->threads * block_size;
1099
-
1100
- // Memory usage of the filter encoders
1101
- uint64_t filters_memusage = lzma_raw_encoder_memusage(filters);
1102
- if (filters_memusage == UINT64_MAX)
1103
- return UINT64_MAX;
1104
-
1105
- filters_memusage *= options->threads;
1106
-
1107
- // Memory usage of the output queue
1108
- const uint64_t outq_memusage = lzma_outq_memusage(
1109
- outbuf_size_max, options->threads);
1110
- if (outq_memusage == UINT64_MAX)
1111
- return UINT64_MAX;
1112
-
1113
- // Sum them with overflow checking.
1114
- uint64_t total_memusage = LZMA_MEMUSAGE_BASE + sizeof(lzma_coder)
1115
- + options->threads * sizeof(worker_thread);
1116
-
1117
- if (UINT64_MAX - total_memusage < inbuf_memusage)
1118
- return UINT64_MAX;
1119
-
1120
- total_memusage += inbuf_memusage;
1121
-
1122
- if (UINT64_MAX - total_memusage < filters_memusage)
1123
- return UINT64_MAX;
1124
-
1125
- total_memusage += filters_memusage;
1126
-
1127
- if (UINT64_MAX - total_memusage < outq_memusage)
1128
- return UINT64_MAX;
1129
-
1130
- return total_memusage + outq_memusage;
1131
- }