react-native-update 10.34.3 → 10.34.5

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 (805) hide show
  1. package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +34 -172
  2. package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +4 -4
  3. package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +63 -379
  4. package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +170 -415
  5. package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +10 -54
  6. package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +1 -13
  7. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +18 -171
  8. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +4 -5
  9. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +7 -38
  10. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +4 -15
  11. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +12 -22
  12. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +4 -22
  13. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +8 -0
  14. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffZ.cbp +219 -0
  15. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HPatchZ.cbp +156 -0
  16. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/unitTest.cbp +65 -0
  17. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +105 -155
  18. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +236 -363
  19. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj.user +3 -0
  20. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +317 -347
  21. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj.user +3 -0
  22. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +181 -295
  23. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj.user +3 -0
  24. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +0 -9
  25. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +14 -53
  26. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +32 -162
  27. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +22 -89
  28. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +13 -237
  29. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +2 -2
  30. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +14 -194
  31. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +10 -30
  32. package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +3 -458
  33. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +71 -106
  34. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +3 -3
  35. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +110 -484
  36. package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +193 -835
  37. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +50 -99
  38. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +4 -18
  39. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +8 -147
  40. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +6 -18
  41. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +25 -7
  42. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +113 -5
  43. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +97 -163
  44. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +39 -49
  45. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +15 -15
  46. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +2 -18
  47. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +4 -8
  48. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +57 -72
  49. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +13 -18
  50. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +1 -1
  51. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +2 -2
  52. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +2 -2
  53. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +2 -2
  54. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +2 -2
  55. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +1 -1
  56. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +100 -311
  57. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +72 -53
  58. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +487 -888
  59. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +28 -45
  60. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +247 -812
  61. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +544 -1265
  62. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +38 -123
  63. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +0 -115
  64. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +102 -272
  65. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +12 -22
  66. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +4 -18
  67. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +5 -7
  68. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/{divsufsort.cpp → divsufsort.c} +8 -5
  69. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +164 -91
  70. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +102 -5
  71. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.c +13 -0
  72. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +97 -1
  73. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +44 -23
  74. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +89 -54
  75. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +55 -48
  76. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/utils.c.inc.h +381 -0
  77. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +47 -110
  78. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +4 -11
  79. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +26 -53
  80. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +25 -103
  81. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +130 -271
  82. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +7 -17
  83. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +37 -628
  84. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +43 -203
  85. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +10 -14
  86. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +7 -22
  87. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +46 -132
  88. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +9 -48
  89. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +299 -650
  90. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +82 -120
  91. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +7 -87
  92. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +9 -119
  93. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +6 -2
  94. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +15 -192
  95. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.cpp +367 -0
  96. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +56 -31
  97. package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +1 -1
  98. package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +1 -0
  99. package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +31 -225
  100. package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +94 -566
  101. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +28 -222
  102. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +117 -228
  103. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +173 -678
  104. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +22 -103
  105. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +167 -485
  106. package/harmony/pushy/src/main/cpp/lzma/C/7z.h +6 -8
  107. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +30 -39
  108. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +3 -3
  109. package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +217 -232
  110. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +3 -3
  111. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +68 -404
  112. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +6 -9
  113. package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +79 -163
  114. package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +78 -160
  115. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +58 -215
  116. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +6 -15
  117. package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +23 -46
  118. package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +89 -311
  119. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +5 -5
  120. package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +68 -191
  121. package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +8 -30
  122. package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +108 -926
  123. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +96 -246
  124. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +8 -33
  125. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +144 -177
  126. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +42 -228
  127. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +182 -377
  128. package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +143 -622
  129. package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +40 -81
  130. package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +58 -163
  131. package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +48 -9
  132. package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +15 -228
  133. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +133 -885
  134. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +78 -428
  135. package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +31 -136
  136. package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +3 -3
  137. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +62 -53
  138. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +5 -5
  139. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +495 -1114
  140. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +25 -64
  141. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +400 -969
  142. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +24 -37
  143. package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +48 -25
  144. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +7 -12
  145. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +7 -8
  146. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +83 -96
  147. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +9 -11
  148. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +92 -96
  149. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +9 -12
  150. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +3 -3
  151. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +4 -3
  152. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +6 -3
  153. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +206 -384
  154. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +8 -11
  155. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +315 -489
  156. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +9 -18
  157. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +3 -5
  158. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +14 -21
  159. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +87 -90
  160. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +25 -28
  161. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +88 -74
  162. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +20 -21
  163. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +34 -118
  164. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +293 -712
  165. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +70 -109
  166. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +116 -237
  167. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +95 -245
  168. package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +5 -122
  169. package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +4 -24
  170. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +143 -387
  171. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +7 -67
  172. package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +114 -241
  173. package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +7 -4
  174. package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +14 -731
  175. package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +14 -204
  176. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.c +396 -0
  177. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.h +31 -0
  178. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +2 -10
  179. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +79 -282
  180. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +7 -10
  181. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +3 -7
  182. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +75 -32
  183. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +56 -111
  184. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +0 -24
  185. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +0 -2
  186. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +41 -18
  187. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +2 -30
  188. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +6 -7
  189. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +2 -27
  190. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +7 -10
  191. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +22 -39
  192. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +2 -9
  193. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +1 -3
  194. package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +3 -5
  195. package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +47 -129
  196. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +43 -97
  197. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +8 -8
  198. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +36 -228
  199. package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +295 -405
  200. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +139 -194
  201. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +11 -15
  202. package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +134 -200
  203. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +6 -6
  204. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +1 -4
  205. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +13 -29
  206. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +90 -120
  207. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +6 -9
  208. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +140 -183
  209. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +20 -23
  210. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +57 -78
  211. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +44 -169
  212. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +17 -57
  213. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +109 -141
  214. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +57 -54
  215. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +116 -336
  216. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +1 -1
  217. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +9 -17
  218. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +136 -234
  219. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +26 -35
  220. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +5 -10
  221. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +155 -280
  222. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +40 -51
  223. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +59 -67
  224. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +2 -6
  225. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +2 -8
  226. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +3 -12
  227. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +9 -23
  228. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +387 -975
  229. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +16 -44
  230. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +2 -5
  231. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +0 -2
  232. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +0 -2
  233. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +8 -15
  234. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +87 -106
  235. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +57 -57
  236. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +1 -1
  237. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +8 -6
  238. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +43 -126
  239. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +18 -77
  240. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +9 -20
  241. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +23 -20
  242. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +9 -61
  243. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +3 -8
  244. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +27 -29
  245. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +26 -23
  246. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +2 -2
  247. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +8 -6
  248. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +2 -2
  249. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +2 -5
  250. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +10 -63
  251. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +173 -319
  252. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +113 -92
  253. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +53 -47
  254. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +2 -5
  255. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +208 -352
  256. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +2 -2
  257. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +3 -6
  258. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +47 -227
  259. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +2 -5
  260. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +5 -19
  261. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +2 -5
  262. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +2 -4
  263. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +2 -5
  264. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +1 -6
  265. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +53 -71
  266. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +22 -85
  267. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +2 -5
  268. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +4 -13
  269. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +166 -102
  270. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +4 -109
  271. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +30 -69
  272. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +2 -5
  273. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +7 -10
  274. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +1 -5
  275. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +16 -16
  276. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +12 -9
  277. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +9 -7
  278. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +2 -2
  279. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +5 -74
  280. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +51 -58
  281. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +10 -3
  282. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +5 -9
  283. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +6 -92
  284. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +19 -46
  285. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +11 -3
  286. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +5 -11
  287. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +0 -5
  288. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +28 -136
  289. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +5 -67
  290. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +62 -74
  291. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +24 -32
  292. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +7 -7
  293. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +2 -2
  294. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +100 -548
  295. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +86 -125
  296. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +116 -258
  297. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +76 -72
  298. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +15 -34
  299. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +9 -38
  300. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +82 -192
  301. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +28 -25
  302. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +52 -78
  303. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +83 -52
  304. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +2 -2
  305. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +2 -2
  306. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +67 -323
  307. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +38 -123
  308. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +8 -6
  309. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +13 -9
  310. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +12 -12
  311. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +7 -74
  312. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +5 -5
  313. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +13 -11
  314. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +1 -10
  315. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +14 -16
  316. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +16 -16
  317. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +2 -5
  318. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +50 -45
  319. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +21 -39
  320. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +42 -47
  321. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +53 -42
  322. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +4 -49
  323. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +2 -20
  324. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +4 -4
  325. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +5 -20
  326. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +9 -8
  327. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +5 -5
  328. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +355 -556
  329. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +59 -66
  330. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +2 -2
  331. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +6 -6
  332. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +13 -19
  333. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +2 -2
  334. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +5 -88
  335. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +18 -42
  336. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +16 -33
  337. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +53 -52
  338. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +30 -64
  339. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +22 -55
  340. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +26 -11
  341. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +28 -26
  342. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +28 -30
  343. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +54 -45
  344. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +12 -24
  345. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +22 -10
  346. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +1 -1
  347. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +26 -33
  348. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +51 -51
  349. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +40 -232
  350. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +14 -13
  351. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +1 -1
  352. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +35 -84
  353. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +41 -42
  354. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +25 -66
  355. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +17 -8
  356. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +1 -1
  357. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +2 -5
  358. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +12 -13
  359. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +32 -26
  360. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +16 -14
  361. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +20 -9
  362. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +1 -1
  363. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +1 -1
  364. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +32 -67
  365. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +18 -30
  366. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +3 -3
  367. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +43 -208
  368. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +25 -90
  369. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +4 -17
  370. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +21 -29
  371. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +3 -4
  372. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +2 -5
  373. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +3 -38
  374. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +3 -26
  375. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +172 -253
  376. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +7 -55
  377. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +12 -43
  378. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +9 -10
  379. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +50 -133
  380. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +2 -4
  381. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +1 -1
  382. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +2 -53
  383. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +177 -329
  384. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +1 -97
  385. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +2 -5
  386. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +1 -2
  387. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +183 -687
  388. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +15 -49
  389. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +913 -2275
  390. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +115 -353
  391. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +106 -127
  392. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +3 -9
  393. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +35 -272
  394. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +64 -134
  395. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +1200 -2608
  396. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +20 -64
  397. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +1 -1
  398. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +2 -2
  399. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +36 -253
  400. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +233 -774
  401. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +6 -2
  402. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +2 -2
  403. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +63 -156
  404. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +10 -23
  405. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +2 -12
  406. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +6 -22
  407. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +4 -4
  408. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +65 -1991
  409. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +29 -241
  410. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +47 -45
  411. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +179 -442
  412. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +89 -147
  413. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +380 -529
  414. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +42 -75
  415. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +86 -163
  416. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +5 -5
  417. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +2 -2
  418. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +15 -23
  419. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +2 -2
  420. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +2 -2
  421. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +2 -5
  422. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +1 -2
  423. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +2 -5
  424. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +368 -595
  425. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +47 -68
  426. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +2 -2
  427. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +146 -444
  428. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +68 -103
  429. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +42 -111
  430. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +2 -2
  431. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +3 -7
  432. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +6 -11
  433. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +35 -25
  434. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +4 -8
  435. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +9 -91
  436. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +4 -4
  437. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +2 -2
  438. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +1 -4
  439. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +0 -3
  440. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +19 -48
  441. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +12 -18
  442. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +41 -162
  443. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +41 -88
  444. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +81 -140
  445. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +17 -27
  446. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +124 -182
  447. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +7 -22
  448. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +109 -590
  449. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +2 -62
  450. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +3 -3
  451. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +10 -17
  452. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +10 -13
  453. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +9 -13
  454. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +2 -5
  455. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +24 -320
  456. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +26 -50
  457. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +5 -13
  458. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +2 -2
  459. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +2 -6
  460. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +6 -12
  461. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +4 -4
  462. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +195 -302
  463. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +4 -15
  464. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +2 -2
  465. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +6 -6
  466. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +2 -2
  467. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +181 -416
  468. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +197 -216
  469. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +2 -2
  470. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +5 -13
  471. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +5 -48
  472. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +49 -215
  473. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +30 -50
  474. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +1 -3
  475. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +3 -5
  476. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +5 -5
  477. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +6 -6
  478. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +0 -4
  479. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +10 -15
  480. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +17 -18
  481. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +130 -276
  482. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +52 -56
  483. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +1 -2
  484. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +3 -8
  485. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +2 -2
  486. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +0 -9
  487. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +89 -185
  488. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +20 -23
  489. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +1 -23
  490. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +0 -10
  491. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +4 -4
  492. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +33 -36
  493. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +15 -15
  494. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +22 -39
  495. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +3 -4
  496. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +2 -2
  497. package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +13 -109
  498. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +14 -25
  499. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +1 -1
  500. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +90 -1
  501. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +49 -2
  502. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +2 -2
  503. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +7 -41
  504. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +3 -3
  505. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +29 -14
  506. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +45 -24
  507. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +2 -3
  508. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +5 -17
  509. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +110 -132
  510. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +9 -35
  511. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +5 -12
  512. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +31 -49
  513. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +4 -4
  514. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +21 -59
  515. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +10 -95
  516. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +81 -497
  517. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +2 -2
  518. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +9 -18
  519. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +5 -17
  520. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +2 -35
  521. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +164 -347
  522. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +35 -246
  523. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +8 -11
  524. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +11 -2
  525. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +94 -184
  526. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +11 -158
  527. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +54 -148
  528. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +27 -204
  529. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +5 -38
  530. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +16 -43
  531. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +2 -2
  532. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +11 -20
  533. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +5 -13
  534. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +39 -124
  535. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +11 -27
  536. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +15 -458
  537. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +2 -24
  538. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +89 -99
  539. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +2 -19
  540. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +11 -10
  541. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +2 -2
  542. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +102 -677
  543. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +5 -377
  544. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +84 -197
  545. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +25 -107
  546. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +14 -11
  547. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +8 -24
  548. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +113 -197
  549. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +12 -32
  550. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +4 -4
  551. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +10 -22
  552. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +6 -6
  553. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +47 -242
  554. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +51 -94
  555. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +2 -2
  556. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +4 -4
  557. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +26 -33
  558. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +22 -32
  559. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +13 -13
  560. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +34 -56
  561. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +9 -9
  562. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +3 -3
  563. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +2 -2
  564. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +5 -5
  565. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +2 -5
  566. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +3 -3
  567. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +2 -2
  568. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +6 -8
  569. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +7 -9
  570. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +8 -77
  571. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +10 -55
  572. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +4 -4
  573. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +2 -69
  574. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +2 -3
  575. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +80 -728
  576. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +7 -62
  577. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +56 -756
  578. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +19 -205
  579. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +47 -569
  580. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +28 -283
  581. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +112 -369
  582. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +3 -3
  583. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +113 -185
  584. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +14 -41
  585. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +10 -66
  586. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +2 -6
  587. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +4 -6
  588. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +14 -29
  589. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +2 -2
  590. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +2 -14
  591. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +56 -102
  592. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +9 -68
  593. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +14 -150
  594. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +3 -13
  595. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +128 -212
  596. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +20 -32
  597. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +4 -4
  598. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +2 -3
  599. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +18 -23
  600. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +56 -39
  601. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +58 -539
  602. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +14 -49
  603. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +2 -5
  604. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +0 -77
  605. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +18 -240
  606. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +38 -317
  607. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +5 -154
  608. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +10 -18
  609. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +37 -291
  610. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +10 -124
  611. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +7 -7
  612. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +19 -98
  613. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj +90 -0
  614. package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +2 -6
  615. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +0 -205
  616. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +13 -93
  617. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +13 -30
  618. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2.sfx +0 -0
  619. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2con.sfx +0 -0
  620. package/harmony/pushy/src/main/cpp/lzma/bin/7zSD.sfx +0 -0
  621. package/harmony/pushy/src/main/cpp/lzma/bin/7zdec.exe +0 -0
  622. package/harmony/pushy/src/main/cpp/lzma/bin/7zr.exe +0 -0
  623. package/harmony/pushy/src/main/cpp/lzma/bin/lzma.exe +0 -0
  624. package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
  625. package/package.json +1 -1
  626. package/react-native-update.podspec +0 -1
  627. package/react-native.config.js +1 -0
  628. package/src/client.ts +1 -2
  629. package/src/type.ts +1 -0
  630. package/harmony/pushy/src/main/cpp/HDiffPatch/README_cn.md +0 -547
  631. package/harmony/pushy/src/main/cpp/HDiffPatch/_hextobytes.h +0 -112
  632. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +0 -389
  633. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +0 -73
  634. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +0 -266
  635. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +0 -58
  636. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +0 -1
  637. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +0 -1
  638. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/bzip2.vcxproj +0 -228
  639. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/hpatchz_test.vcxproj +0 -215
  640. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/libdeflate.vcxproj +0 -256
  641. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/longPathAware.exe.manifest +0 -7
  642. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/lzma.vcxproj +0 -271
  643. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/testHashClash.vcxproj +0 -228
  644. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zlib.vcxproj +0 -242
  645. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zstd.vcxproj +0 -287
  646. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
  647. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +0 -286
  648. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +0 -308
  649. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +0 -33
  650. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +0 -33
  651. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +0 -774
  652. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.c +0 -31
  653. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.h +0 -42
  654. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +0 -74
  655. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +0 -478
  656. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.h +0 -222
  657. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +0 -14
  658. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.cpp +0 -168
  659. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.h +0 -44
  660. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +0 -125
  661. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.c +0 -243
  662. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.h +0 -51
  663. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.c +0 -153
  664. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.h +0 -54
  665. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.c +0 -158
  666. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.h +0 -49
  667. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.c +0 -294
  668. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.h +0 -59
  669. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_patch_private_mt.h +0 -217
  670. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.c +0 -349
  671. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.h +0 -110
  672. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +0 -366
  673. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +0 -91
  674. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +0 -31
  675. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +0 -106
  676. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.c +0 -497
  677. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.h +0 -106
  678. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.cpp +0 -254
  679. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.h +0 -39
  680. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_sign_diff_type.h +0 -37
  681. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.cpp +0 -62
  682. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.h +0 -44
  683. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +0 -156
  684. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +0 -440
  685. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.h +0 -88
  686. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.cpp +0 -332
  687. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.h +0 -48
  688. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_types.h +0 -198
  689. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.cpp +0 -697
  690. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.h +0 -74
  691. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_private.h +0 -262
  692. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type.h +0 -174
  693. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +0 -174
  694. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +0 -252
  695. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.h +0 -67
  696. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +0 -680
  697. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.h +0 -137
  698. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +0 -83
  699. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +0 -125
  700. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.h +0 -56
  701. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +0 -55
  702. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.cpp +0 -147
  703. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.h +0 -38
  704. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +0 -354
  705. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.h +0 -76
  706. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.cpp +0 -521
  707. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.h +0 -69
  708. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +0 -122
  709. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_private.h +0 -66
  710. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type.h +0 -36
  711. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type_private.h +0 -81
  712. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.cpp +0 -247
  713. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.h +0 -71
  714. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.cpp +0 -351
  715. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.h +0 -42
  716. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.cpp +0 -124
  717. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.h +0 -38
  718. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.cpp +0 -203
  719. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.h +0 -55
  720. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.cpp +0 -79
  721. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.h +0 -66
  722. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +0 -628
  723. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +0 -95
  724. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +0 -78
  725. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +0 -950
  726. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +0 -72
  727. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/7zAsm.S +0 -181
  728. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/LzmaDecOpt.S +0 -1487
  729. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzFindOpt.asm +0 -540
  730. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sha256Opt.asm +0 -275
  731. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sort.asm +0 -860
  732. package/harmony/pushy/src/main/cpp/lzma/C/7zWindows.h +0 -101
  733. package/harmony/pushy/src/main/cpp/lzma/C/7zip_gcc_c.mak +0 -360
  734. package/harmony/pushy/src/main/cpp/lzma/C/Asm_c.mak +0 -12
  735. package/harmony/pushy/src/main/cpp/lzma/C/LzFindOpt.c +0 -578
  736. package/harmony/pushy/src/main/cpp/lzma/C/Sha256Opt.c +0 -451
  737. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.c +0 -835
  738. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.h +0 -17
  739. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/Precomp.h +0 -13
  740. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.c +0 -4
  741. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.h +0 -13
  742. package/harmony/pushy/src/main/cpp/lzma/C/var_clang.mak +0 -11
  743. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_arm64.mak +0 -12
  744. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x64.mak +0 -11
  745. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x86.mak +0 -11
  746. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc.mak +0 -12
  747. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_arm64.mak +0 -12
  748. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x64.mak +0 -10
  749. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x86.mak +0 -10
  750. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_arm64.mak +0 -11
  751. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_x64.mak +0 -11
  752. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang.mak +0 -1
  753. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang_mac.mak +0 -1
  754. package/harmony/pushy/src/main/cpp/lzma/C/warn_gcc.mak +0 -51
  755. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip_gcc.mak +0 -1370
  756. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +0 -279
  757. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +0 -215
  758. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.cpp +0 -855
  759. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.h +0 -160
  760. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzFindOpt.mak +0 -7
  761. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec_gcc.mak +0 -14
  762. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sha256.mak +0 -13
  763. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sort.mak +0 -6
  764. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile.gcc +0 -72
  765. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile.gcc +0 -187
  766. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +0 -218
  767. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.h +0 -48
  768. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +0 -13
  769. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/StdAfx.h +0 -67
  770. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +0 -23
  771. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang.mak +0 -3
  772. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_arm64.mak +0 -3
  773. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x64.mak +0 -3
  774. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x86.mak +0 -3
  775. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc.mak +0 -3
  776. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_arm64.mak +0 -3
  777. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x64.mak +0 -3
  778. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x86.mak +0 -3
  779. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_arm64.mak +0 -3
  780. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_x64.mak +0 -3
  781. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang.mak +0 -11
  782. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_arm64.mak +0 -19
  783. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x64.mak +0 -11
  784. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x86.mak +0 -11
  785. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc.mak +0 -12
  786. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_arm64.mak +0 -12
  787. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x64.mak +0 -11
  788. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x86.mak +0 -10
  789. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_arm64.mak +0 -13
  790. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_x64.mak +0 -11
  791. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang.mak +0 -3
  792. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang_mac.mak +0 -9
  793. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_gcc.mak +0 -55
  794. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common0.h +0 -330
  795. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.cpp +0 -93
  796. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.h +0 -41
  797. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/LzFindPrepare.cpp +0 -7
  798. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Prepare.cpp +0 -7
  799. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.cpp +0 -130
  800. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.h +0 -28
  801. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.cpp +0 -36
  802. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.h +0 -55
  803. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.cpp +0 -1251
  804. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.h +0 -19
  805. package/ios/ImportReact.h +0 -2
@@ -1,5 +1,5 @@
1
1
  /* LzmaEnc.c -- LZMA Encoder
2
- Igor Pavlov : Public domain */
2
+ 2019-01-10: Igor Pavlov : Public domain */
3
3
 
4
4
  #include "Precomp.h"
5
5
 
@@ -12,36 +12,22 @@ Igor Pavlov : Public domain */
12
12
  #include <stdio.h>
13
13
  #endif
14
14
 
15
- #include "CpuArch.h"
16
15
  #include "LzmaEnc.h"
17
16
 
18
17
  #include "LzFind.h"
19
- #ifndef Z7_ST
18
+ #ifndef _7ZIP_ST
20
19
  #include "LzFindMt.h"
21
20
  #endif
22
21
 
23
- /* the following LzmaEnc_* declarations is internal LZMA interface for LZMA2 encoder */
24
-
25
- SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle p, ISeqInStreamPtr inStream, UInt32 keepWindowSize,
26
- ISzAllocPtr alloc, ISzAllocPtr allocBig);
27
- SRes LzmaEnc_MemPrepare(CLzmaEncHandle p, const Byte *src, SizeT srcLen,
28
- UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig);
29
- SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle p, BoolInt reInit,
30
- Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize);
31
- const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle p);
32
- void LzmaEnc_Finish(CLzmaEncHandle p);
33
- void LzmaEnc_SaveState(CLzmaEncHandle p);
34
- void LzmaEnc_RestoreState(CLzmaEncHandle p);
35
-
36
22
  #ifdef SHOW_STAT
37
23
  static unsigned g_STAT_OFFSET = 0;
38
24
  #endif
39
25
 
40
- /* for good normalization speed we still reserve 256 MB before 4 GB range */
41
- #define kLzmaMaxHistorySize ((UInt32)15 << 28)
26
+ #define kLzmaMaxHistorySize ((UInt32)3 << 29)
27
+ /* #define kLzmaMaxHistorySize ((UInt32)7 << 29) */
42
28
 
43
- // #define kNumTopBits 24
44
- #define kTopValue ((UInt32)1 << 24)
29
+ #define kNumTopBits 24
30
+ #define kTopValue ((UInt32)1 << kNumTopBits)
45
31
 
46
32
  #define kNumBitModelTotalBits 11
47
33
  #define kBitModelTotal (1 << kNumBitModelTotalBits)
@@ -50,7 +36,7 @@ static unsigned g_STAT_OFFSET = 0;
50
36
 
51
37
  #define kNumMoveReducingBits 4
52
38
  #define kNumBitPriceShiftBits 4
53
- // #define kBitPrice (1 << kNumBitPriceShiftBits)
39
+ #define kBitPrice (1 << kNumBitPriceShiftBits)
54
40
 
55
41
  #define REP_LEN_COUNT 64
56
42
 
@@ -60,11 +46,7 @@ void LzmaEncProps_Init(CLzmaEncProps *p)
60
46
  p->dictSize = p->mc = 0;
61
47
  p->reduceSize = (UInt64)(Int64)-1;
62
48
  p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1;
63
- p->numHashOutBits = 0;
64
49
  p->writeEndMark = 0;
65
- p->affinityGroup = -1;
66
- p->affinity = 0;
67
- p->affinityInGroup = 0;
68
50
  }
69
51
 
70
52
  void LzmaEncProps_Normalize(CLzmaEncProps *p)
@@ -73,36 +55,31 @@ void LzmaEncProps_Normalize(CLzmaEncProps *p)
73
55
  if (level < 0) level = 5;
74
56
  p->level = level;
75
57
 
76
- if (p->dictSize == 0)
77
- p->dictSize = (unsigned)level <= 4 ?
78
- (UInt32)1 << (level * 2 + 16) :
79
- (unsigned)level <= sizeof(size_t) / 2 + 4 ?
80
- (UInt32)1 << (level + 20) :
81
- (UInt32)1 << (sizeof(size_t) / 2 + 24);
82
-
58
+ if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level <= 7 ? (1 << 25) : (1 << 26)));
83
59
  if (p->dictSize > p->reduceSize)
84
60
  {
85
- UInt32 v = (UInt32)p->reduceSize;
86
- const UInt32 kReduceMin = ((UInt32)1 << 12);
87
- if (v < kReduceMin)
88
- v = kReduceMin;
89
- if (p->dictSize > v)
90
- p->dictSize = v;
61
+ unsigned i;
62
+ UInt32 reduceSize = (UInt32)p->reduceSize;
63
+ for (i = 11; i <= 30; i++)
64
+ {
65
+ if (reduceSize <= ((UInt32)2 << i)) { p->dictSize = ((UInt32)2 << i); break; }
66
+ if (reduceSize <= ((UInt32)3 << i)) { p->dictSize = ((UInt32)3 << i); break; }
67
+ }
91
68
  }
92
69
 
93
70
  if (p->lc < 0) p->lc = 3;
94
71
  if (p->lp < 0) p->lp = 0;
95
72
  if (p->pb < 0) p->pb = 2;
96
73
 
97
- if (p->algo < 0) p->algo = (unsigned)level < 5 ? 0 : 1;
98
- if (p->fb < 0) p->fb = (unsigned)level < 7 ? 32 : 64;
74
+ if (p->algo < 0) p->algo = (level < 5 ? 0 : 1);
75
+ if (p->fb < 0) p->fb = (level < 7 ? 32 : 64);
99
76
  if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1);
100
- if (p->numHashBytes < 0) p->numHashBytes = (p->btMode ? 4 : 5);
101
- if (p->mc == 0) p->mc = (16 + ((unsigned)p->fb >> 1)) >> (p->btMode ? 0 : 1);
77
+ if (p->numHashBytes < 0) p->numHashBytes = 4;
78
+ if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1);
102
79
 
103
80
  if (p->numThreads < 0)
104
81
  p->numThreads =
105
- #ifndef Z7_ST
82
+ #ifndef _7ZIP_ST
106
83
  ((p->btMode && p->algo) ? 2 : 1);
107
84
  #else
108
85
  1;
@@ -116,97 +93,30 @@ UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
116
93
  return props.dictSize;
117
94
  }
118
95
 
119
-
120
- /*
121
- x86/x64:
122
-
123
- BSR:
124
- IF (SRC == 0) ZF = 1, DEST is undefined;
125
- AMD : DEST is unchanged;
126
- IF (SRC != 0) ZF = 0; DEST is index of top non-zero bit
127
- BSR is slow in some processors
128
-
129
- LZCNT:
130
- IF (SRC == 0) CF = 1, DEST is size_in_bits_of_register(src) (32 or 64)
131
- IF (SRC != 0) CF = 0, DEST = num_lead_zero_bits
132
- IF (DEST == 0) ZF = 1;
133
-
134
- LZCNT works only in new processors starting from Haswell.
135
- if LZCNT is not supported by processor, then it's executed as BSR.
136
- LZCNT can be faster than BSR, if supported.
137
- */
138
-
139
- // #define LZMA_LOG_BSR
140
-
141
- #if defined(MY_CPU_ARM_OR_ARM64) /* || defined(MY_CPU_X86_OR_AMD64) */
142
-
143
- #if (defined(__clang__) && (__clang_major__ >= 6)) \
144
- || (defined(__GNUC__) && (__GNUC__ >= 6))
145
- #define LZMA_LOG_BSR
146
- #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
147
- // #if defined(MY_CPU_ARM_OR_ARM64)
148
- #define LZMA_LOG_BSR
149
- // #endif
150
- #endif
96
+ #if (_MSC_VER >= 1400)
97
+ /* BSR code is fast for some new CPUs */
98
+ /* #define LZMA_LOG_BSR */
151
99
  #endif
152
100
 
153
- // #include <intrin.h>
154
-
155
101
  #ifdef LZMA_LOG_BSR
156
102
 
157
- #if defined(__clang__) \
158
- || defined(__GNUC__)
159
-
160
- /*
161
- C code: : (30 - __builtin_clz(x))
162
- gcc9/gcc10 for x64 /x86 : 30 - (bsr(x) xor 31)
163
- clang10 for x64 : 31 + (bsr(x) xor -32)
164
- */
103
+ #define kDicLogSizeMaxCompress 32
165
104
 
166
- #define MY_clz(x) ((unsigned)__builtin_clz(x))
167
- // __lzcnt32
168
- // __builtin_ia32_lzcnt_u32
105
+ #define BSR2_RET(pos, res) { unsigned long zz; _BitScanReverse(&zz, (pos)); res = (zz + zz) + ((pos >> (zz - 1)) & 1); }
169
106
 
170
- #else // #if defined(_MSC_VER)
171
-
172
- #ifdef MY_CPU_ARM_OR_ARM64
173
-
174
- #define MY_clz _CountLeadingZeros
175
-
176
- #else // if defined(MY_CPU_X86_OR_AMD64)
177
-
178
- // #define MY_clz __lzcnt // we can use lzcnt (unsupported by old CPU)
179
- // _BitScanReverse code is not optimal for some MSVC compilers
180
- #define BSR2_RET(pos, res) { unsigned long zz; _BitScanReverse(&zz, (pos)); zz--; \
181
- res = (zz + zz) + (pos >> zz); }
182
-
183
- #endif // MY_CPU_X86_OR_AMD64
184
-
185
- #endif // _MSC_VER
186
-
187
-
188
- #ifndef BSR2_RET
189
-
190
- #define BSR2_RET(pos, res) { unsigned zz = 30 - MY_clz(pos); \
191
- res = (zz + zz) + (pos >> zz); }
192
-
193
- #endif
194
-
195
-
196
- unsigned GetPosSlot1(UInt32 pos);
197
- unsigned GetPosSlot1(UInt32 pos)
107
+ static unsigned GetPosSlot1(UInt32 pos)
198
108
  {
199
109
  unsigned res;
200
- BSR2_RET(pos, res)
110
+ BSR2_RET(pos, res);
201
111
  return res;
202
112
  }
203
- #define GetPosSlot2(pos, res) { BSR2_RET(pos, res) }
204
- #define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res) }
205
-
113
+ #define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
114
+ #define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); }
206
115
 
207
- #else // ! LZMA_LOG_BSR
116
+ #else
208
117
 
209
- #define kNumLogBits (11 + sizeof(size_t) / 8 * 3)
118
+ #define kNumLogBits (9 + sizeof(size_t) / 2)
119
+ /* #define kNumLogBits (11 + sizeof(size_t) / 8 * 3) */
210
120
 
211
121
  #define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
212
122
 
@@ -253,7 +163,7 @@ static void LzmaEnc_FastPosInit(Byte *g_FastPos)
253
163
  #define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
254
164
  #define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos & (kNumFullDistances - 1)]; else BSR2_RET(pos, res); }
255
165
 
256
- #endif // LZMA_LOG_BSR
166
+ #endif
257
167
 
258
168
 
259
169
  #define LZMA_NUM_REPS 4
@@ -283,7 +193,7 @@ typedef struct
283
193
 
284
194
  #define kNumLenToPosStates 4
285
195
  #define kNumPosSlotBits 6
286
- // #define kDicLogSizeMin 0
196
+ #define kDicLogSizeMin 0
287
197
  #define kDicLogSizeMax 32
288
198
  #define kDistTableSizeMax (kDicLogSizeMax * 2)
289
199
 
@@ -296,7 +206,7 @@ typedef struct
296
206
  #define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
297
207
 
298
208
  typedef
299
- #ifdef Z7_LZMA_PROB32
209
+ #ifdef _LZMA_PROB32
300
210
  UInt32
301
211
  #else
302
212
  UInt16
@@ -353,7 +263,7 @@ typedef struct
353
263
  Byte *buf;
354
264
  Byte *bufLim;
355
265
  Byte *bufBase;
356
- ISeqOutStreamPtr outStream;
266
+ ISeqOutStream *outStream;
357
267
  UInt64 processed;
358
268
  SRes res;
359
269
  } CRangeEnc;
@@ -386,10 +296,10 @@ typedef struct
386
296
  typedef UInt32 CProbPrice;
387
297
 
388
298
 
389
- struct CLzmaEnc
299
+ typedef struct
390
300
  {
391
301
  void *matchFinderObj;
392
- IMatchFinder2 matchFinder;
302
+ IMatchFinder matchFinder;
393
303
 
394
304
  unsigned optCur;
395
305
  unsigned optEnd;
@@ -429,30 +339,24 @@ struct CLzmaEnc
429
339
  UInt32 dictSize;
430
340
  SRes result;
431
341
 
432
- #ifndef Z7_ST
342
+ #ifndef _7ZIP_ST
433
343
  BoolInt mtMode;
434
344
  // begin of CMatchFinderMt is used in LZ thread
435
345
  CMatchFinderMt matchFinderMt;
436
346
  // end of CMatchFinderMt is used in BT and HASH threads
437
- // #else
438
- // CMatchFinder matchFinderBase;
439
347
  #endif
348
+
440
349
  CMatchFinder matchFinderBase;
441
350
 
442
-
443
- // we suppose that we have 8-bytes alignment after CMatchFinder
444
-
445
- #ifndef Z7_ST
351
+ #ifndef _7ZIP_ST
446
352
  Byte pad[128];
447
353
  #endif
448
354
 
449
355
  // LZ thread
450
356
  CProbPrice ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
451
357
 
452
- // we want {len , dist} pairs to be 8-bytes aligned in matches array
453
- UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2];
358
+ UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1];
454
359
 
455
- // we want 8-bytes alignment here
456
360
  UInt32 alignPrices[kAlignTableSize];
457
361
  UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
458
362
  UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances];
@@ -481,115 +385,113 @@ struct CLzmaEnc
481
385
 
482
386
  CSaveState saveState;
483
387
 
484
- // BoolInt mf_Failure;
485
- #ifndef Z7_ST
388
+ #ifndef _7ZIP_ST
486
389
  Byte pad2[128];
487
390
  #endif
488
- };
391
+ } CLzmaEnc;
489
392
 
490
393
 
491
- #define MFB (p->matchFinderBase)
492
- /*
493
- #ifndef Z7_ST
494
- #define MFB (p->matchFinderMt.MatchFinder)
495
- #endif
496
- */
497
394
 
498
- // #define GET_CLzmaEnc_p CLzmaEnc *p = (CLzmaEnc*)(void *)p;
499
- // #define GET_const_CLzmaEnc_p const CLzmaEnc *p = (const CLzmaEnc*)(const void *)p;
500
-
501
- #define COPY_ARR(dest, src, arr) memcpy((dest)->arr, (src)->arr, sizeof((src)->arr));
502
-
503
- #define COPY_LZMA_ENC_STATE(d, s, p) \
504
- (d)->state = (s)->state; \
505
- COPY_ARR(d, s, reps) \
506
- COPY_ARR(d, s, posAlignEncoder) \
507
- COPY_ARR(d, s, isRep) \
508
- COPY_ARR(d, s, isRepG0) \
509
- COPY_ARR(d, s, isRepG1) \
510
- COPY_ARR(d, s, isRepG2) \
511
- COPY_ARR(d, s, isMatch) \
512
- COPY_ARR(d, s, isRep0Long) \
513
- COPY_ARR(d, s, posSlotEncoder) \
514
- COPY_ARR(d, s, posEncoders) \
515
- (d)->lenProbs = (s)->lenProbs; \
516
- (d)->repLenProbs = (s)->repLenProbs; \
517
- memcpy((d)->litProbs, (s)->litProbs, ((size_t)0x300 * sizeof(CLzmaProb)) << (p)->lclp);
518
-
519
- void LzmaEnc_SaveState(CLzmaEncHandle p)
520
- {
521
- // GET_CLzmaEnc_p
522
- CSaveState *v = &p->saveState;
523
- COPY_LZMA_ENC_STATE(v, p, p)
395
+ #define COPY_ARR(dest, src, arr) memcpy(dest->arr, src->arr, sizeof(src->arr));
396
+
397
+ void LzmaEnc_SaveState(CLzmaEncHandle pp)
398
+ {
399
+ CLzmaEnc *p = (CLzmaEnc *)pp;
400
+ CSaveState *dest = &p->saveState;
401
+
402
+ dest->state = p->state;
403
+
404
+ dest->lenProbs = p->lenProbs;
405
+ dest->repLenProbs = p->repLenProbs;
406
+
407
+ COPY_ARR(dest, p, reps);
408
+
409
+ COPY_ARR(dest, p, posAlignEncoder);
410
+ COPY_ARR(dest, p, isRep);
411
+ COPY_ARR(dest, p, isRepG0);
412
+ COPY_ARR(dest, p, isRepG1);
413
+ COPY_ARR(dest, p, isRepG2);
414
+ COPY_ARR(dest, p, isMatch);
415
+ COPY_ARR(dest, p, isRep0Long);
416
+ COPY_ARR(dest, p, posSlotEncoder);
417
+ COPY_ARR(dest, p, posEncoders);
418
+
419
+ memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << p->lclp) * sizeof(CLzmaProb));
524
420
  }
525
421
 
526
- void LzmaEnc_RestoreState(CLzmaEncHandle p)
422
+
423
+ void LzmaEnc_RestoreState(CLzmaEncHandle pp)
527
424
  {
528
- // GET_CLzmaEnc_p
529
- const CSaveState *v = &p->saveState;
530
- COPY_LZMA_ENC_STATE(p, v, p)
425
+ CLzmaEnc *dest = (CLzmaEnc *)pp;
426
+ const CSaveState *p = &dest->saveState;
427
+
428
+ dest->state = p->state;
429
+
430
+ dest->lenProbs = p->lenProbs;
431
+ dest->repLenProbs = p->repLenProbs;
432
+
433
+ COPY_ARR(dest, p, reps);
434
+
435
+ COPY_ARR(dest, p, posAlignEncoder);
436
+ COPY_ARR(dest, p, isRep);
437
+ COPY_ARR(dest, p, isRepG0);
438
+ COPY_ARR(dest, p, isRepG1);
439
+ COPY_ARR(dest, p, isRepG2);
440
+ COPY_ARR(dest, p, isMatch);
441
+ COPY_ARR(dest, p, isRep0Long);
442
+ COPY_ARR(dest, p, posSlotEncoder);
443
+ COPY_ARR(dest, p, posEncoders);
444
+
445
+ memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << dest->lclp) * sizeof(CLzmaProb));
531
446
  }
532
447
 
533
448
 
534
- Z7_NO_INLINE
535
- SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props2)
449
+
450
+ SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
536
451
  {
537
- // GET_CLzmaEnc_p
452
+ CLzmaEnc *p = (CLzmaEnc *)pp;
538
453
  CLzmaEncProps props = *props2;
539
454
  LzmaEncProps_Normalize(&props);
540
455
 
541
456
  if (props.lc > LZMA_LC_MAX
542
457
  || props.lp > LZMA_LP_MAX
543
- || props.pb > LZMA_PB_MAX)
458
+ || props.pb > LZMA_PB_MAX
459
+ || props.dictSize > ((UInt64)1 << kDicLogSizeMaxCompress)
460
+ || props.dictSize > kLzmaMaxHistorySize)
544
461
  return SZ_ERROR_PARAM;
545
462
 
546
-
547
- if (props.dictSize > kLzmaMaxHistorySize)
548
- props.dictSize = kLzmaMaxHistorySize;
549
-
550
- #ifndef LZMA_LOG_BSR
551
- {
552
- const UInt64 dict64 = props.dictSize;
553
- if (dict64 > ((UInt64)1 << kDicLogSizeMaxCompress))
554
- return SZ_ERROR_PARAM;
555
- }
556
- #endif
557
-
558
463
  p->dictSize = props.dictSize;
559
464
  {
560
- unsigned fb = (unsigned)props.fb;
465
+ unsigned fb = props.fb;
561
466
  if (fb < 5)
562
467
  fb = 5;
563
468
  if (fb > LZMA_MATCH_LEN_MAX)
564
469
  fb = LZMA_MATCH_LEN_MAX;
565
470
  p->numFastBytes = fb;
566
471
  }
567
- p->lc = (unsigned)props.lc;
568
- p->lp = (unsigned)props.lp;
569
- p->pb = (unsigned)props.pb;
472
+ p->lc = props.lc;
473
+ p->lp = props.lp;
474
+ p->pb = props.pb;
570
475
  p->fastMode = (props.algo == 0);
571
476
  // p->_maxMode = True;
572
- MFB.btMode = (Byte)(props.btMode ? 1 : 0);
573
- // MFB.btMode = (Byte)(props.btMode);
477
+ p->matchFinderBase.btMode = (Byte)(props.btMode ? 1 : 0);
574
478
  {
575
479
  unsigned numHashBytes = 4;
576
480
  if (props.btMode)
577
481
  {
578
- if (props.numHashBytes < 2) numHashBytes = 2;
579
- else if (props.numHashBytes < 4) numHashBytes = (unsigned)props.numHashBytes;
482
+ if (props.numHashBytes < 2)
483
+ numHashBytes = 2;
484
+ else if (props.numHashBytes < 4)
485
+ numHashBytes = props.numHashBytes;
580
486
  }
581
- if (props.numHashBytes >= 5) numHashBytes = 5;
582
-
583
- MFB.numHashBytes = numHashBytes;
584
- // MFB.numHashBytes_Min = 2;
585
- MFB.numHashOutBits = (Byte)props.numHashOutBits;
487
+ p->matchFinderBase.numHashBytes = numHashBytes;
586
488
  }
587
489
 
588
- MFB.cutValue = props.mc;
490
+ p->matchFinderBase.cutValue = props.mc;
589
491
 
590
- p->writeEndMark = (BoolInt)props.writeEndMark;
492
+ p->writeEndMark = props.writeEndMark;
591
493
 
592
- #ifndef Z7_ST
494
+ #ifndef _7ZIP_ST
593
495
  /*
594
496
  if (newMultiThread != _multiThread)
595
497
  {
@@ -598,22 +500,16 @@ SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props2)
598
500
  }
599
501
  */
600
502
  p->multiThread = (props.numThreads > 1);
601
- p->matchFinderMt.btSync.affinity =
602
- p->matchFinderMt.hashSync.affinity = props.affinity;
603
- p->matchFinderMt.btSync.affinityGroup =
604
- p->matchFinderMt.hashSync.affinityGroup = props.affinityGroup;
605
- p->matchFinderMt.btSync.affinityInGroup =
606
- p->matchFinderMt.hashSync.affinityInGroup = props.affinityInGroup;
607
503
  #endif
608
504
 
609
505
  return SZ_OK;
610
506
  }
611
507
 
612
508
 
613
- void LzmaEnc_SetDataSize(CLzmaEncHandle p, UInt64 expectedDataSiize)
509
+ void LzmaEnc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize)
614
510
  {
615
- // GET_CLzmaEnc_p
616
- MFB.expectedDataSize = expectedDataSiize;
511
+ CLzmaEnc *p = (CLzmaEnc *)pp;
512
+ p->matchFinderBase.expectedDataSize = expectedDataSiize;
617
513
  }
618
514
 
619
515
 
@@ -640,8 +536,8 @@ static void RangeEnc_Construct(CRangeEnc *p)
640
536
  p->bufBase = NULL;
641
537
  }
642
538
 
643
- #define RangeEnc_GetProcessed(p) ( (p)->processed + (size_t)((p)->buf - (p)->bufBase) + (p)->cacheSize)
644
- #define RangeEnc_GetProcessed_sizet(p) ((size_t)(p)->processed + (size_t)((p)->buf - (p)->bufBase) + (size_t)(p)->cacheSize)
539
+ #define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize)
540
+ #define RangeEnc_GetProcessed_sizet(p) ((size_t)(p)->processed + ((p)->buf - (p)->bufBase) + (size_t)(p)->cacheSize)
645
541
 
646
542
  #define RC_BUF_SIZE (1 << 16)
647
543
 
@@ -660,11 +556,12 @@ static int RangeEnc_Alloc(CRangeEnc *p, ISzAllocPtr alloc)
660
556
  static void RangeEnc_Free(CRangeEnc *p, ISzAllocPtr alloc)
661
557
  {
662
558
  ISzAlloc_Free(alloc, p->bufBase);
663
- p->bufBase = NULL;
559
+ p->bufBase = 0;
664
560
  }
665
561
 
666
562
  static void RangeEnc_Init(CRangeEnc *p)
667
563
  {
564
+ /* Stream.Init(); */
668
565
  p->range = 0xFFFFFFFF;
669
566
  p->cache = 0;
670
567
  p->low = 0;
@@ -676,19 +573,19 @@ static void RangeEnc_Init(CRangeEnc *p)
676
573
  p->res = SZ_OK;
677
574
  }
678
575
 
679
- Z7_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p)
576
+ MY_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p)
680
577
  {
681
- const size_t num = (size_t)(p->buf - p->bufBase);
682
- if (p->res == SZ_OK)
683
- {
684
- if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num))
685
- p->res = SZ_ERROR_WRITE;
686
- }
578
+ size_t num;
579
+ if (p->res != SZ_OK)
580
+ return;
581
+ num = p->buf - p->bufBase;
582
+ if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num))
583
+ p->res = SZ_ERROR_WRITE;
687
584
  p->processed += num;
688
585
  p->buf = p->bufBase;
689
586
  }
690
587
 
691
- Z7_NO_INLINE static void Z7_FASTCALL RangeEnc_ShiftLow(CRangeEnc *p)
588
+ MY_NO_INLINE static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p)
692
589
  {
693
590
  UInt32 low = (UInt32)p->low;
694
591
  unsigned high = (unsigned)(p->low >> 32);
@@ -733,9 +630,9 @@ static void RangeEnc_FlushData(CRangeEnc *p)
733
630
  ttt = *(prob); \
734
631
  newBound = (range >> kNumBitModelTotalBits) * ttt;
735
632
 
736
- // #define Z7_LZMA_ENC_USE_BRANCH
633
+ // #define _LZMA_ENC_USE_BRANCH
737
634
 
738
- #ifdef Z7_LZMA_ENC_USE_BRANCH
635
+ #ifdef _LZMA_ENC_USE_BRANCH
739
636
 
740
637
  #define RC_BIT(p, prob, bit) { \
741
638
  RC_BIT_PRE(p, prob) \
@@ -759,7 +656,7 @@ static void RangeEnc_FlushData(CRangeEnc *p)
759
656
  range += newBound & mask; \
760
657
  mask &= (kBitModelTotal - ((1 << kNumMoveBits) - 1)); \
761
658
  mask += ((1 << kNumMoveBits) - 1); \
762
- ttt += (UInt32)((Int32)(mask - ttt) >> kNumMoveBits); \
659
+ ttt += (Int32)(mask - ttt) >> kNumMoveBits; \
763
660
  *(prob) = (CLzmaProb)ttt; \
764
661
  RC_NORM(p) \
765
662
  }
@@ -803,7 +700,7 @@ static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym)
803
700
  CLzmaProb *prob = probs + (sym >> 8);
804
701
  UInt32 bit = (sym >> 7) & 1;
805
702
  sym <<= 1;
806
- RC_BIT(p, prob, bit)
703
+ RC_BIT(p, prob, bit);
807
704
  }
808
705
  while (sym < 0x10000);
809
706
  p->range = range;
@@ -825,7 +722,7 @@ static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UIn
825
722
  bit = (sym >> 7) & 1;
826
723
  sym <<= 1;
827
724
  offs &= ~(matchByte ^ sym);
828
- RC_BIT(p, prob, bit)
725
+ RC_BIT(p, prob, bit);
829
726
  }
830
727
  while (sym < 0x10000);
831
728
  p->range = range;
@@ -852,17 +749,17 @@ static void LzmaEnc_InitPriceTables(CProbPrice *ProbPrices)
852
749
  bitCount++;
853
750
  }
854
751
  }
855
- ProbPrices[i] = (CProbPrice)(((unsigned)kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount);
752
+ ProbPrices[i] = (CProbPrice)((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount);
856
753
  // printf("\n%3d: %5d", i, ProbPrices[i]);
857
754
  }
858
755
  }
859
756
 
860
757
 
861
758
  #define GET_PRICE(prob, bit) \
862
- p->ProbPrices[((prob) ^ (unsigned)(((-(int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]
759
+ p->ProbPrices[((prob) ^ (unsigned)(((-(int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
863
760
 
864
761
  #define GET_PRICEa(prob, bit) \
865
- ProbPrices[((prob) ^ (unsigned)((-((int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]
762
+ ProbPrices[((prob) ^ (unsigned)((-((int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
866
763
 
867
764
  #define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits]
868
765
  #define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
@@ -913,7 +810,7 @@ static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBi
913
810
  unsigned bit = sym & 1;
914
811
  // RangeEnc_EncodeBit(rc, probs + m, bit);
915
812
  sym >>= 1;
916
- RC_BIT(rc, probs + m, bit)
813
+ RC_BIT(rc, probs + m, bit);
917
814
  m = (m << 1) | bit;
918
815
  }
919
816
  while (--numBits);
@@ -936,15 +833,15 @@ static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posS
936
833
  UInt32 range, ttt, newBound;
937
834
  CLzmaProb *probs = p->low;
938
835
  range = rc->range;
939
- RC_BIT_PRE(rc, probs)
836
+ RC_BIT_PRE(rc, probs);
940
837
  if (sym >= kLenNumLowSymbols)
941
838
  {
942
- RC_BIT_1(rc, probs)
839
+ RC_BIT_1(rc, probs);
943
840
  probs += kLenNumLowSymbols;
944
- RC_BIT_PRE(rc, probs)
841
+ RC_BIT_PRE(rc, probs);
945
842
  if (sym >= kLenNumLowSymbols * 2)
946
843
  {
947
- RC_BIT_1(rc, probs)
844
+ RC_BIT_1(rc, probs);
948
845
  rc->range = range;
949
846
  // RcTree_Encode(rc, p->high, kLenNumHighBits, sym - kLenNumLowSymbols * 2);
950
847
  LitEnc_Encode(rc, p->high, sym - kLenNumLowSymbols * 2);
@@ -957,11 +854,11 @@ static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posS
957
854
  {
958
855
  unsigned m;
959
856
  unsigned bit;
960
- RC_BIT_0(rc, probs)
857
+ RC_BIT_0(rc, probs);
961
858
  probs += (posState << (1 + kLenNumLowBits));
962
- bit = (sym >> 2) ; RC_BIT(rc, probs + 1, bit) m = (1 << 1) + bit;
963
- bit = (sym >> 1) & 1; RC_BIT(rc, probs + m, bit) m = (m << 1) + bit;
964
- bit = sym & 1; RC_BIT(rc, probs + m, bit)
859
+ bit = (sym >> 2) ; RC_BIT(rc, probs + 1, bit); m = (1 << 1) + bit;
860
+ bit = (sym >> 1) & 1; RC_BIT(rc, probs + m, bit); m = (m << 1) + bit;
861
+ bit = sym & 1; RC_BIT(rc, probs + m, bit);
965
862
  rc->range = range;
966
863
  }
967
864
  }
@@ -982,7 +879,7 @@ static void SetPrices_3(const CLzmaProb *probs, UInt32 startPrice, UInt32 *price
982
879
  }
983
880
 
984
881
 
985
- Z7_NO_INLINE static void Z7_FASTCALL LenPriceEnc_UpdateTables(
882
+ MY_NO_INLINE static void MY_FAST_CALL LenPriceEnc_UpdateTables(
986
883
  CLenPriceEnc *p,
987
884
  unsigned numPosStates,
988
885
  const CLenEnc *enc,
@@ -1046,14 +943,14 @@ Z7_NO_INLINE static void Z7_FASTCALL LenPriceEnc_UpdateTables(
1046
943
  UInt32 price = b;
1047
944
  do
1048
945
  {
1049
- const unsigned bit = sym & 1;
946
+ unsigned bit = sym & 1;
1050
947
  sym >>= 1;
1051
948
  price += GET_PRICEa(probs[sym], bit);
1052
949
  }
1053
950
  while (sym >= 2);
1054
951
 
1055
952
  {
1056
- const unsigned prob = probs[(size_t)i + (1 << (kLenNumHighBits - 1))];
953
+ unsigned prob = probs[(size_t)i + (1 << (kLenNumHighBits - 1))];
1057
954
  prices[(size_t)i * 2 ] = price + GET_PRICEa_0(prob);
1058
955
  prices[(size_t)i * 2 + 1] = price + GET_PRICEa_1(prob);
1059
956
  }
@@ -1062,7 +959,7 @@ Z7_NO_INLINE static void Z7_FASTCALL LenPriceEnc_UpdateTables(
1062
959
 
1063
960
  {
1064
961
  unsigned posState;
1065
- const size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof(p->prices[0][0]);
962
+ size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof(p->prices[0][0]);
1066
963
  for (posState = 1; posState < numPosStates; posState++)
1067
964
  memcpy(p->prices[posState] + kLenNumLowSymbols * 2, p->prices[0] + kLenNumLowSymbols * 2, num);
1068
965
  }
@@ -1088,11 +985,7 @@ static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes)
1088
985
 
1089
986
  p->additionalOffset++;
1090
987
  p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
1091
- {
1092
- const UInt32 *d = p->matchFinder.GetMatches(p->matchFinderObj, p->matches);
1093
- // if (!d) { p->mf_Failure = True; *numPairsRes = 0; return 0; }
1094
- numPairs = (unsigned)(d - p->matches);
1095
- }
988
+ numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches);
1096
989
  *numPairsRes = numPairs;
1097
990
 
1098
991
  #ifdef SHOW_STAT
@@ -1108,7 +1001,7 @@ static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes)
1108
1001
  if (numPairs == 0)
1109
1002
  return 0;
1110
1003
  {
1111
- const unsigned len = p->matches[(size_t)numPairs - 2];
1004
+ unsigned len = p->matches[(size_t)numPairs - 2];
1112
1005
  if (len != p->numFastBytes)
1113
1006
  return len;
1114
1007
  {
@@ -1118,7 +1011,7 @@ static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes)
1118
1011
  {
1119
1012
  const Byte *p1 = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
1120
1013
  const Byte *p2 = p1 + len;
1121
- const ptrdiff_t dif = (ptrdiff_t)-1 - (ptrdiff_t)p->matches[(size_t)numPairs - 1];
1014
+ ptrdiff_t dif = (ptrdiff_t)-1 - p->matches[(size_t)numPairs - 1];
1122
1015
  const Byte *lim = p1 + numAvail;
1123
1016
  for (; p2 != lim && *p2 == p2[dif]; p2++)
1124
1017
  {}
@@ -1144,7 +1037,7 @@ static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes)
1144
1037
  + GET_PRICE_1(p->isRep[state]) \
1145
1038
  + GET_PRICE_0(p->isRepG0[state])
1146
1039
 
1147
- Z7_FORCE_INLINE
1040
+ MY_FORCE_INLINE
1148
1041
  static UInt32 GetPrice_PureRep(const CLzmaEnc *p, unsigned repIndex, size_t state, size_t posState)
1149
1042
  {
1150
1043
  UInt32 price;
@@ -1274,8 +1167,6 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1274
1167
  repLens[i] = len;
1275
1168
  if (len > repLens[repMaxIndex])
1276
1169
  repMaxIndex = i;
1277
- if (len == LZMA_MATCH_LEN_MAX) // 21.03 : optimization
1278
- break;
1279
1170
  }
1280
1171
 
1281
1172
  if (repLens[repMaxIndex] >= p->numFastBytes)
@@ -1288,12 +1179,10 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1288
1179
  }
1289
1180
 
1290
1181
  matches = p->matches;
1291
- #define MATCHES matches
1292
- // #define MATCHES p->matches
1293
1182
 
1294
1183
  if (mainLen >= p->numFastBytes)
1295
1184
  {
1296
- p->backRes = MATCHES[(size_t)numPairs - 1] + LZMA_NUM_REPS;
1185
+ p->backRes = matches[(size_t)numPairs - 1] + LZMA_NUM_REPS;
1297
1186
  MOVE_POS(p, mainLen - 1)
1298
1187
  return mainLen;
1299
1188
  }
@@ -1323,7 +1212,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1323
1212
  LitEnc_GetPrice(probs, curByte, p->ProbPrices));
1324
1213
  }
1325
1214
 
1326
- MakeAs_Lit(&p->opt[1])
1215
+ MakeAs_Lit(&p->opt[1]);
1327
1216
 
1328
1217
  matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]);
1329
1218
  repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]);
@@ -1335,7 +1224,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1335
1224
  if (shortRepPrice < p->opt[1].price)
1336
1225
  {
1337
1226
  p->opt[1].price = shortRepPrice;
1338
- MakeAs_ShortRep(&p->opt[1])
1227
+ MakeAs_ShortRep(&p->opt[1]);
1339
1228
  }
1340
1229
  if (last < 2)
1341
1230
  {
@@ -1387,13 +1276,13 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1387
1276
  if (len < 2)
1388
1277
  len = 2;
1389
1278
  else
1390
- while (len > MATCHES[offs])
1279
+ while (len > matches[offs])
1391
1280
  offs += 2;
1392
1281
 
1393
1282
  for (; ; len++)
1394
1283
  {
1395
1284
  COptimal *opt;
1396
- UInt32 dist = MATCHES[(size_t)offs + 1];
1285
+ UInt32 dist = matches[(size_t)offs + 1];
1397
1286
  UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len);
1398
1287
  unsigned lenToPosState = GetLenToPosState(len);
1399
1288
 
@@ -1402,7 +1291,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1402
1291
  else
1403
1292
  {
1404
1293
  unsigned slot;
1405
- GetPosSlot2(dist, slot)
1294
+ GetPosSlot2(dist, slot);
1406
1295
  price += p->alignPrices[dist & kAlignMask];
1407
1296
  price += p->posSlotPrices[lenToPosState][slot];
1408
1297
  }
@@ -1417,7 +1306,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1417
1306
  opt->extra = 0;
1418
1307
  }
1419
1308
 
1420
- if (len == MATCHES[offs])
1309
+ if (len == matches[offs])
1421
1310
  {
1422
1311
  offs += 2;
1423
1312
  if (offs == numPairs)
@@ -1478,7 +1367,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1478
1367
  unsigned delta = best - cur;
1479
1368
  if (delta != 0)
1480
1369
  {
1481
- MOVE_POS(p, delta)
1370
+ MOVE_POS(p, delta);
1482
1371
  }
1483
1372
  }
1484
1373
  cur = best;
@@ -1625,7 +1514,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1625
1514
  {
1626
1515
  nextOpt->price = litPrice;
1627
1516
  nextOpt->len = 1;
1628
- MakeAs_Lit(nextOpt)
1517
+ MakeAs_Lit(nextOpt);
1629
1518
  nextIsLit = True;
1630
1519
  }
1631
1520
  }
@@ -1659,7 +1548,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1659
1548
  {
1660
1549
  nextOpt->price = shortRepPrice;
1661
1550
  nextOpt->len = 1;
1662
- MakeAs_ShortRep(nextOpt)
1551
+ MakeAs_ShortRep(nextOpt);
1663
1552
  nextIsLit = False;
1664
1553
  }
1665
1554
  }
@@ -1838,8 +1727,8 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1838
1727
  if (newLen > numAvail)
1839
1728
  {
1840
1729
  newLen = numAvail;
1841
- for (numPairs = 0; newLen > MATCHES[numPairs]; numPairs += 2);
1842
- MATCHES[numPairs] = (UInt32)newLen;
1730
+ for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2);
1731
+ matches[numPairs] = (UInt32)newLen;
1843
1732
  numPairs += 2;
1844
1733
  }
1845
1734
 
@@ -1858,12 +1747,12 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1858
1747
  }
1859
1748
 
1860
1749
  offs = 0;
1861
- while (startLen > MATCHES[offs])
1750
+ while (startLen > matches[offs])
1862
1751
  offs += 2;
1863
- dist = MATCHES[(size_t)offs + 1];
1752
+ dist = matches[(size_t)offs + 1];
1864
1753
 
1865
1754
  // if (dist >= kNumFullDistances)
1866
- GetPosSlot2(dist, posSlot)
1755
+ GetPosSlot2(dist, posSlot);
1867
1756
 
1868
1757
  for (len = /*2*/ startLen; ; len++)
1869
1758
  {
@@ -1887,7 +1776,7 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1887
1776
  }
1888
1777
  }
1889
1778
 
1890
- if (len == MATCHES[offs])
1779
+ if (len == matches[offs])
1891
1780
  {
1892
1781
  // if (p->_maxMode) {
1893
1782
  // MATCH : LIT : REP_0
@@ -1952,9 +1841,9 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
1952
1841
  offs += 2;
1953
1842
  if (offs == numPairs)
1954
1843
  break;
1955
- dist = MATCHES[(size_t)offs + 1];
1844
+ dist = matches[(size_t)offs + 1];
1956
1845
  // if (dist >= kNumFullDistances)
1957
- GetPosSlot2(dist, posSlot)
1846
+ GetPosSlot2(dist, posSlot);
1958
1847
  }
1959
1848
  }
1960
1849
  }
@@ -2130,7 +2019,7 @@ static void WriteEndMarker(CLzmaEnc *p, unsigned posState)
2130
2019
  {
2131
2020
  UInt32 ttt, newBound;
2132
2021
  RC_BIT_PRE(p, probs + m)
2133
- RC_BIT_1(&p->rc, probs + m)
2022
+ RC_BIT_1(&p->rc, probs + m);
2134
2023
  m = (m << 1) + 1;
2135
2024
  }
2136
2025
  while (m < (1 << kNumPosSlotBits));
@@ -2155,7 +2044,7 @@ static void WriteEndMarker(CLzmaEnc *p, unsigned posState)
2155
2044
  {
2156
2045
  UInt32 ttt, newBound;
2157
2046
  RC_BIT_PRE(p, probs + m)
2158
- RC_BIT_1(&p->rc, probs + m)
2047
+ RC_BIT_1(&p->rc, probs + m);
2159
2048
  m = (m << 1) + 1;
2160
2049
  }
2161
2050
  while (m < kAlignTableSize);
@@ -2170,30 +2059,15 @@ static SRes CheckErrors(CLzmaEnc *p)
2170
2059
  return p->result;
2171
2060
  if (p->rc.res != SZ_OK)
2172
2061
  p->result = SZ_ERROR_WRITE;
2173
-
2174
- #ifndef Z7_ST
2175
- if (
2176
- // p->mf_Failure ||
2177
- (p->mtMode &&
2178
- ( // p->matchFinderMt.failure_LZ_LZ ||
2179
- p->matchFinderMt.failure_LZ_BT))
2180
- )
2181
- {
2182
- p->result = MY_HRES_ERROR_INTERNAL_ERROR;
2183
- // printf("\nCheckErrors p->matchFinderMt.failureLZ\n");
2184
- }
2185
- #endif
2186
-
2187
- if (MFB.result != SZ_OK)
2062
+ if (p->matchFinderBase.result != SZ_OK)
2188
2063
  p->result = SZ_ERROR_READ;
2189
-
2190
2064
  if (p->result != SZ_OK)
2191
2065
  p->finished = True;
2192
2066
  return p->result;
2193
2067
  }
2194
2068
 
2195
2069
 
2196
- Z7_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
2070
+ MY_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
2197
2071
  {
2198
2072
  /* ReleaseMFStream(); */
2199
2073
  p->finished = True;
@@ -2205,7 +2079,7 @@ Z7_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
2205
2079
  }
2206
2080
 
2207
2081
 
2208
- Z7_NO_INLINE static void FillAlignPrices(CLzmaEnc *p)
2082
+ MY_NO_INLINE static void FillAlignPrices(CLzmaEnc *p)
2209
2083
  {
2210
2084
  unsigned i;
2211
2085
  const CProbPrice *ProbPrices = p->ProbPrices;
@@ -2229,7 +2103,7 @@ Z7_NO_INLINE static void FillAlignPrices(CLzmaEnc *p)
2229
2103
  }
2230
2104
 
2231
2105
 
2232
- Z7_NO_INLINE static void FillDistancesPrices(CLzmaEnc *p)
2106
+ MY_NO_INLINE static void FillDistancesPrices(CLzmaEnc *p)
2233
2107
  {
2234
2108
  // int y; for (y = 0; y < 100; y++) {
2235
2109
 
@@ -2324,20 +2198,20 @@ Z7_NO_INLINE static void FillDistancesPrices(CLzmaEnc *p)
2324
2198
 
2325
2199
 
2326
2200
 
2327
- static void LzmaEnc_Construct(CLzmaEnc *p)
2201
+ void LzmaEnc_Construct(CLzmaEnc *p)
2328
2202
  {
2329
2203
  RangeEnc_Construct(&p->rc);
2330
- MatchFinder_Construct(&MFB);
2204
+ MatchFinder_Construct(&p->matchFinderBase);
2331
2205
 
2332
- #ifndef Z7_ST
2333
- p->matchFinderMt.MatchFinder = &MFB;
2206
+ #ifndef _7ZIP_ST
2334
2207
  MatchFinderMt_Construct(&p->matchFinderMt);
2208
+ p->matchFinderMt.MatchFinder = &p->matchFinderBase;
2335
2209
  #endif
2336
2210
 
2337
2211
  {
2338
2212
  CLzmaEncProps props;
2339
2213
  LzmaEncProps_Init(&props);
2340
- LzmaEnc_SetProps((CLzmaEncHandle)(void *)p, &props);
2214
+ LzmaEnc_SetProps(p, &props);
2341
2215
  }
2342
2216
 
2343
2217
  #ifndef LZMA_LOG_BSR
@@ -2347,6 +2221,7 @@ static void LzmaEnc_Construct(CLzmaEnc *p)
2347
2221
  LzmaEnc_InitPriceTables(p->ProbPrices);
2348
2222
  p->litProbs = NULL;
2349
2223
  p->saveState.litProbs = NULL;
2224
+
2350
2225
  }
2351
2226
 
2352
2227
  CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc)
@@ -2358,7 +2233,7 @@ CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc)
2358
2233
  return p;
2359
2234
  }
2360
2235
 
2361
- static void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc)
2236
+ void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc)
2362
2237
  {
2363
2238
  ISzAlloc_Free(alloc, p->litProbs);
2364
2239
  ISzAlloc_Free(alloc, p->saveState.litProbs);
@@ -2366,44 +2241,36 @@ static void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc)
2366
2241
  p->saveState.litProbs = NULL;
2367
2242
  }
2368
2243
 
2369
- static void LzmaEnc_Destruct(CLzmaEnc *p, ISzAllocPtr alloc, ISzAllocPtr allocBig)
2244
+ void LzmaEnc_Destruct(CLzmaEnc *p, ISzAllocPtr alloc, ISzAllocPtr allocBig)
2370
2245
  {
2371
- #ifndef Z7_ST
2246
+ #ifndef _7ZIP_ST
2372
2247
  MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
2373
2248
  #endif
2374
2249
 
2375
- MatchFinder_Free(&MFB, allocBig);
2250
+ MatchFinder_Free(&p->matchFinderBase, allocBig);
2376
2251
  LzmaEnc_FreeLits(p, alloc);
2377
2252
  RangeEnc_Free(&p->rc, alloc);
2378
2253
  }
2379
2254
 
2380
2255
  void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig)
2381
2256
  {
2382
- // GET_CLzmaEnc_p
2383
- LzmaEnc_Destruct(p, alloc, allocBig);
2257
+ LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig);
2384
2258
  ISzAlloc_Free(alloc, p);
2385
2259
  }
2386
2260
 
2387
2261
 
2388
- Z7_NO_INLINE
2389
2262
  static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpackSize)
2390
2263
  {
2391
2264
  UInt32 nowPos32, startPos32;
2392
2265
  if (p->needInit)
2393
2266
  {
2394
- #ifndef Z7_ST
2395
- if (p->mtMode)
2396
- {
2397
- RINOK(MatchFinderMt_InitMt(&p->matchFinderMt))
2398
- }
2399
- #endif
2400
2267
  p->matchFinder.Init(p->matchFinderObj);
2401
2268
  p->needInit = 0;
2402
2269
  }
2403
2270
 
2404
2271
  if (p->finished)
2405
2272
  return p->result;
2406
- RINOK(CheckErrors(p))
2273
+ RINOK(CheckErrors(p));
2407
2274
 
2408
2275
  nowPos32 = (UInt32)p->nowPos64;
2409
2276
  startPos32 = nowPos32;
@@ -2466,7 +2333,7 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2466
2333
  const Byte *data;
2467
2334
  unsigned state;
2468
2335
 
2469
- RC_BIT_0(&p->rc, probs)
2336
+ RC_BIT_0(&p->rc, probs);
2470
2337
  p->rc.range = range;
2471
2338
  data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
2472
2339
  probs = LIT_PROBS(nowPos32, *(data - 1));
@@ -2480,53 +2347,53 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2480
2347
  }
2481
2348
  else
2482
2349
  {
2483
- RC_BIT_1(&p->rc, probs)
2350
+ RC_BIT_1(&p->rc, probs);
2484
2351
  probs = &p->isRep[p->state];
2485
2352
  RC_BIT_PRE(&p->rc, probs)
2486
2353
 
2487
2354
  if (dist < LZMA_NUM_REPS)
2488
2355
  {
2489
- RC_BIT_1(&p->rc, probs)
2356
+ RC_BIT_1(&p->rc, probs);
2490
2357
  probs = &p->isRepG0[p->state];
2491
2358
  RC_BIT_PRE(&p->rc, probs)
2492
2359
  if (dist == 0)
2493
2360
  {
2494
- RC_BIT_0(&p->rc, probs)
2361
+ RC_BIT_0(&p->rc, probs);
2495
2362
  probs = &p->isRep0Long[p->state][posState];
2496
2363
  RC_BIT_PRE(&p->rc, probs)
2497
2364
  if (len != 1)
2498
2365
  {
2499
- RC_BIT_1_BASE(&p->rc, probs)
2366
+ RC_BIT_1_BASE(&p->rc, probs);
2500
2367
  }
2501
2368
  else
2502
2369
  {
2503
- RC_BIT_0_BASE(&p->rc, probs)
2370
+ RC_BIT_0_BASE(&p->rc, probs);
2504
2371
  p->state = kShortRepNextStates[p->state];
2505
2372
  }
2506
2373
  }
2507
2374
  else
2508
2375
  {
2509
- RC_BIT_1(&p->rc, probs)
2376
+ RC_BIT_1(&p->rc, probs);
2510
2377
  probs = &p->isRepG1[p->state];
2511
2378
  RC_BIT_PRE(&p->rc, probs)
2512
2379
  if (dist == 1)
2513
2380
  {
2514
- RC_BIT_0_BASE(&p->rc, probs)
2381
+ RC_BIT_0_BASE(&p->rc, probs);
2515
2382
  dist = p->reps[1];
2516
2383
  }
2517
2384
  else
2518
2385
  {
2519
- RC_BIT_1(&p->rc, probs)
2386
+ RC_BIT_1(&p->rc, probs);
2520
2387
  probs = &p->isRepG2[p->state];
2521
2388
  RC_BIT_PRE(&p->rc, probs)
2522
2389
  if (dist == 2)
2523
2390
  {
2524
- RC_BIT_0_BASE(&p->rc, probs)
2391
+ RC_BIT_0_BASE(&p->rc, probs);
2525
2392
  dist = p->reps[2];
2526
2393
  }
2527
2394
  else
2528
2395
  {
2529
- RC_BIT_1_BASE(&p->rc, probs)
2396
+ RC_BIT_1_BASE(&p->rc, probs);
2530
2397
  dist = p->reps[3];
2531
2398
  p->reps[3] = p->reps[2];
2532
2399
  }
@@ -2550,7 +2417,7 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2550
2417
  else
2551
2418
  {
2552
2419
  unsigned posSlot;
2553
- RC_BIT_0(&p->rc, probs)
2420
+ RC_BIT_0(&p->rc, probs);
2554
2421
  p->rc.range = range;
2555
2422
  p->state = kMatchNextStates[p->state];
2556
2423
 
@@ -2564,7 +2431,7 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2564
2431
  p->reps[0] = dist + 1;
2565
2432
 
2566
2433
  p->matchPriceCount++;
2567
- GetPosSlot(dist, posSlot)
2434
+ GetPosSlot(dist, posSlot);
2568
2435
  // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], posSlot);
2569
2436
  {
2570
2437
  UInt32 sym = (UInt32)posSlot + (1 << kNumPosSlotBits);
@@ -2575,7 +2442,7 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2575
2442
  CLzmaProb *prob = probs + (sym >> kNumPosSlotBits);
2576
2443
  UInt32 bit = (sym >> (kNumPosSlotBits - 1)) & 1;
2577
2444
  sym <<= 1;
2578
- RC_BIT(&p->rc, prob, bit)
2445
+ RC_BIT(&p->rc, prob, bit);
2579
2446
  }
2580
2447
  while (sym < (1 << kNumPosSlotBits * 2));
2581
2448
  p->rc.range = range;
@@ -2619,10 +2486,10 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2619
2486
  {
2620
2487
  unsigned m = 1;
2621
2488
  unsigned bit;
2622
- bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit) m = (m << 1) + bit;
2623
- bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit) m = (m << 1) + bit;
2624
- bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit) m = (m << 1) + bit;
2625
- bit = dist & 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit)
2489
+ bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit;
2490
+ bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit;
2491
+ bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit;
2492
+ bit = dist & 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit);
2626
2493
  p->rc.range = range;
2627
2494
  // p->alignPriceCount++;
2628
2495
  }
@@ -2654,12 +2521,12 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2654
2521
  // { int y; for (y = 0; y < 100; y++) {
2655
2522
  FillDistancesPrices(p);
2656
2523
  // }}
2657
- LenPriceEnc_UpdateTables(&p->lenEnc, (unsigned)1 << p->pb, &p->lenProbs, p->ProbPrices);
2524
+ LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices);
2658
2525
  }
2659
2526
  if (p->repLenEncCounter <= 0)
2660
2527
  {
2661
2528
  p->repLenEncCounter = REP_LEN_COUNT;
2662
- LenPriceEnc_UpdateTables(&p->repLenEnc, (unsigned)1 << p->pb, &p->repLenProbs, p->ProbPrices);
2529
+ LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices);
2663
2530
  }
2664
2531
  }
2665
2532
 
@@ -2692,22 +2559,20 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpa
2692
2559
  static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig)
2693
2560
  {
2694
2561
  UInt32 beforeSize = kNumOpts;
2695
- UInt32 dictSize;
2696
-
2697
2562
  if (!RangeEnc_Alloc(&p->rc, alloc))
2698
2563
  return SZ_ERROR_MEM;
2699
2564
 
2700
- #ifndef Z7_ST
2701
- p->mtMode = (p->multiThread && !p->fastMode && (MFB.btMode != 0));
2565
+ #ifndef _7ZIP_ST
2566
+ p->mtMode = (p->multiThread && !p->fastMode && (p->matchFinderBase.btMode != 0));
2702
2567
  #endif
2703
2568
 
2704
2569
  {
2705
- const unsigned lclp = p->lc + p->lp;
2570
+ unsigned lclp = p->lc + p->lp;
2706
2571
  if (!p->litProbs || !p->saveState.litProbs || p->lclp != lclp)
2707
2572
  {
2708
2573
  LzmaEnc_FreeLits(p, alloc);
2709
- p->litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((size_t)0x300 * sizeof(CLzmaProb)) << lclp);
2710
- p->saveState.litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((size_t)0x300 * sizeof(CLzmaProb)) << lclp);
2574
+ p->litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb));
2575
+ p->saveState.litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb));
2711
2576
  if (!p->litProbs || !p->saveState.litProbs)
2712
2577
  {
2713
2578
  LzmaEnc_FreeLits(p, alloc);
@@ -2717,55 +2582,36 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc,
2717
2582
  }
2718
2583
  }
2719
2584
 
2720
- MFB.bigHash = (Byte)(p->dictSize > kBigHashDicLimit ? 1 : 0);
2721
-
2585
+ p->matchFinderBase.bigHash = (Byte)(p->dictSize > kBigHashDicLimit ? 1 : 0);
2722
2586
 
2723
- dictSize = p->dictSize;
2724
- if (dictSize == ((UInt32)2 << 30) ||
2725
- dictSize == ((UInt32)3 << 30))
2726
- {
2727
- /* 21.03 : here we reduce the dictionary for 2 reasons:
2728
- 1) we don't want 32-bit back_distance matches in decoder for 2 GB dictionary.
2729
- 2) we want to elimate useless last MatchFinder_Normalize3() for corner cases,
2730
- where data size is aligned for 1 GB: 5/6/8 GB.
2731
- That reducing must be >= 1 for such corner cases. */
2732
- dictSize -= 1;
2733
- }
2587
+ if (beforeSize + p->dictSize < keepWindowSize)
2588
+ beforeSize = keepWindowSize - p->dictSize;
2734
2589
 
2735
- if (beforeSize + dictSize < keepWindowSize)
2736
- beforeSize = keepWindowSize - dictSize;
2737
-
2738
- /* in worst case we can look ahead for
2739
- max(LZMA_MATCH_LEN_MAX, numFastBytes + 1 + numFastBytes) bytes.
2740
- we send larger value for (keepAfter) to MantchFinder_Create():
2741
- (numFastBytes + LZMA_MATCH_LEN_MAX + 1)
2742
- */
2743
-
2744
- #ifndef Z7_ST
2590
+ #ifndef _7ZIP_ST
2745
2591
  if (p->mtMode)
2746
2592
  {
2747
- RINOK(MatchFinderMt_Create(&p->matchFinderMt, dictSize, beforeSize,
2748
- p->numFastBytes, LZMA_MATCH_LEN_MAX + 1 /* 18.04 */
2749
- , allocBig))
2593
+ RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes,
2594
+ LZMA_MATCH_LEN_MAX
2595
+ + 1 /* 18.04 */
2596
+ , allocBig));
2750
2597
  p->matchFinderObj = &p->matchFinderMt;
2751
- MFB.bigHash = (Byte)(MFB.hashMask >= 0xFFFFFF ? 1 : 0);
2598
+ p->matchFinderBase.bigHash = (Byte)(
2599
+ (p->dictSize > kBigHashDicLimit && p->matchFinderBase.hashMask >= 0xFFFFFF) ? 1 : 0);
2752
2600
  MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder);
2753
2601
  }
2754
2602
  else
2755
2603
  #endif
2756
2604
  {
2757
- if (!MatchFinder_Create(&MFB, dictSize, beforeSize,
2758
- p->numFastBytes, LZMA_MATCH_LEN_MAX + 1 /* 21.03 */
2759
- , allocBig))
2605
+ if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig))
2760
2606
  return SZ_ERROR_MEM;
2761
- p->matchFinderObj = &MFB;
2762
- MatchFinder_CreateVTable(&MFB, &p->matchFinder);
2607
+ p->matchFinderObj = &p->matchFinderBase;
2608
+ MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder);
2763
2609
  }
2764
2610
 
2765
2611
  return SZ_OK;
2766
2612
  }
2767
2613
 
2768
- static void LzmaEnc_Init(CLzmaEnc *p)
2614
+ void LzmaEnc_Init(CLzmaEnc *p)
2769
2615
  {
2770
2616
  unsigned i;
2771
2617
  p->state = 0;
@@ -2808,8 +2654,8 @@ static void LzmaEnc_Init(CLzmaEnc *p)
2808
2654
  }
2809
2655
 
2810
2656
  {
2811
- const size_t num = (size_t)0x300 << (p->lp + p->lc);
2812
- size_t k;
2657
+ UInt32 num = (UInt32)0x300 << (p->lp + p->lc);
2658
+ UInt32 k;
2813
2659
  CLzmaProb *probs = p->litProbs;
2814
2660
  for (k = 0; k < num; k++)
2815
2661
  probs[k] = kProbInitValue;
@@ -2829,14 +2675,12 @@ static void LzmaEnc_Init(CLzmaEnc *p)
2829
2675
 
2830
2676
  p->additionalOffset = 0;
2831
2677
 
2832
- p->pbMask = ((unsigned)1 << p->pb) - 1;
2678
+ p->pbMask = (1 << p->pb) - 1;
2833
2679
  p->lpMask = ((UInt32)0x100 << p->lp) - ((unsigned)0x100 >> p->lc);
2834
-
2835
- // p->mf_Failure = False;
2836
2680
  }
2837
2681
 
2838
2682
 
2839
- static void LzmaEnc_InitPrices(CLzmaEnc *p)
2683
+ void LzmaEnc_InitPrices(CLzmaEnc *p)
2840
2684
  {
2841
2685
  if (!p->fastMode)
2842
2686
  {
@@ -2850,8 +2694,8 @@ static void LzmaEnc_InitPrices(CLzmaEnc *p)
2850
2694
 
2851
2695
  p->repLenEncCounter = REP_LEN_COUNT;
2852
2696
 
2853
- LenPriceEnc_UpdateTables(&p->lenEnc, (unsigned)1 << p->pb, &p->lenProbs, p->ProbPrices);
2854
- LenPriceEnc_UpdateTables(&p->repLenEnc, (unsigned)1 << p->pb, &p->repLenProbs, p->ProbPrices);
2697
+ LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices);
2698
+ LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices);
2855
2699
  }
2856
2700
 
2857
2701
  static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig)
@@ -2864,53 +2708,59 @@ static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr
2864
2708
 
2865
2709
  p->finished = False;
2866
2710
  p->result = SZ_OK;
2867
- p->nowPos64 = 0;
2868
- p->needInit = 1;
2869
- RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig))
2711
+ RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig));
2870
2712
  LzmaEnc_Init(p);
2871
2713
  LzmaEnc_InitPrices(p);
2714
+ p->nowPos64 = 0;
2872
2715
  return SZ_OK;
2873
2716
  }
2874
2717
 
2875
- static SRes LzmaEnc_Prepare(CLzmaEncHandle p,
2876
- ISeqOutStreamPtr outStream,
2877
- ISeqInStreamPtr inStream,
2718
+ static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream,
2878
2719
  ISzAllocPtr alloc, ISzAllocPtr allocBig)
2879
2720
  {
2880
- // GET_CLzmaEnc_p
2881
- MatchFinder_SET_STREAM(&MFB, inStream)
2721
+ CLzmaEnc *p = (CLzmaEnc *)pp;
2722
+ p->matchFinderBase.stream = inStream;
2723
+ p->needInit = 1;
2882
2724
  p->rc.outStream = outStream;
2883
2725
  return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig);
2884
2726
  }
2885
2727
 
2886
- SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle p,
2887
- ISeqInStreamPtr inStream, UInt32 keepWindowSize,
2728
+ SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
2729
+ ISeqInStream *inStream, UInt32 keepWindowSize,
2888
2730
  ISzAllocPtr alloc, ISzAllocPtr allocBig)
2889
2731
  {
2890
- // GET_CLzmaEnc_p
2891
- MatchFinder_SET_STREAM(&MFB, inStream)
2732
+ CLzmaEnc *p = (CLzmaEnc *)pp;
2733
+ p->matchFinderBase.stream = inStream;
2734
+ p->needInit = 1;
2892
2735
  return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
2893
2736
  }
2894
2737
 
2895
- SRes LzmaEnc_MemPrepare(CLzmaEncHandle p,
2896
- const Byte *src, SizeT srcLen,
2897
- UInt32 keepWindowSize,
2898
- ISzAllocPtr alloc, ISzAllocPtr allocBig)
2738
+ static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
2899
2739
  {
2900
- // GET_CLzmaEnc_p
2901
- MatchFinder_SET_DIRECT_INPUT_BUF(&MFB, src, srcLen)
2902
- LzmaEnc_SetDataSize(p, srcLen);
2740
+ p->matchFinderBase.directInput = 1;
2741
+ p->matchFinderBase.bufferBase = (Byte *)src;
2742
+ p->matchFinderBase.directInputRem = srcLen;
2743
+ }
2744
+
2745
+ SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
2746
+ UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig)
2747
+ {
2748
+ CLzmaEnc *p = (CLzmaEnc *)pp;
2749
+ LzmaEnc_SetInputBuf(p, src, srcLen);
2750
+ p->needInit = 1;
2751
+
2752
+ LzmaEnc_SetDataSize(pp, srcLen);
2903
2753
  return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
2904
2754
  }
2905
2755
 
2906
- void LzmaEnc_Finish(CLzmaEncHandle p)
2756
+ void LzmaEnc_Finish(CLzmaEncHandle pp)
2907
2757
  {
2908
- #ifndef Z7_ST
2909
- // GET_CLzmaEnc_p
2758
+ #ifndef _7ZIP_ST
2759
+ CLzmaEnc *p = (CLzmaEnc *)pp;
2910
2760
  if (p->mtMode)
2911
2761
  MatchFinderMt_ReleaseStream(&p->matchFinderMt);
2912
2762
  #else
2913
- UNUSED_VAR(p)
2763
+ UNUSED_VAR(pp);
2914
2764
  #endif
2915
2765
  }
2916
2766
 
@@ -2919,48 +2769,43 @@ typedef struct
2919
2769
  {
2920
2770
  ISeqOutStream vt;
2921
2771
  Byte *data;
2922
- size_t rem;
2772
+ SizeT rem;
2923
2773
  BoolInt overflow;
2924
2774
  } CLzmaEnc_SeqOutStreamBuf;
2925
2775
 
2926
- static size_t SeqOutStreamBuf_Write(ISeqOutStreamPtr pp, const void *data, size_t size)
2776
+ static size_t SeqOutStreamBuf_Write(const ISeqOutStream *pp, const void *data, size_t size)
2927
2777
  {
2928
- Z7_CONTAINER_FROM_VTBL_TO_DECL_VAR_pp_vt_p(CLzmaEnc_SeqOutStreamBuf)
2778
+ CLzmaEnc_SeqOutStreamBuf *p = CONTAINER_FROM_VTBL(pp, CLzmaEnc_SeqOutStreamBuf, vt);
2929
2779
  if (p->rem < size)
2930
2780
  {
2931
2781
  size = p->rem;
2932
2782
  p->overflow = True;
2933
2783
  }
2934
- if (size != 0)
2935
- {
2936
- memcpy(p->data, data, size);
2937
- p->rem -= size;
2938
- p->data += size;
2939
- }
2784
+ memcpy(p->data, data, size);
2785
+ p->rem -= size;
2786
+ p->data += size;
2940
2787
  return size;
2941
2788
  }
2942
2789
 
2943
2790
 
2944
- /*
2945
- UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle p)
2791
+ UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
2946
2792
  {
2947
- GET_const_CLzmaEnc_p
2793
+ const CLzmaEnc *p = (CLzmaEnc *)pp;
2948
2794
  return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
2949
2795
  }
2950
- */
2951
2796
 
2952
- const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle p)
2797
+
2798
+ const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
2953
2799
  {
2954
- // GET_const_CLzmaEnc_p
2800
+ const CLzmaEnc *p = (CLzmaEnc *)pp;
2955
2801
  return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
2956
2802
  }
2957
2803
 
2958
2804
 
2959
- // (desiredPackSize == 0) is not allowed
2960
- SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle p, BoolInt reInit,
2805
+ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
2961
2806
  Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
2962
2807
  {
2963
- // GET_CLzmaEnc_p
2808
+ CLzmaEnc *p = (CLzmaEnc *)pp;
2964
2809
  UInt64 nowPos64;
2965
2810
  SRes res;
2966
2811
  CLzmaEnc_SeqOutStreamBuf outStream;
@@ -2977,10 +2822,14 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle p, BoolInt reInit,
2977
2822
  if (reInit)
2978
2823
  LzmaEnc_Init(p);
2979
2824
  LzmaEnc_InitPrices(p);
2825
+
2826
+ nowPos64 = p->nowPos64;
2980
2827
  RangeEnc_Init(&p->rc);
2981
2828
  p->rc.outStream = &outStream.vt;
2982
- nowPos64 = p->nowPos64;
2983
-
2829
+
2830
+ if (desiredPackSize == 0)
2831
+ return SZ_ERROR_OUTPUT_EOF;
2832
+
2984
2833
  res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
2985
2834
 
2986
2835
  *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
@@ -2992,12 +2841,11 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle p, BoolInt reInit,
2992
2841
  }
2993
2842
 
2994
2843
 
2995
- Z7_NO_INLINE
2996
- static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgressPtr progress)
2844
+ static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
2997
2845
  {
2998
2846
  SRes res = SZ_OK;
2999
2847
 
3000
- #ifndef Z7_ST
2848
+ #ifndef _7ZIP_ST
3001
2849
  Byte allocaDummy[0x300];
3002
2850
  allocaDummy[0] = 0;
3003
2851
  allocaDummy[1] = allocaDummy[0];
@@ -3019,10 +2867,10 @@ static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgressPtr progress)
3019
2867
  }
3020
2868
  }
3021
2869
 
3022
- LzmaEnc_Finish((CLzmaEncHandle)(void *)p);
2870
+ LzmaEnc_Finish(p);
3023
2871
 
3024
2872
  /*
3025
- if (res == SZ_OK && !Inline_MatchFinder_IsFinishedOK(&MFB))
2873
+ if (res == SZ_OK && !Inline_MatchFinder_IsFinishedOK(&p->matchFinderBase))
3026
2874
  res = SZ_ERROR_FAIL;
3027
2875
  }
3028
2876
  */
@@ -3031,63 +2879,53 @@ static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgressPtr progress)
3031
2879
  }
3032
2880
 
3033
2881
 
3034
- SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStreamPtr outStream, ISeqInStreamPtr inStream, ICompressProgressPtr progress,
2882
+ SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress,
3035
2883
  ISzAllocPtr alloc, ISzAllocPtr allocBig)
3036
2884
  {
3037
- // GET_CLzmaEnc_p
3038
- RINOK(LzmaEnc_Prepare(p, outStream, inStream, alloc, allocBig))
3039
- return LzmaEnc_Encode2(p, progress);
2885
+ RINOK(LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig));
2886
+ return LzmaEnc_Encode2((CLzmaEnc *)pp, progress);
3040
2887
  }
3041
2888
 
3042
2889
 
3043
- SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *props, SizeT *size)
2890
+ SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
3044
2891
  {
2892
+ CLzmaEnc *p = (CLzmaEnc *)pp;
2893
+ unsigned i;
2894
+ UInt32 dictSize = p->dictSize;
3045
2895
  if (*size < LZMA_PROPS_SIZE)
3046
2896
  return SZ_ERROR_PARAM;
3047
2897
  *size = LZMA_PROPS_SIZE;
3048
- {
3049
- // GET_CLzmaEnc_p
3050
- const UInt32 dictSize = p->dictSize;
3051
- UInt32 v;
3052
- props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc);
3053
-
3054
- // we write aligned dictionary value to properties for lzma decoder
3055
- if (dictSize >= ((UInt32)1 << 21))
3056
- {
3057
- const UInt32 kDictMask = ((UInt32)1 << 20) - 1;
3058
- v = (dictSize + kDictMask) & ~kDictMask;
3059
- if (v < dictSize)
3060
- v = dictSize;
3061
- }
3062
- else
3063
- {
3064
- unsigned i = 11 * 2;
3065
- do
3066
- {
3067
- v = (UInt32)(2 + (i & 1)) << (i >> 1);
3068
- i++;
3069
- }
3070
- while (v < dictSize);
3071
- }
2898
+ props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc);
3072
2899
 
3073
- SetUi32(props + 1, v)
3074
- return SZ_OK;
2900
+ if (dictSize >= ((UInt32)1 << 22))
2901
+ {
2902
+ UInt32 kDictMask = ((UInt32)1 << 20) - 1;
2903
+ if (dictSize < (UInt32)0xFFFFFFFF - kDictMask)
2904
+ dictSize = (dictSize + kDictMask) & ~kDictMask;
3075
2905
  }
2906
+ else for (i = 11; i <= 30; i++)
2907
+ {
2908
+ if (dictSize <= ((UInt32)2 << i)) { dictSize = (2 << i); break; }
2909
+ if (dictSize <= ((UInt32)3 << i)) { dictSize = (3 << i); break; }
2910
+ }
2911
+
2912
+ for (i = 0; i < 4; i++)
2913
+ props[1 + i] = (Byte)(dictSize >> (8 * i));
2914
+ return SZ_OK;
3076
2915
  }
3077
2916
 
3078
2917
 
3079
- unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle p)
2918
+ unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle pp)
3080
2919
  {
3081
- // GET_CLzmaEnc_p
3082
- return (unsigned)p->writeEndMark;
2920
+ return ((CLzmaEnc *)pp)->writeEndMark;
3083
2921
  }
3084
2922
 
3085
2923
 
3086
- SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
3087
- int writeEndMark, ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
2924
+ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
2925
+ int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
3088
2926
  {
3089
2927
  SRes res;
3090
- // GET_CLzmaEnc_p
2928
+ CLzmaEnc *p = (CLzmaEnc *)pp;
3091
2929
 
3092
2930
  CLzmaEnc_SeqOutStreamBuf outStream;
3093
2931
 
@@ -3099,7 +2937,7 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte
3099
2937
  p->writeEndMark = writeEndMark;
3100
2938
  p->rc.outStream = &outStream.vt;
3101
2939
 
3102
- res = LzmaEnc_MemPrepare(p, src, srcLen, 0, alloc, allocBig);
2940
+ res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig);
3103
2941
 
3104
2942
  if (res == SZ_OK)
3105
2943
  {
@@ -3108,7 +2946,7 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte
3108
2946
  res = SZ_ERROR_FAIL;
3109
2947
  }
3110
2948
 
3111
- *destLen -= (SizeT)outStream.rem;
2949
+ *destLen -= outStream.rem;
3112
2950
  if (outStream.overflow)
3113
2951
  return SZ_ERROR_OUTPUT_EOF;
3114
2952
  return res;
@@ -3117,9 +2955,9 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte
3117
2955
 
3118
2956
  SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
3119
2957
  const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
3120
- ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
2958
+ ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
3121
2959
  {
3122
- CLzmaEncHandle p = LzmaEnc_Create(alloc);
2960
+ CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc);
3123
2961
  SRes res;
3124
2962
  if (!p)
3125
2963
  return SZ_ERROR_MEM;
@@ -3136,15 +2974,3 @@ SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
3136
2974
  LzmaEnc_Destroy(p, alloc, allocBig);
3137
2975
  return res;
3138
2976
  }
3139
-
3140
-
3141
- /*
3142
- #ifndef Z7_ST
3143
- void LzmaEnc_GetLzThreads(CLzmaEncHandle p, HANDLE lz_threads[2])
3144
- {
3145
- GET_const_CLzmaEnc_p
3146
- lz_threads[0] = p->matchFinderMt.hashSync.thread;
3147
- lz_threads[1] = p->matchFinderMt.btSync.thread;
3148
- }
3149
- #endif
3150
- */