react-native-update 10.34.3 → 10.34.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (800) 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/harmony/pushy/src/main/cpp/HDiffPatch/README_cn.md +0 -547
  627. package/harmony/pushy/src/main/cpp/HDiffPatch/_hextobytes.h +0 -112
  628. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +0 -389
  629. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +0 -73
  630. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +0 -266
  631. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +0 -58
  632. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +0 -1
  633. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +0 -1
  634. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/bzip2.vcxproj +0 -228
  635. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/hpatchz_test.vcxproj +0 -215
  636. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/libdeflate.vcxproj +0 -256
  637. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/longPathAware.exe.manifest +0 -7
  638. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/lzma.vcxproj +0 -271
  639. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/testHashClash.vcxproj +0 -228
  640. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zlib.vcxproj +0 -242
  641. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zstd.vcxproj +0 -287
  642. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
  643. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +0 -286
  644. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +0 -308
  645. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +0 -33
  646. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +0 -33
  647. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +0 -774
  648. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.c +0 -31
  649. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.h +0 -42
  650. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +0 -74
  651. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +0 -478
  652. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.h +0 -222
  653. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +0 -14
  654. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.cpp +0 -168
  655. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.h +0 -44
  656. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +0 -125
  657. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.c +0 -243
  658. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.h +0 -51
  659. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.c +0 -153
  660. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.h +0 -54
  661. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.c +0 -158
  662. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.h +0 -49
  663. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.c +0 -294
  664. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.h +0 -59
  665. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_patch_private_mt.h +0 -217
  666. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.c +0 -349
  667. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.h +0 -110
  668. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +0 -366
  669. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +0 -91
  670. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +0 -31
  671. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +0 -106
  672. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.c +0 -497
  673. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.h +0 -106
  674. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.cpp +0 -254
  675. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.h +0 -39
  676. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_sign_diff_type.h +0 -37
  677. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.cpp +0 -62
  678. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.h +0 -44
  679. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +0 -156
  680. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +0 -440
  681. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.h +0 -88
  682. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.cpp +0 -332
  683. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.h +0 -48
  684. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_types.h +0 -198
  685. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.cpp +0 -697
  686. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.h +0 -74
  687. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_private.h +0 -262
  688. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type.h +0 -174
  689. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +0 -174
  690. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +0 -252
  691. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.h +0 -67
  692. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +0 -680
  693. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.h +0 -137
  694. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +0 -83
  695. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +0 -125
  696. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.h +0 -56
  697. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +0 -55
  698. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.cpp +0 -147
  699. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.h +0 -38
  700. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +0 -354
  701. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.h +0 -76
  702. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.cpp +0 -521
  703. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.h +0 -69
  704. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +0 -122
  705. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_private.h +0 -66
  706. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type.h +0 -36
  707. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type_private.h +0 -81
  708. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.cpp +0 -247
  709. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.h +0 -71
  710. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.cpp +0 -351
  711. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.h +0 -42
  712. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.cpp +0 -124
  713. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.h +0 -38
  714. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.cpp +0 -203
  715. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.h +0 -55
  716. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.cpp +0 -79
  717. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.h +0 -66
  718. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +0 -628
  719. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +0 -95
  720. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +0 -78
  721. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +0 -950
  722. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +0 -72
  723. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/7zAsm.S +0 -181
  724. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/LzmaDecOpt.S +0 -1487
  725. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzFindOpt.asm +0 -540
  726. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sha256Opt.asm +0 -275
  727. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sort.asm +0 -860
  728. package/harmony/pushy/src/main/cpp/lzma/C/7zWindows.h +0 -101
  729. package/harmony/pushy/src/main/cpp/lzma/C/7zip_gcc_c.mak +0 -360
  730. package/harmony/pushy/src/main/cpp/lzma/C/Asm_c.mak +0 -12
  731. package/harmony/pushy/src/main/cpp/lzma/C/LzFindOpt.c +0 -578
  732. package/harmony/pushy/src/main/cpp/lzma/C/Sha256Opt.c +0 -451
  733. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.c +0 -835
  734. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.h +0 -17
  735. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/Precomp.h +0 -13
  736. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.c +0 -4
  737. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.h +0 -13
  738. package/harmony/pushy/src/main/cpp/lzma/C/var_clang.mak +0 -11
  739. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_arm64.mak +0 -12
  740. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x64.mak +0 -11
  741. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x86.mak +0 -11
  742. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc.mak +0 -12
  743. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_arm64.mak +0 -12
  744. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x64.mak +0 -10
  745. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x86.mak +0 -10
  746. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_arm64.mak +0 -11
  747. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_x64.mak +0 -11
  748. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang.mak +0 -1
  749. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang_mac.mak +0 -1
  750. package/harmony/pushy/src/main/cpp/lzma/C/warn_gcc.mak +0 -51
  751. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip_gcc.mak +0 -1370
  752. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +0 -279
  753. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +0 -215
  754. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.cpp +0 -855
  755. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.h +0 -160
  756. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzFindOpt.mak +0 -7
  757. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec_gcc.mak +0 -14
  758. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sha256.mak +0 -13
  759. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sort.mak +0 -6
  760. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile.gcc +0 -72
  761. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile.gcc +0 -187
  762. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +0 -218
  763. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.h +0 -48
  764. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +0 -13
  765. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/StdAfx.h +0 -67
  766. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +0 -23
  767. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang.mak +0 -3
  768. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_arm64.mak +0 -3
  769. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x64.mak +0 -3
  770. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x86.mak +0 -3
  771. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc.mak +0 -3
  772. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_arm64.mak +0 -3
  773. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x64.mak +0 -3
  774. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x86.mak +0 -3
  775. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_arm64.mak +0 -3
  776. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_x64.mak +0 -3
  777. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang.mak +0 -11
  778. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_arm64.mak +0 -19
  779. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x64.mak +0 -11
  780. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x86.mak +0 -11
  781. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc.mak +0 -12
  782. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_arm64.mak +0 -12
  783. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x64.mak +0 -11
  784. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x86.mak +0 -10
  785. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_arm64.mak +0 -13
  786. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_x64.mak +0 -11
  787. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang.mak +0 -3
  788. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang_mac.mak +0 -9
  789. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_gcc.mak +0 -55
  790. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common0.h +0 -330
  791. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.cpp +0 -93
  792. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.h +0 -41
  793. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/LzFindPrepare.cpp +0 -7
  794. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Prepare.cpp +0 -7
  795. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.cpp +0 -130
  796. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.h +0 -28
  797. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.cpp +0 -36
  798. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.h +0 -55
  799. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.cpp +0 -1251
  800. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.h +0 -19
@@ -4,8 +4,6 @@
4
4
 
5
5
  #include "../../../../C/CpuArch.h"
6
6
 
7
- #include "../../../Common/MyLinux.h"
8
- #include "../../../Common/StringToInt.h"
9
7
  #include "../../../Common/Wildcard.h"
10
8
 
11
9
  #include "../../Common/CreateCoder.h"
@@ -26,43 +24,24 @@
26
24
  namespace NArchive {
27
25
  namespace N7z {
28
26
 
27
+
29
28
  #define k_X86 k_BCJ
30
29
 
31
30
  struct CFilterMode
32
31
  {
33
32
  UInt32 Id;
34
- UInt32 Delta; // required File Size alignment, if Id is not k_Delta.
35
- // (Delta == 0) means unknown alignment
36
- UInt32 Offset; // for k_ARM64 / k_RISCV
37
- // UInt32 AlignSizeOpt; // for k_ARM64
38
-
39
- CFilterMode():
40
- Id(0),
41
- Delta(0),
42
- Offset(0)
43
- // , AlignSizeOpt(0)
44
- {}
45
-
46
- void ClearFilterMode()
47
- {
48
- Id = 0;
49
- Delta = 0;
50
- Offset = 0;
51
- // AlignSizeOpt = 0;
52
- }
33
+ UInt32 Delta;
34
+
35
+ CFilterMode(): Id(0), Delta(0) {}
53
36
 
54
- // it sets Delta as Align value, if Id is exe filter
55
- // in another cases it sets Delta = 0, that
56
37
  void SetDelta()
57
38
  {
58
39
  if (Id == k_IA64)
59
40
  Delta = 16;
60
- else if (Id == k_ARM64 || Id == k_ARM || Id == k_PPC || Id == k_SPARC)
41
+ else if (Id == k_ARM || Id == k_PPC || Id == k_SPARC)
61
42
  Delta = 4;
62
- else if (Id == k_ARMT || Id == k_RISCV)
43
+ else if (Id == k_ARMT)
63
44
  Delta = 2;
64
- else if (Id == k_BCJ || Id == k_BCJ2)
65
- Delta = 1; // do we need it?
66
45
  else
67
46
  Delta = 0;
68
47
  }
@@ -76,8 +55,8 @@ struct CFilterMode
76
55
  #define PE_SIG 0x00004550
77
56
  #define PE_OptHeader_Magic_32 0x10B
78
57
  #define PE_OptHeader_Magic_64 0x20B
79
- // #define PE_SectHeaderSize 40
80
- // #define PE_SECT_EXECUTE 0x20000000
58
+ #define PE_SectHeaderSize 40
59
+ #define PE_SECT_EXECUTE 0x20000000
81
60
 
82
61
  static int Parse_EXE(const Byte *buf, size_t size, CFilterMode *filterMode)
83
62
  {
@@ -95,13 +74,10 @@ static int Parse_EXE(const Byte *buf, size_t size, CFilterMode *filterMode)
95
74
  return 0;
96
75
  p += 4;
97
76
 
98
- const unsigned machine = GetUi16(p);
99
-
100
- switch (machine)
77
+ switch (GetUi16(p))
101
78
  {
102
79
  case 0x014C:
103
80
  case 0x8664: filterId = k_X86; break;
104
- case 0xAA64: filterId = k_ARM64; break;
105
81
 
106
82
  /*
107
83
  IMAGE_FILE_MACHINE_ARM 0x01C0 // ARM LE
@@ -114,16 +90,10 @@ static int Parse_EXE(const Byte *buf, size_t size, CFilterMode *filterMode)
114
90
  case 0x01C2: filterId = k_ARM; break; // WinCE new
115
91
  case 0x01C4: filterId = k_ARMT; break; // WinRT
116
92
 
117
- case 0x5032: // RISCV32
118
- case 0x5064: // RISCV64
119
- // case 0x5128: // RISCV128
120
- filterId = k_RISCV; break;
121
-
122
93
  case 0x0200: filterId = k_IA64; break;
123
94
  default: return 0;
124
95
  }
125
96
 
126
- const UInt32 numSections = GetUi16(p + 2);
127
97
  optHeaderSize = GetUi16(p + 16);
128
98
  if (optHeaderSize > (1 << 10))
129
99
  return 0;
@@ -139,94 +109,11 @@ static int Parse_EXE(const Byte *buf, size_t size, CFilterMode *filterMode)
139
109
  return 0;
140
110
  }
141
111
 
142
- // Windows exe file sizes are not aligned for 4 KiB.
143
- // So we can't use (CFilterMode::Offset != 0) in solid archives.
144
- // So we just don't set Offset here.
145
- #define NUM_SCAN_SECTIONS_MAX (1 << 6)
146
- // #define EXE_SECTION_OFFSET_MAX (1 << 27)
147
- // #define EXE_SECTION_SIZE_MIN (1 << 8)
148
- // #define EXE_SECTION_SIZE_MAX (1 << 27)
149
- #define PE_SectHeaderSize 40
150
- // #define PE_SECT_EXECUTE 0x20000000
151
-
152
- /*
153
- if (numSections > NUM_SCAN_SECTIONS_MAX)
154
- return 0;
155
- */
156
-
157
- if ((size_t)(p - buf) + optHeaderSize <= size)
158
- {
159
- p += optHeaderSize;
160
- /*
161
- // UInt32 numExeSections = 0;
162
- // bool execute_finded = false;
163
- // UInt32 sect_va = 0;
164
- // UInt32 sect_size = 0;
165
- // UInt32 sect_offset = 0;
166
- */
167
- if (numSections <= NUM_SCAN_SECTIONS_MAX)
168
- if (machine == 0x8664)
169
- for (UInt32 i = 0; i < numSections
170
- ; i++, p += PE_SectHeaderSize)
171
- {
172
- // UInt32 characts, rawSize, offset;
173
- if ((UInt32)(p - buf) + PE_SectHeaderSize > size)
174
- {
175
- // return 0;
176
- break;
177
- }
178
- if (memcmp(p, ".a64xrm", 8) == 0)
179
- {
180
- // ARM64EC
181
- filterId = k_ARM64;
182
- break;
183
- }
184
- /*
185
- rawSize = GetUi32(p + 16);
186
- offset = GetUi32(p + 20);
187
- characts = GetUi32(p + 36);
188
- if (rawSize >= EXE_SECTION_SIZE_MIN &&
189
- rawSize <= EXE_SECTION_SIZE_MAX &&
190
- offset <= EXE_SECTION_OFFSET_MAX &&
191
- // offset < limit &&
192
- offset > 0)
193
- {
194
- if ((characts & PE_SECT_EXECUTE) != 0)
195
- {
196
- // execute_finded = true;
197
- // sect_va = GetUi32(p + 12);
198
- // sect_size = rawSize;
199
- // sect_offset = offset;
200
- break;
201
- }
202
- }
203
- */
204
- }
205
- }
206
-
207
- /*
208
- filterMode->Offset = 0;
209
- if (filterId == k_ARM64)
210
- {
211
- // filterMode->AlignSizeOpt = (1 << 12);
212
- // const UInt32 offs = (sect_va - sect_offset) & 0xFFF;
213
- // if (offs != 0)
214
- // filterMode->Offset = offs; // change it
215
- }
216
- */
217
112
  filterMode->Id = filterId;
218
113
  return 1;
219
114
  }
220
115
 
221
116
 
222
- /*
223
- Filters don't improve the compression ratio for relocatable object files (".o").
224
- But we can get compression ratio gain, if we compress object
225
- files and executables in same solid block.
226
- So we use filters for relocatable object files (".o"):
227
- */
228
- // #define Z7_7Z_CREATE_ARC_DISABLE_FILTER_FOR_OBJ
229
-
230
117
  /* ---------- ELF ---------- */
231
118
 
232
119
  #define ELF_SIG 0x464C457F
@@ -266,12 +153,6 @@ static int Parse_ELF(const Byte *buf, size_t size, CFilterMode *filterMode)
266
153
  default: return 0;
267
154
  }
268
155
 
269
- #ifdef Z7_7Z_CREATE_ARC_DISABLE_FILTER_FOR_OBJ
270
- #define ELF_ET_REL 1
271
- if (Get16(buf + 0x10, be) == ELF_ET_REL)
272
- return 0;
273
- #endif
274
-
275
156
  switch (Get16(buf + 0x12, be))
276
157
  {
277
158
  case 3:
@@ -282,11 +163,9 @@ static int Parse_ELF(const Byte *buf, size_t size, CFilterMode *filterMode)
282
163
  case 43: filterId = k_SPARC; break;
283
164
  case 20:
284
165
  case 21: if (!be) return 0; filterId = k_PPC; break;
285
- case 40: if (be) return 0; filterId = k_ARM; break;
286
- case 183: if (be) return 0; filterId = k_ARM64; break;
287
- case 243: if (be) return 0; filterId = k_RISCV; break;
288
-
289
- /* Some IA-64 ELF executables have size that is not aligned for 16 bytes.
166
+ case 40: if ( be) return 0; filterId = k_ARM; break;
167
+
168
+ /* Some IA-64 ELF exacutable have size that is not aligned for 16 bytes.
290
169
  So we don't use IA-64 filter for IA-64 ELF */
291
170
  // case 50: if ( be) return 0; filterId = k_IA64; break;
292
171
 
@@ -313,7 +192,6 @@ static int Parse_ELF(const Byte *buf, size_t size, CFilterMode *filterMode)
313
192
  #define MACH_MACHINE_PPC 18
314
193
  #define MACH_MACHINE_PPC64 (MACH_ARCH_ABI64 | MACH_MACHINE_PPC)
315
194
  #define MACH_MACHINE_AMD64 (MACH_ARCH_ABI64 | MACH_MACHINE_386)
316
- #define MACH_MACHINE_ARM64 (MACH_ARCH_ABI64 | MACH_MACHINE_ARM)
317
195
 
318
196
  static unsigned Parse_MACH(const Byte *buf, size_t size, CFilterMode *filterMode)
319
197
  {
@@ -332,12 +210,6 @@ static unsigned Parse_MACH(const Byte *buf, size_t size, CFilterMode *filterMode
332
210
  default: return 0;
333
211
  }
334
212
 
335
- #ifdef Z7_7Z_CREATE_ARC_DISABLE_FILTER_FOR_OBJ
336
- #define MACH_TYPE_OBJECT 1
337
- if (Get32(buf + 0xC, be) == MACH_TYPE_OBJECT)
338
- return 0;
339
- #endif
340
-
341
213
  switch (Get32(buf + 4, be))
342
214
  {
343
215
  case MACH_MACHINE_386:
@@ -346,7 +218,6 @@ static unsigned Parse_MACH(const Byte *buf, size_t size, CFilterMode *filterMode
346
218
  case MACH_MACHINE_SPARC: if (!be) return 0; filterId = k_SPARC; break;
347
219
  case MACH_MACHINE_PPC:
348
220
  case MACH_MACHINE_PPC64: if (!be) return 0; filterId = k_PPC; break;
349
- case MACH_MACHINE_ARM64: if ( be) return 0; filterId = k_ARM64; break;
350
221
  default: return 0;
351
222
  }
352
223
 
@@ -383,12 +254,10 @@ static BoolInt Parse_WAV(const Byte *buf, size_t size, CFilterMode *filterMode)
383
254
  if (subChunkSize < 0x10 || subChunkSize > 0x12 || GetUi16(buf + 0x14) != 1)
384
255
  return False;
385
256
 
386
- const unsigned numChannels = GetUi16(buf + 0x16);
387
- const unsigned bitsPerSample = GetUi16(buf + 0x22);
388
- if ((bitsPerSample & 0x7) != 0)
389
- return False;
390
- const UInt32 delta = (UInt32)numChannels * (bitsPerSample >> 3);
391
- if (delta == 0 || delta > 256)
257
+ unsigned numChannels = GetUi16(buf + 0x16);
258
+ unsigned bitsPerSample = GetUi16(buf + 0x22);
259
+
260
+ if ((bitsPerSample & 0x7) != 0 || bitsPerSample >= 256 || numChannels >= 256)
392
261
  return False;
393
262
 
394
263
  pos = 0x14 + subChunkSize;
@@ -402,6 +271,9 @@ static BoolInt Parse_WAV(const Byte *buf, size_t size, CFilterMode *filterMode)
402
271
  subChunkSize = GetUi32(buf + pos + 4);
403
272
  if (GetUi32(buf + pos) == WAV_SUBCHUNK_data)
404
273
  {
274
+ unsigned delta = numChannels * (bitsPerSample >> 3);
275
+ if (delta >= 256)
276
+ return False;
405
277
  filterMode->Id = k_Delta;
406
278
  filterMode->Delta = delta;
407
279
  return True;
@@ -413,15 +285,10 @@ static BoolInt Parse_WAV(const Byte *buf, size_t size, CFilterMode *filterMode)
413
285
  return False;
414
286
  }
415
287
 
416
-
417
- /*
418
- filterMode->Delta will be set as:
419
- = delta value : [1, 256] : for k_Delta
420
- = 0 for another filters (branch filters)
421
- */
422
288
  static BoolInt ParseFile(const Byte *buf, size_t size, CFilterMode *filterMode)
423
289
  {
424
- filterMode->ClearFilterMode();
290
+ filterMode->Id = 0;
291
+ filterMode->Delta = 0;
425
292
 
426
293
  if (Parse_EXE(buf, size, filterMode)) return True;
427
294
  if (Parse_ELF(buf, size, filterMode)) return True;
@@ -449,44 +316,18 @@ struct CFilterMode2: public CFilterMode
449
316
  else if (!m.Encrypted)
450
317
  return 1;
451
318
 
452
- const UInt32 id1 = Id;
453
- const UInt32 id2 = m.Id;
454
- /*
455
- // we can change the order to place k_ARM64 files close to another exe files
456
- if (id1 <= k_SPARC &&
457
- id2 <= k_SPARC)
458
- {
459
- #define k_ARM64_FOR_SORT 0x3030901
460
- if (id1 == k_ARM64) id1 = k_ARM64_FOR_SORT;
461
- if (id2 == k_ARM64) id2 = k_ARM64_FOR_SORT;
462
- }
463
- */
464
- if (id1 < id2) return -1;
465
- if (id1 > id2) return 1;
319
+ if (Id < m.Id) return -1;
320
+ if (Id > m.Id) return 1;
466
321
 
467
322
  if (Delta < m.Delta) return -1;
468
323
  if (Delta > m.Delta) return 1;
469
324
 
470
- if (Offset < m.Offset) return -1;
471
- if (Offset > m.Offset) return 1;
472
-
473
- /* we don't go here, because GetGroup()
474
- and operator ==(const CFilterMode2 &m)
475
- add only unique CFilterMode2:: { Id, Delta, Offset, Encrypted } items.
476
- */
477
- /*
478
- if (GroupIndex < m.GroupIndex) return -1;
479
- if (GroupIndex > m.GroupIndex) return 1;
480
- */
481
325
  return 0;
482
326
  }
483
327
 
484
328
  bool operator ==(const CFilterMode2 &m) const
485
329
  {
486
- return Id == m.Id
487
- && Delta == m.Delta
488
- && Offset == m.Offset
489
- && Encrypted == m.Encrypted;
330
+ return Id == m.Id && Delta == m.Delta && Encrypted == m.Encrypted;
490
331
  }
491
332
  };
492
333
 
@@ -527,8 +368,6 @@ static inline bool IsExeFilter(CMethodId m)
527
368
  {
528
369
  switch (m)
529
370
  {
530
- case k_ARM64:
531
- case k_RISCV:
532
371
  case k_BCJ:
533
372
  case k_BCJ2:
534
373
  case k_ARM:
@@ -537,7 +376,6 @@ static inline bool IsExeFilter(CMethodId m)
537
376
  case k_SPARC:
538
377
  case k_IA64:
539
378
  return true;
540
- default: break;
541
379
  }
542
380
  return false;
543
381
  }
@@ -546,9 +384,8 @@ static unsigned Get_FilterGroup_for_Folder(
546
384
  CRecordVector<CFilterMode2> &filters, const CFolderEx &f, bool extractFilter)
547
385
  {
548
386
  CFilterMode2 m;
549
- // m.Id = 0;
550
- // m.Delta = 0;
551
- // m.Offset = 0;
387
+ m.Id = 0;
388
+ m.Delta = 0;
552
389
  m.Encrypted = f.IsEncrypted();
553
390
 
554
391
  if (extractFilter)
@@ -569,10 +406,6 @@ static unsigned Get_FilterGroup_for_Folder(
569
406
  if (m.Id == k_BCJ2)
570
407
  m.Id = k_BCJ;
571
408
  m.SetDelta();
572
- if (m.Id == k_ARM64 ||
573
- m.Id == k_RISCV)
574
- if (coder.Props.Size() == 4)
575
- m.Offset = GetUi32(coder.Props);
576
409
  }
577
410
  }
578
411
 
@@ -585,13 +418,16 @@ static unsigned Get_FilterGroup_for_Folder(
585
418
  static HRESULT WriteRange(IInStream *inStream, ISequentialOutStream *outStream,
586
419
  UInt64 position, UInt64 size, ICompressProgressInfo *progress)
587
420
  {
588
- RINOK(InStream_SeekSet(inStream, position))
589
- CMyComPtr2_Create<ISequentialInStream, CLimitedSequentialInStream> streamSpec;
421
+ RINOK(inStream->Seek(position, STREAM_SEEK_SET, 0));
422
+ CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream;
423
+ CMyComPtr<CLimitedSequentialInStream> inStreamLimited(streamSpec);
590
424
  streamSpec->SetStream(inStream);
591
425
  streamSpec->Init(size);
592
- CMyComPtr2_Create<ICompressCoder, NCompress::CCopyCoder> copyCoder;
593
- RINOK(copyCoder.Interface()->Code(streamSpec, outStream, NULL, NULL, progress))
594
- return (copyCoder->TotalSize == size ? S_OK : E_FAIL);
426
+
427
+ NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder;
428
+ CMyComPtr<ICompressCoder> copyCoder = copyCoderSpec;
429
+ RINOK(copyCoder->Code(inStreamLimited, outStream, NULL, NULL, progress));
430
+ return (copyCoderSpec->TotalSize == size ? S_OK : E_FAIL);
595
431
  }
596
432
 
597
433
  /*
@@ -610,7 +446,7 @@ UString CUpdateItem::GetExtension() const
610
446
  }
611
447
  */
612
448
 
613
- #define RINOZ(x) { const int _t_ = (x); if (_t_ != 0) return _t_; }
449
+ #define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; }
614
450
 
615
451
  #define RINOZ_COMP(a, b) RINOZ(MyCompare(a, b))
616
452
 
@@ -795,7 +631,7 @@ struct CRefItem
795
631
  unsigned NamePos;
796
632
  unsigned ExtensionIndex;
797
633
 
798
- CRefItem() {}
634
+ CRefItem() {};
799
635
  CRefItem(UInt32 index, const CUpdateItem &ui, bool sortByType):
800
636
  UpdateItem(&ui),
801
637
  Index(index),
@@ -805,20 +641,20 @@ struct CRefItem
805
641
  {
806
642
  if (sortByType)
807
643
  {
808
- const int slashPos = ui.Name.ReverseFind_PathSepar();
809
- NamePos = (unsigned)(slashPos + 1);
810
- const int dotPos = ui.Name.ReverseFind_Dot();
644
+ int slashPos = ui.Name.ReverseFind_PathSepar();
645
+ NamePos = slashPos + 1;
646
+ int dotPos = ui.Name.ReverseFind_Dot();
811
647
  if (dotPos <= slashPos)
812
648
  ExtensionPos = ui.Name.Len();
813
649
  else
814
650
  {
815
- ExtensionPos = (unsigned)(dotPos + 1);
651
+ ExtensionPos = dotPos + 1;
816
652
  if (ExtensionPos != ui.Name.Len())
817
653
  {
818
654
  AString s;
819
655
  for (unsigned pos = ExtensionPos;; pos++)
820
656
  {
821
- const wchar_t c = ui.Name[pos];
657
+ wchar_t c = ui.Name[pos];
822
658
  if (c >= 0x80)
823
659
  break;
824
660
  if (c == 0)
@@ -826,7 +662,7 @@ struct CRefItem
826
662
  ExtensionIndex = GetExtIndex(s);
827
663
  break;
828
664
  }
829
- s.Add_Char((char)MyCharLower_Ascii((char)c));
665
+ s += (char)MyCharLower_Ascii((char)c);
830
666
  }
831
667
  }
832
668
  }
@@ -875,16 +711,16 @@ static int CompareUpdateItems(const CRefItem *p1, const CRefItem *p2, void *para
875
711
 
876
712
  // bool sortByType = *(bool *)param;
877
713
  const CSortParam *sortParam = (const CSortParam *)param;
878
- const bool sortByType = sortParam->SortByType;
714
+ bool sortByType = sortParam->SortByType;
879
715
  if (sortByType)
880
716
  {
881
- RINOZ_COMP(a1.ExtensionIndex, a2.ExtensionIndex)
882
- RINOZ(CompareFileNames(u1.Name.Ptr(a1.ExtensionPos), u2.Name.Ptr(a2.ExtensionPos)))
883
- RINOZ(CompareFileNames(u1.Name.Ptr(a1.NamePos), u2.Name.Ptr(a2.NamePos)))
717
+ RINOZ_COMP(a1.ExtensionIndex, a2.ExtensionIndex);
718
+ RINOZ(CompareFileNames(u1.Name.Ptr(a1.ExtensionPos), u2.Name.Ptr(a2.ExtensionPos)));
719
+ RINOZ(CompareFileNames(u1.Name.Ptr(a1.NamePos), u2.Name.Ptr(a2.NamePos)));
884
720
  if (!u1.MTimeDefined && u2.MTimeDefined) return 1;
885
721
  if (u1.MTimeDefined && !u2.MTimeDefined) return -1;
886
- if (u1.MTimeDefined && u2.MTimeDefined) RINOZ_COMP(u1.MTime, u2.MTime)
887
- RINOZ_COMP(u1.Size, u2.Size)
722
+ if (u1.MTimeDefined && u2.MTimeDefined) RINOZ_COMP(u1.MTime, u2.MTime);
723
+ RINOZ_COMP(u1.Size, u2.Size);
888
724
  }
889
725
  /*
890
726
  int par1 = a1.UpdateItem->ParentFolderIndex;
@@ -930,9 +766,9 @@ static int CompareUpdateItems(const CRefItem *p1, const CRefItem *p2, void *para
930
766
  }
931
767
  */
932
768
  // RINOZ_COMP(a1.UpdateItem->ParentSortIndex, a2.UpdateItem->ParentSortIndex);
933
- RINOK(CompareFileNames(u1.Name, u2.Name))
934
- RINOZ_COMP(a1.UpdateItem->IndexInClient, a2.UpdateItem->IndexInClient)
935
- RINOZ_COMP(a1.UpdateItem->IndexInArchive, a2.UpdateItem->IndexInArchive)
769
+ RINOK(CompareFileNames(u1.Name, u2.Name));
770
+ RINOZ_COMP(a1.UpdateItem->IndexInClient, a2.UpdateItem->IndexInClient);
771
+ RINOZ_COMP(a1.UpdateItem->IndexInArchive, a2.UpdateItem->IndexInArchive);
936
772
  return 0;
937
773
  }
938
774
 
@@ -943,7 +779,7 @@ struct CSolidGroup
943
779
  CRecordVector<CFolderRepack> folderRefs;
944
780
  };
945
781
 
946
- static const char * const g_Exe_Exts[] =
782
+ static const char * const g_ExeExts[] =
947
783
  {
948
784
  "dll"
949
785
  , "exe"
@@ -952,64 +788,13 @@ static const char * const g_Exe_Exts[] =
952
788
  , "sys"
953
789
  };
954
790
 
955
- static const char * const g_ExeUnix_Exts[] =
791
+ static bool IsExeExt(const wchar_t *ext)
956
792
  {
957
- "so"
958
- , "dylib"
959
- };
960
-
961
- static bool IsExt_Exe(const wchar_t *ext)
962
- {
963
- for (unsigned i = 0; i < Z7_ARRAY_SIZE(g_Exe_Exts); i++)
964
- if (StringsAreEqualNoCase_Ascii(ext, g_Exe_Exts[i]))
965
- return true;
966
- return false;
967
- }
968
-
969
- /*
970
- static bool IsExt_ExeUnix(const wchar_t *ext)
971
- {
972
- for (unsigned i = 0; i < Z7_ARRAY_SIZE(g_ExeUnix_Exts); i++)
973
- if (StringsAreEqualNoCase_Ascii(ext, g_ExeUnix_Exts[i]))
793
+ for (unsigned i = 0; i < ARRAY_SIZE(g_ExeExts); i++)
794
+ if (StringsAreEqualNoCase_Ascii(ext, g_ExeExts[i]))
974
795
  return true;
975
796
  return false;
976
797
  }
977
- */
978
-
979
- // we try to find "so" extension in such name: libstdc++.so.6.0.29
980
- static bool IsExt_ExeUnix_NumericAllowed(const UString &path)
981
- {
982
- unsigned pos = path.Len();
983
- unsigned dotPos = pos;
984
- for (;;)
985
- {
986
- if (pos == 0)
987
- return false;
988
- const wchar_t c = path[--pos];
989
- if (IS_PATH_SEPAR(c))
990
- return false;
991
- if (c == '.')
992
- {
993
- const unsigned num = (dotPos - pos) - 1;
994
- if (num < 1)
995
- return false;
996
- const wchar_t *cur = path.Ptr(pos + 1);
997
- for (unsigned i = 0; i < Z7_ARRAY_SIZE(g_ExeUnix_Exts); i++)
998
- {
999
- const char *ext = g_ExeUnix_Exts[i];
1000
- if (num == MyStringLen(ext))
1001
- if (IsString1PrefixedByString2_NoCase_Ascii(cur, ext))
1002
- return true;
1003
- }
1004
- const wchar_t *end;
1005
- ConvertStringToUInt32(cur, &end);
1006
- if ((size_t)(end - cur) != num)
1007
- return false;
1008
- dotPos = pos;
1009
- }
1010
- }
1011
- }
1012
-
1013
798
 
1014
799
  struct CAnalysis
1015
800
  {
@@ -1018,26 +803,12 @@ struct CAnalysis
1018
803
 
1019
804
  bool ParseWav;
1020
805
  bool ParseExe;
1021
- bool ParseExeUnix;
1022
- bool ParseNoExt;
1023
806
  bool ParseAll;
1024
807
 
1025
- /*
1026
- bool Need_ATime;
1027
- bool ATime_Defined;
1028
- FILETIME ATime;
1029
- */
1030
-
1031
808
  CAnalysis():
1032
- ParseWav(false),
809
+ ParseWav(true),
1033
810
  ParseExe(false),
1034
- ParseExeUnix(false),
1035
- ParseNoExt(false),
1036
811
  ParseAll(false)
1037
- /*
1038
- , Need_ATime(false)
1039
- , ATime_Defined(false)
1040
- */
1041
812
  {}
1042
813
 
1043
814
  HRESULT GetFilterGroup(UInt32 index, const CUpdateItem &ui, CFilterMode &filterMode);
@@ -1049,46 +820,32 @@ HRESULT CAnalysis::GetFilterGroup(UInt32 index, const CUpdateItem &ui, CFilterMo
1049
820
  {
1050
821
  filterMode.Id = 0;
1051
822
  filterMode.Delta = 0;
1052
- filterMode.Offset = 0;
1053
823
 
1054
824
  CFilterMode filterModeTemp = filterMode;
1055
825
 
1056
- const int slashPos = ui.Name.ReverseFind_PathSepar();
1057
- const int dotPos = ui.Name.ReverseFind_Dot();
826
+ int slashPos = ui.Name.ReverseFind_PathSepar();
827
+ int dotPos = ui.Name.ReverseFind_Dot();
1058
828
 
1059
829
  // if (dotPos > slashPos)
1060
830
  {
1061
831
  bool needReadFile = ParseAll;
1062
- /* if (Callback) is not supported by client,
1063
- we still try to use file name extension to detect executable file */
832
+
1064
833
  bool probablyIsSameIsa = false;
1065
834
 
1066
835
  if (!needReadFile || !Callback)
1067
836
  {
1068
- const wchar_t *ext = NULL;
837
+ const wchar_t *ext;
1069
838
  if (dotPos > slashPos)
1070
- ext = ui.Name.Ptr((unsigned)(dotPos + 1));
1071
- // 7-zip stores posix attributes in high 16 bits and sets (0x8000) flag
839
+ ext = ui.Name.Ptr(dotPos + 1);
840
+ else
841
+ ext = ui.Name.RightPtr(0);
842
+
843
+ // p7zip uses the trick to store posix attributes in high 16 bits
1072
844
  if (ui.Attrib & 0x8000)
1073
845
  {
1074
- const unsigned st_mode = ui.Attrib >> 16;
1075
- /* note: executable ".so" can be without execute permission,
1076
- and symbolic link to such ".so" file is possible */
1077
- // st_mode = 00111; // for debug
1078
- /* in Linux we expect such permissions:
1079
- 0755 : for most executables
1080
- 0644 : for some ".so" files
1081
- 0777 : in WSL for all files.
1082
- We can try to exclude some such 0777 cases from analysis,
1083
- if there is non-executable extension.
1084
- */
1085
-
1086
- if ((st_mode & (
1087
- MY_LIN_S_IXUSR |
1088
- MY_LIN_S_IXGRP |
1089
- MY_LIN_S_IXOTH)) != 0
1090
- && MY_LIN_S_ISREG(st_mode)
1091
- && (ui.Size >= (1u << 11)))
846
+ unsigned st_mode = ui.Attrib >> 16;
847
+ // st_mode = 00111;
848
+ if ((st_mode & 00111) && (ui.Size >= 2048))
1092
849
  {
1093
850
  #ifndef _WIN32
1094
851
  probablyIsSameIsa = true;
@@ -1097,120 +854,73 @@ HRESULT CAnalysis::GetFilterGroup(UInt32 index, const CUpdateItem &ui, CFilterMo
1097
854
  }
1098
855
  }
1099
856
 
1100
- if (!needReadFile)
857
+ if (IsExeExt(ext))
1101
858
  {
1102
- if (!ext)
1103
- needReadFile = ParseNoExt;
1104
- else
1105
- {
1106
- bool isUnixExt = false;
1107
- if (ParseExeUnix)
1108
- isUnixExt = IsExt_ExeUnix_NumericAllowed(ui.Name);
1109
- if (isUnixExt)
1110
- {
1111
- needReadFile = true;
1112
- #ifndef _WIN32
1113
- probablyIsSameIsa = true;
1114
- #endif
1115
- }
1116
- else if (IsExt_Exe(ext))
1117
- {
1118
- needReadFile = ParseExe;
1119
- #ifdef _WIN32
1120
- probablyIsSameIsa = true;
1121
- #endif
1122
- }
1123
- else if (StringsAreEqualNoCase_Ascii(ext, "wav"))
1124
- {
1125
- if (!needReadFile)
1126
- needReadFile = ParseWav;
1127
- }
1128
- }
859
+ needReadFile = true;
860
+ #ifdef _WIN32
861
+ probablyIsSameIsa = true;
862
+ needReadFile = ParseExe;
863
+ #endif
864
+ }
865
+ else if (StringsAreEqualNoCase_Ascii(ext, "wav"))
866
+ {
867
+ needReadFile = ParseWav;
1129
868
  }
869
+ /*
870
+ else if (!needReadFile && ParseUnixExt)
871
+ {
872
+ if (StringsAreEqualNoCase_Ascii(ext, "so")
873
+ || StringsAreEqualNoCase_Ascii(ext, ""))
874
+
875
+ needReadFile = true;
876
+ }
877
+ */
1130
878
  }
1131
879
 
1132
- if (needReadFile)
880
+ if (needReadFile && Callback)
1133
881
  {
1134
- BoolInt parseRes = false;
1135
- if (Callback)
882
+ if (Buffer.Size() != kAnalysisBufSize)
883
+ {
884
+ Buffer.Alloc(kAnalysisBufSize);
885
+ }
1136
886
  {
1137
- if (Buffer.Size() != kAnalysisBufSize)
1138
- Buffer.Alloc(kAnalysisBufSize);
1139
887
  CMyComPtr<ISequentialInStream> stream;
1140
888
  HRESULT result = Callback->GetStream2(index, &stream, NUpdateNotifyOp::kAnalyze);
1141
889
  if (result == S_OK && stream)
1142
890
  {
1143
- /*
1144
- if (Need_ATime)
1145
- {
1146
- // access time could be changed in analysis pass
1147
- CMyComPtr<IStreamGetProps> getProps;
1148
- stream.QueryInterface(IID_IStreamGetProps, (void **)&getProps);
1149
- if (getProps)
1150
- if (getProps->GetProps(NULL, NULL, &ATime, NULL, NULL) == S_OK)
1151
- ATime_Defined = true;
1152
- }
1153
- */
1154
891
  size_t size = kAnalysisBufSize;
1155
892
  result = ReadStream(stream, Buffer, &size);
1156
893
  stream.Release();
1157
894
  // RINOK(Callback->SetOperationResult2(index, NUpdate::NOperationResult::kOK));
1158
895
  if (result == S_OK)
1159
896
  {
1160
- parseRes = ParseFile(Buffer, size, &filterModeTemp);
1161
- }
1162
- }
1163
- } // Callback
1164
- else if (probablyIsSameIsa)
1165
- {
1166
- #ifdef MY_CPU_X86_OR_AMD64
1167
- filterModeTemp.Id = k_X86;
1168
- #endif
1169
- #ifdef MY_CPU_ARM64
1170
- filterModeTemp.Id = k_ARM64;
1171
- #endif
1172
- #ifdef MY_CPU_RISCV
1173
- filterModeTemp.Id = k_RISCV;
1174
- #endif
1175
- #ifdef MY_CPU_SPARC
1176
- filterModeTemp.Id = k_SPARC;
1177
- #endif
1178
- parseRes = true;
1179
- }
1180
-
1181
- if (parseRes
1182
- && filterModeTemp.Id != k_Delta
1183
- && filterModeTemp.Delta == 0)
1184
- {
1185
- /* ParseFile() sets (filterModeTemp.Delta == 0) for all
1186
- methods except of k_Delta. */
1187
- // it's not k_Delta
1188
- // So we call SetDelta() to set Delta
1189
- filterModeTemp.SetDelta();
1190
- if (filterModeTemp.Delta > 1)
1191
- {
1192
- /* If file Size is not aligned, then branch filter
1193
- will not work for next file in solid block.
1194
- Maybe we should allow filter for non-aligned-size file in non-solid archives ?
1195
- */
1196
- if (ui.Size % filterModeTemp.Delta != 0)
1197
- parseRes = false;
1198
- // windows exe files are not aligned for 4 KiB.
1199
- /*
1200
- else if (filterModeTemp.Id == k_ARM64 && filterModeTemp.Offset != 0)
1201
- {
1202
- if (ui.Size % (1 << 12) != 0)
897
+ BoolInt parseRes = ParseFile(Buffer, size, &filterModeTemp);
898
+ if (parseRes && filterModeTemp.Delta == 0)
1203
899
  {
1204
- // If Size is not aligned for 4 KiB, then Offset will not work for next file in solid block.
1205
- // so we place such file in group with (Offset==0).
1206
- filterModeTemp.Offset = 0;
900
+ filterModeTemp.SetDelta();
901
+ if (filterModeTemp.Delta != 0 && filterModeTemp.Id != k_Delta)
902
+ {
903
+ if (ui.Size % filterModeTemp.Delta != 0)
904
+ {
905
+ parseRes = false;
906
+ }
907
+ }
908
+ }
909
+ if (!parseRes)
910
+ {
911
+ filterModeTemp.Id = 0;
912
+ filterModeTemp.Delta = 0;
1207
913
  }
1208
914
  }
1209
- */
1210
915
  }
1211
916
  }
1212
- if (!parseRes)
1213
- filterModeTemp.ClearFilterMode();
917
+ }
918
+ else if ((needReadFile && !Callback) || probablyIsSameIsa)
919
+ {
920
+ #ifdef MY_CPU_X86_OR_AMD64
921
+ if (probablyIsSameIsa)
922
+ filterModeTemp.Id = k_X86;
923
+ #endif
1214
924
  }
1215
925
  }
1216
926
 
@@ -1224,8 +934,6 @@ static inline void GetMethodFull(UInt64 methodID, UInt32 numStreams, CMethodFull
1224
934
  m.NumStreams = numStreams;
1225
935
  }
1226
936
 
1227
-
1228
- // we add bond for mode.Methods[0] that is filter
1229
937
  static HRESULT AddBondForFilter(CCompressionMethodMode &mode)
1230
938
  {
1231
939
  for (unsigned c = 1; c < mode.Methods.Size(); c++)
@@ -1243,19 +951,16 @@ static HRESULT AddBondForFilter(CCompressionMethodMode &mode)
1243
951
  return E_INVALIDARG;
1244
952
  }
1245
953
 
1246
- /*
1247
- static HRESULT AddBondForFilter_if_ThereAreBonds(CCompressionMethodMode &mode)
954
+ static HRESULT AddFilterBond(CCompressionMethodMode &mode)
1248
955
  {
1249
956
  if (!mode.Bonds.IsEmpty())
1250
957
  return AddBondForFilter(mode);
1251
958
  return S_OK;
1252
959
  }
1253
- */
1254
960
 
1255
961
  static HRESULT AddBcj2Methods(CCompressionMethodMode &mode)
1256
962
  {
1257
963
  // mode.Methods[0] must be k_BCJ2 method !
1258
- // mode.Methods[1] : we expect that there is at least one method after BCJ2
1259
964
 
1260
965
  CMethodFull m;
1261
966
  GetMethodFull(k_LZMA, 1, m);
@@ -1267,7 +972,7 @@ static HRESULT AddBcj2Methods(CCompressionMethodMode &mode)
1267
972
  m.AddProp32(NCoderPropID::kLitContextBits, 0);
1268
973
  // m.AddProp_Ascii(NCoderPropID::kMatchFinder, "BT2");
1269
974
 
1270
- const unsigned methodIndex = mode.Methods.Size();
975
+ unsigned methodIndex = mode.Methods.Size();
1271
976
 
1272
977
  if (mode.Bonds.IsEmpty())
1273
978
  {
@@ -1284,142 +989,102 @@ static HRESULT AddBcj2Methods(CCompressionMethodMode &mode)
1284
989
  mode.Methods.Add(m);
1285
990
  mode.Methods.Add(m);
1286
991
 
1287
- RINOK(AddBondForFilter(mode))
992
+ RINOK(AddBondForFilter(mode));
1288
993
  CBond2 bond;
1289
- bond.OutCoder = 0; // index of BCJ2 coder
994
+ bond.OutCoder = 0;
1290
995
  bond.InCoder = methodIndex; bond.OutStream = 1; mode.Bonds.Add(bond);
1291
996
  bond.InCoder = methodIndex + 1; bond.OutStream = 2; mode.Bonds.Add(bond);
1292
997
  return S_OK;
1293
998
  }
1294
999
 
1295
-
1296
1000
  static HRESULT MakeExeMethod(CCompressionMethodMode &mode,
1297
- const CFilterMode &filterMode,
1298
- const bool bcj2_IsAllowed,
1299
- const CUIntVector &disabledFilterIDs)
1001
+ const CFilterMode &filterMode, /* bool addFilter, */ bool bcj2Filter)
1300
1002
  {
1301
1003
  if (mode.Filter_was_Inserted)
1302
1004
  {
1303
- // filter was inserted, but bond for that filter was not added still.
1304
1005
  const CMethodFull &m = mode.Methods[0];
1305
- if (m.Id == k_BCJ2)
1006
+ CMethodId id = m.Id;
1007
+ if (id == k_BCJ2)
1306
1008
  return AddBcj2Methods(mode);
1307
1009
  if (!m.IsSimpleCoder())
1308
1010
  return E_NOTIMPL;
1309
- if (mode.Bonds.IsEmpty())
1310
- return S_OK;
1311
- return AddBondForFilter(mode);
1011
+ // if (Bonds.IsEmpty()) we can create bonds later
1012
+ return AddFilterBond(mode);
1312
1013
  }
1313
1014
 
1314
1015
  if (filterMode.Id == 0)
1315
1016
  return S_OK;
1316
1017
 
1317
- unsigned nextCoder;
1018
+ CMethodFull &m = mode.Methods.InsertNew(0);
1318
1019
 
1319
- const bool useBcj2 = bcj2_IsAllowed
1320
- && Is86Filter(filterMode.Id)
1321
- && disabledFilterIDs.FindInSorted(k_BCJ2) < 0;
1020
+ {
1021
+ FOR_VECTOR(k, mode.Bonds)
1022
+ {
1023
+ CBond2 &bond = mode.Bonds[k];
1024
+ bond.InCoder++;
1025
+ bond.OutCoder++;
1026
+ }
1027
+ }
1322
1028
 
1323
- if (!useBcj2 && disabledFilterIDs.FindInSorted(filterMode.Id) >= 0)
1029
+ HRESULT res;
1030
+
1031
+ if (bcj2Filter && Is86Filter(filterMode.Id))
1324
1032
  {
1325
- // required filter is disabled,
1326
- // but we still can use information about data alignment.
1327
- #if 0 // 1 for debug
1328
- // we can return here, if we want default lzma properties
1329
- return S_OK;
1330
- #else
1331
- // we will try to change lzma/lzma2 properties
1332
- nextCoder = 0;
1333
- if (!mode.Bonds.IsEmpty())
1334
- for (unsigned c = 0;; c++)
1335
- {
1336
- if (c == mode.Methods.Size())
1337
- return S_OK;
1338
- if (!mode.IsThereBond_to_Coder(c))
1339
- {
1340
- nextCoder = c;
1341
- break;
1342
- }
1343
- }
1344
- #endif
1033
+ GetMethodFull(k_BCJ2, 4, m);
1034
+ res = AddBcj2Methods(mode);
1345
1035
  }
1346
1036
  else
1347
1037
  {
1348
- // we insert new filter method:
1349
- CMethodFull &m = mode.Methods.InsertNew(0); // 0 == index of new inserted item
1350
- {
1351
- // we move all coder indexes in bonds up for 1 position:
1352
- FOR_VECTOR (k, mode.Bonds)
1353
- {
1354
- CBond2 &bond = mode.Bonds[k];
1355
- bond.InCoder++;
1356
- bond.OutCoder++;
1357
- }
1358
- }
1359
- if (useBcj2)
1360
- {
1361
- GetMethodFull(k_BCJ2, 4, m);
1362
- return AddBcj2Methods(mode);
1363
- }
1364
-
1365
1038
  GetMethodFull(filterMode.Id, 1, m);
1366
-
1367
1039
  if (filterMode.Id == k_Delta)
1368
1040
  m.AddProp32(NCoderPropID::kDefaultProp, filterMode.Delta);
1369
- else if (filterMode.Id == k_ARM64
1370
- || filterMode.Id == k_RISCV)
1041
+ res = AddFilterBond(mode);
1042
+
1043
+ int alignBits = -1;
1044
+ if (filterMode.Id == k_Delta || filterMode.Delta != 0)
1371
1045
  {
1372
- // if (filterMode.Offset != 0)
1373
- m.AddProp32(
1374
- NCoderPropID::kDefaultProp,
1375
- // NCoderPropID::kBranchOffset,
1376
- filterMode.Offset);
1046
+ if (filterMode.Delta == 1) alignBits = 0;
1047
+ else if (filterMode.Delta == 2) alignBits = 1;
1048
+ else if (filterMode.Delta == 4) alignBits = 2;
1049
+ else if (filterMode.Delta == 8) alignBits = 3;
1050
+ else if (filterMode.Delta == 16) alignBits = 4;
1377
1051
  }
1378
-
1379
- nextCoder = 1;
1380
- if (!mode.Bonds.IsEmpty())
1052
+ else
1381
1053
  {
1382
- RINOK(AddBondForFilter(mode))
1383
- nextCoder = mode.Bonds.Back().InCoder;
1054
+ // alignBits = GetAlignForFilterMethod(filterMode.Id);
1384
1055
  }
1385
- }
1386
-
1387
- if (nextCoder >= mode.Methods.Size())
1388
- {
1389
- // we don't expect that case, if there was non-filter method.
1390
- // but we return S_OK to support filter-only case.
1391
- return S_OK;
1392
- }
1393
-
1394
- int alignBits = -1;
1395
- {
1396
- const UInt32 delta = filterMode.Delta;
1397
- if (delta == 0 || delta > 16)
1056
+
1057
+ if (res == S_OK && alignBits >= 0)
1398
1058
  {
1399
- // if (delta == 0) alignBits = GetAlignForFilterMethod(filterMode.Id);
1059
+ unsigned nextCoder = 1;
1060
+ if (!mode.Bonds.IsEmpty())
1061
+ {
1062
+ nextCoder = mode.Bonds.Back().InCoder;
1063
+ }
1064
+ if (nextCoder < mode.Methods.Size())
1065
+ {
1066
+ CMethodFull &nextMethod = mode.Methods[nextCoder];
1067
+ if (nextMethod.Id == k_LZMA || nextMethod.Id == k_LZMA2)
1068
+ {
1069
+ if (!nextMethod.Are_Lzma_Model_Props_Defined())
1070
+ {
1071
+ if (alignBits != 0)
1072
+ {
1073
+ if (alignBits > 2 || filterMode.Id == k_Delta)
1074
+ nextMethod.AddProp32(NCoderPropID::kPosStateBits, alignBits);
1075
+ unsigned lc = 0;
1076
+ if (alignBits < 3)
1077
+ lc = 3 - alignBits;
1078
+ nextMethod.AddProp32(NCoderPropID::kLitContextBits, lc);
1079
+ nextMethod.AddProp32(NCoderPropID::kLitPosBits, alignBits);
1080
+ }
1081
+ }
1082
+ }
1083
+ }
1400
1084
  }
1401
- else if ((delta & ((1 << 4) - 1)) == 0) alignBits = 4;
1402
- else if ((delta & ((1 << 3) - 1)) == 0) alignBits = 3;
1403
- else if ((delta & ((1 << 2) - 1)) == 0) alignBits = 2;
1404
- else if ((delta & ((1 << 1) - 1)) == 0) alignBits = 1;
1405
- // else alignBits = 0;
1406
- /* alignBits=0 is default mode for lzma/lzma2.
1407
- So we don't set alignBits=0 here. */
1408
- }
1409
- if (alignBits <= 0)
1410
- return S_OK;
1411
- // (alignBits > 0)
1412
- CMethodFull &nextMethod = mode.Methods[nextCoder];
1413
- if (nextMethod.Id == k_LZMA || nextMethod.Id == k_LZMA2)
1414
- if (!nextMethod.Are_Lzma_Model_Props_Defined())
1415
- {
1416
- if (alignBits > 2 || filterMode.Id == k_Delta)
1417
- nextMethod.AddProp32(NCoderPropID::kPosStateBits, (unsigned)alignBits);
1418
- const unsigned lc = (alignBits < 3) ? (unsigned)(3 - alignBits) : 0u;
1419
- nextMethod.AddProp32(NCoderPropID::kLitContextBits, lc);
1420
- nextMethod.AddProp32(NCoderPropID::kLitPosBits, (unsigned)alignBits);
1421
1085
  }
1422
- return S_OK;
1086
+
1087
+ return res;
1423
1088
  }
1424
1089
 
1425
1090
 
@@ -1449,13 +1114,13 @@ static void UpdateItem_To_FileItem(const CUpdateItem &ui,
1449
1114
 
1450
1115
 
1451
1116
 
1452
- Z7_CLASS_IMP_COM_2(
1453
- CRepackInStreamWithSizes
1454
- , ISequentialInStream
1455
- , ICompressGetSubStreamSize
1456
- )
1117
+ class CRepackInStreamWithSizes:
1118
+ public ISequentialInStream,
1119
+ public ICompressGetSubStreamSize,
1120
+ public CMyUnknownImp
1121
+ {
1457
1122
  CMyComPtr<ISequentialInStream> _stream;
1458
- UInt64 _size;
1123
+ // UInt64 _size;
1459
1124
  const CBoolVector *_extractStatuses;
1460
1125
  UInt32 _startIndex;
1461
1126
  public:
@@ -1465,28 +1130,37 @@ public:
1465
1130
  {
1466
1131
  _startIndex = startIndex;
1467
1132
  _extractStatuses = extractStatuses;
1468
- _size = 0;
1133
+ // _size = 0;
1469
1134
  _stream = stream;
1470
1135
  }
1471
- UInt64 GetSize() const { return _size; }
1136
+ // UInt64 GetSize() const { return _size; }
1137
+
1138
+ MY_UNKNOWN_IMP2(ISequentialInStream, ICompressGetSubStreamSize)
1139
+
1140
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
1141
+
1142
+ STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value);
1472
1143
  };
1473
1144
 
1474
- Z7_COM7F_IMF(CRepackInStreamWithSizes::Read(void *data, UInt32 size, UInt32 *processedSize))
1145
+ STDMETHODIMP CRepackInStreamWithSizes::Read(void *data, UInt32 size, UInt32 *processedSize)
1475
1146
  {
1147
+ return _stream->Read(data, size, processedSize);
1148
+ /*
1476
1149
  UInt32 realProcessedSize;
1477
- const HRESULT result = _stream->Read(data, size, &realProcessedSize);
1150
+ HRESULT result = _stream->Read(data, size, &realProcessedSize);
1478
1151
  _size += realProcessedSize;
1479
1152
  if (processedSize)
1480
1153
  *processedSize = realProcessedSize;
1481
1154
  return result;
1155
+ */
1482
1156
  }
1483
1157
 
1484
- Z7_COM7F_IMF(CRepackInStreamWithSizes::GetSubStreamSize(UInt64 subStream, UInt64 *value))
1158
+ STDMETHODIMP CRepackInStreamWithSizes::GetSubStreamSize(UInt64 subStream, UInt64 *value)
1485
1159
  {
1486
1160
  *value = 0;
1487
1161
  if (subStream >= _extractStatuses->Size())
1488
1162
  return S_FALSE; // E_FAIL;
1489
- const unsigned index = (unsigned)subStream;
1163
+ unsigned index = (unsigned)subStream;
1490
1164
  if ((*_extractStatuses)[index])
1491
1165
  {
1492
1166
  const CFileItem &fi = _db->Files[_startIndex + index];
@@ -1517,7 +1191,7 @@ protected:
1517
1191
  public:
1518
1192
  const CDbEx *_db;
1519
1193
  CMyComPtr<IArchiveUpdateCallbackFile> _opCallback;
1520
- CMyComPtr<IArchiveExtractCallbackMessage2> _extractCallback;
1194
+ CMyComPtr<IArchiveExtractCallbackMessage> _extractCallback;
1521
1195
 
1522
1196
  HRESULT Init(UInt32 startIndex, const CBoolVector *extractStatuses);
1523
1197
  HRESULT CheckFinishedState() const { return (_currentIndex == _extractStatuses->Size()) ? S_OK: E_FAIL; }
@@ -1546,7 +1220,7 @@ HRESULT CRepackStreamBase::OpenFile()
1546
1220
  NEventIndexType::kInArcIndex, arcIndex,
1547
1221
  _needWrite ?
1548
1222
  NUpdateNotifyOp::kRepack :
1549
- NUpdateNotifyOp::kSkip))
1223
+ NUpdateNotifyOp::kSkip));
1550
1224
  }
1551
1225
 
1552
1226
  _crc = CRC_INIT_VAL;
@@ -1572,7 +1246,7 @@ HRESULT CRepackStreamBase::CloseFile()
1572
1246
  {
1573
1247
  RINOK(_extractCallback->ReportExtractResult(
1574
1248
  NEventIndexType::kInArcIndex, arcIndex,
1575
- NExtract::NOperationResult::kCRCError))
1249
+ NExtract::NOperationResult::kCRCError));
1576
1250
  }
1577
1251
  // return S_FALSE;
1578
1252
  return k_My_HRESULT_CRC_ERROR;
@@ -1582,28 +1256,30 @@ HRESULT CRepackStreamBase::ProcessEmptyFiles()
1582
1256
  {
1583
1257
  while (_currentIndex < _extractStatuses->Size() && _db->Files[_startIndex + _currentIndex].Size == 0)
1584
1258
  {
1585
- RINOK(OpenFile())
1586
- RINOK(CloseFile())
1259
+ RINOK(OpenFile());
1260
+ RINOK(CloseFile());
1587
1261
  }
1588
1262
  return S_OK;
1589
1263
  }
1590
1264
 
1591
1265
 
1592
1266
 
1593
- #ifndef Z7_ST
1267
+ #ifndef _7ZIP_ST
1594
1268
 
1595
- class CFolderOutStream2 Z7_final:
1269
+ class CFolderOutStream2:
1596
1270
  public CRepackStreamBase,
1597
1271
  public ISequentialOutStream,
1598
1272
  public CMyUnknownImp
1599
1273
  {
1600
- Z7_COM_UNKNOWN_IMP_0
1601
- Z7_IFACE_COM7_IMP(ISequentialOutStream)
1602
1274
  public:
1603
1275
  CMyComPtr<ISequentialOutStream> _stream;
1276
+
1277
+ MY_UNKNOWN_IMP
1278
+
1279
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
1604
1280
  };
1605
1281
 
1606
- Z7_COM7F_IMF(CFolderOutStream2::Write(const void *data, UInt32 size, UInt32 *processedSize))
1282
+ STDMETHODIMP CFolderOutStream2::Write(const void *data, UInt32 size, UInt32 *processedSize)
1607
1283
  {
1608
1284
  if (processedSize)
1609
1285
  *processedSize = 0;
@@ -1625,22 +1301,22 @@ Z7_COM7F_IMF(CFolderOutStream2::Write(const void *data, UInt32 size, UInt32 *pro
1625
1301
  _rem -= cur;
1626
1302
  if (_rem == 0)
1627
1303
  {
1628
- RINOK(CloseFile())
1629
- RINOK(ProcessEmptyFiles())
1304
+ RINOK(CloseFile());
1305
+ RINOK(ProcessEmptyFiles());
1630
1306
  }
1631
- RINOK(result)
1307
+ RINOK(result);
1632
1308
  if (cur == 0)
1633
1309
  break;
1634
1310
  continue;
1635
1311
  }
1636
1312
 
1637
- RINOK(ProcessEmptyFiles())
1313
+ RINOK(ProcessEmptyFiles());
1638
1314
  if (_currentIndex == _extractStatuses->Size())
1639
1315
  {
1640
1316
  // we don't support write cut here
1641
1317
  return E_FAIL;
1642
1318
  }
1643
- RINOK(OpenFile())
1319
+ RINOK(OpenFile());
1644
1320
  }
1645
1321
 
1646
1322
  return S_OK;
@@ -1652,19 +1328,18 @@ Z7_COM7F_IMF(CFolderOutStream2::Write(const void *data, UInt32 size, UInt32 *pro
1652
1328
 
1653
1329
  static const UInt32 kTempBufSize = 1 << 16;
1654
1330
 
1655
- class CFolderInStream2 Z7_final:
1331
+ class CFolderInStream2:
1656
1332
  public CRepackStreamBase,
1657
1333
  public ISequentialInStream,
1658
1334
  public CMyUnknownImp
1659
1335
  {
1660
- Z7_COM_UNKNOWN_IMP_0
1661
- Z7_IFACE_COM7_IMP(ISequentialInStream)
1662
-
1663
1336
  Byte *_buf;
1664
1337
  public:
1665
1338
  CMyComPtr<ISequentialInStream> _inStream;
1666
1339
  HRESULT Result;
1667
1340
 
1341
+ MY_UNKNOWN_IMP
1342
+
1668
1343
  CFolderInStream2():
1669
1344
  Result(S_OK)
1670
1345
  {
@@ -1677,9 +1352,10 @@ public:
1677
1352
  }
1678
1353
 
1679
1354
  void Init() { Result = S_OK; }
1355
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
1680
1356
  };
1681
1357
 
1682
- Z7_COM7F_IMF(CFolderInStream2::Read(void *data, UInt32 size, UInt32 *processedSize))
1358
+ STDMETHODIMP CFolderInStream2::Read(void *data, UInt32 size, UInt32 *processedSize)
1683
1359
  {
1684
1360
  if (processedSize)
1685
1361
  *processedSize = 0;
@@ -1700,7 +1376,7 @@ Z7_COM7F_IMF(CFolderInStream2::Read(void *data, UInt32 size, UInt32 *processedSi
1700
1376
  cur = kTempBufSize;
1701
1377
  }
1702
1378
 
1703
- const HRESULT result = _inStream->Read(buf, cur, &cur);
1379
+ HRESULT result = _inStream->Read(buf, cur, &cur);
1704
1380
  _crc = CrcUpdate(_crc, buf, cur);
1705
1381
  _rem -= cur;
1706
1382
 
@@ -1717,11 +1393,11 @@ Z7_COM7F_IMF(CFolderInStream2::Read(void *data, UInt32 size, UInt32 *processedSi
1717
1393
 
1718
1394
  if (_rem == 0)
1719
1395
  {
1720
- RINOK(CloseFile())
1721
- RINOK(ProcessEmptyFiles())
1396
+ RINOK(CloseFile());
1397
+ RINOK(ProcessEmptyFiles());
1722
1398
  }
1723
1399
 
1724
- RINOK(result)
1400
+ RINOK(result);
1725
1401
 
1726
1402
  if (cur == 0)
1727
1403
  return E_FAIL;
@@ -1729,20 +1405,20 @@ Z7_COM7F_IMF(CFolderInStream2::Read(void *data, UInt32 size, UInt32 *processedSi
1729
1405
  continue;
1730
1406
  }
1731
1407
 
1732
- RINOK(ProcessEmptyFiles())
1408
+ RINOK(ProcessEmptyFiles());
1733
1409
  if (_currentIndex == _extractStatuses->Size())
1734
1410
  {
1735
1411
  return S_OK;
1736
1412
  }
1737
- RINOK(OpenFile())
1413
+ RINOK(OpenFile());
1738
1414
  }
1739
1415
 
1740
1416
  return S_OK;
1741
1417
  }
1742
1418
 
1743
1419
 
1744
- class CThreadDecoder Z7_final
1745
- #ifndef Z7_ST
1420
+ class CThreadDecoder
1421
+ #ifndef _7ZIP_ST
1746
1422
  : public CVirtThread
1747
1423
  #endif
1748
1424
  {
@@ -1752,7 +1428,7 @@ public:
1752
1428
  CThreadDecoder(bool multiThreadMixer):
1753
1429
  Decoder(multiThreadMixer)
1754
1430
  {
1755
- #ifndef Z7_ST
1431
+ #ifndef _7ZIP_ST
1756
1432
  if (multiThreadMixer)
1757
1433
  {
1758
1434
  MtMode = false;
@@ -1766,7 +1442,7 @@ public:
1766
1442
  // send_UnpackSize = false;
1767
1443
  }
1768
1444
 
1769
- #ifndef Z7_ST
1445
+ #ifndef _7ZIP_ST
1770
1446
 
1771
1447
  bool dataAfterEnd_Error;
1772
1448
  HRESULT Result;
@@ -1777,44 +1453,36 @@ public:
1777
1453
 
1778
1454
  UInt64 StartPos;
1779
1455
  const CFolders *Folders;
1780
- unsigned FolderIndex;
1456
+ int FolderIndex;
1781
1457
 
1782
1458
  // bool send_UnpackSize;
1783
1459
  // UInt64 UnpackSize;
1784
1460
 
1785
- #ifndef Z7_NO_CRYPTO
1461
+ #ifndef _NO_CRYPTO
1786
1462
  CMyComPtr<ICryptoGetTextPassword> getTextPassword;
1787
1463
  #endif
1788
1464
 
1789
- DECL_EXTERNAL_CODECS_LOC_VARS_DECL
1465
+ DECL_EXTERNAL_CODECS_LOC_VARS2;
1790
1466
 
1791
- #ifndef Z7_ST
1467
+ #ifndef _7ZIP_ST
1792
1468
  bool MtMode;
1793
1469
  UInt32 NumThreads;
1794
1470
  #endif
1795
1471
 
1796
1472
 
1797
- ~CThreadDecoder() Z7_DESTRUCTOR_override
1798
- {
1799
- /* WaitThreadFinish() will be called in ~CVirtThread().
1800
- But we need WaitThreadFinish() call before
1801
- destructors of this class members.
1802
- */
1803
- CVirtThread::WaitThreadFinish();
1804
- }
1805
- private:
1806
- virtual void Execute() Z7_override;
1473
+ ~CThreadDecoder() { CVirtThread::WaitThreadFinish(); }
1474
+ virtual void Execute();
1807
1475
 
1808
1476
  #endif
1809
1477
  };
1810
1478
 
1811
- #ifndef Z7_ST
1479
+ #ifndef _7ZIP_ST
1812
1480
 
1813
1481
  void CThreadDecoder::Execute()
1814
1482
  {
1815
1483
  try
1816
1484
  {
1817
- #ifndef Z7_NO_CRYPTO
1485
+ #ifndef _NO_CRYPTO
1818
1486
  bool isEncrypted = false;
1819
1487
  bool passwordIsDefined = false;
1820
1488
  UString password;
@@ -1837,8 +1505,8 @@ void CThreadDecoder::Execute()
1837
1505
  NULL // *inStreamMainRes
1838
1506
  , dataAfterEnd_Error
1839
1507
 
1840
- Z7_7Z_DECODER_CRYPRO_VARS
1841
- #ifndef Z7_ST
1508
+ _7Z_DECODER_CRYPRO_VARS
1509
+ #ifndef _7ZIP_ST
1842
1510
  , MtMode, NumThreads,
1843
1511
  0 // MemUsage
1844
1512
  #endif
@@ -1859,17 +1527,20 @@ void CThreadDecoder::Execute()
1859
1527
 
1860
1528
  #endif
1861
1529
 
1862
- #ifndef Z7_NO_CRYPTO
1530
+ #ifndef _NO_CRYPTO
1863
1531
 
1864
- Z7_CLASS_IMP_NOQIB_1(
1865
- CCryptoGetTextPassword
1866
- , ICryptoGetTextPassword
1867
- )
1532
+ class CCryptoGetTextPassword:
1533
+ public ICryptoGetTextPassword,
1534
+ public CMyUnknownImp
1535
+ {
1868
1536
  public:
1869
1537
  UString Password;
1538
+
1539
+ MY_UNKNOWN_IMP
1540
+ STDMETHOD(CryptoGetTextPassword)(BSTR *password);
1870
1541
  };
1871
1542
 
1872
- Z7_COM7F_IMF(CCryptoGetTextPassword::CryptoGetTextPassword(BSTR *password))
1543
+ STDMETHODIMP CCryptoGetTextPassword::CryptoGetTextPassword(BSTR *password)
1873
1544
  {
1874
1545
  return StringToBstr(Password, password);
1875
1546
  }
@@ -1893,73 +1564,52 @@ HRESULT Update(
1893
1564
  DECL_EXTERNAL_CODECS_LOC_VARS
1894
1565
  IInStream *inStream,
1895
1566
  const CDbEx *db,
1896
- CObjectVector<CUpdateItem> &updateItems,
1567
+ const CObjectVector<CUpdateItem> &updateItems,
1897
1568
  // const CObjectVector<CTreeFolder> &treeFolders,
1898
1569
  // const CUniqBlocks &secureBlocks,
1570
+ COutArchive &archive,
1571
+ CArchiveDatabaseOut &newDatabase,
1899
1572
  ISequentialOutStream *seqOutStream,
1900
1573
  IArchiveUpdateCallback *updateCallback,
1901
- const CUpdateOptions &options)
1574
+ const CUpdateOptions &options
1575
+ #ifndef _NO_CRYPTO
1576
+ , ICryptoGetTextPassword *getDecoderPassword
1577
+ #endif
1578
+ )
1902
1579
  {
1903
1580
  UInt64 numSolidFiles = options.NumSolidFiles;
1904
1581
  if (numSolidFiles == 0)
1905
1582
  numSolidFiles = 1;
1906
1583
 
1907
- Z7_DECL_CMyComPtr_QI_FROM(
1908
- IArchiveUpdateCallbackFile,
1909
- opCallback, updateCallback)
1584
+ CMyComPtr<IArchiveUpdateCallbackFile> opCallback;
1585
+ updateCallback->QueryInterface(IID_IArchiveUpdateCallbackFile, (void **)&opCallback);
1586
+
1587
+ CMyComPtr<IArchiveExtractCallbackMessage> extractCallback;
1588
+ updateCallback->QueryInterface(IID_IArchiveExtractCallbackMessage, (void **)&extractCallback);
1910
1589
 
1911
- Z7_DECL_CMyComPtr_QI_FROM(
1912
- IArchiveExtractCallbackMessage2,
1913
- extractCallback, updateCallback)
1590
+ // size_t totalSecureDataSize = (size_t)secureBlocks.GetTotalSizeInBytes();
1914
1591
 
1915
1592
  /*
1916
- Z7_DECL_CMyComPtr_QI_FROM(
1917
- IArchiveUpdateCallbackArcProp,
1918
- reportArcProp, updateCallback)
1593
+ CMyComPtr<IOutStream> outStream;
1594
+ RINOK(seqOutStream->QueryInterface(IID_IOutStream, (void **)&outStream));
1595
+ if (!outStream)
1596
+ return E_NOTIMPL;
1919
1597
  */
1920
1598
 
1921
- // size_t totalSecureDataSize = (size_t)secureBlocks.GetTotalSizeInBytes();
1922
-
1923
- CMyComPtr<IStreamSetRestriction> v_StreamSetRestriction;
1599
+ UInt64 startBlockSize = db ? db->ArcInfo.StartPosition: 0;
1600
+ if (startBlockSize > 0 && !options.RemoveSfxBlock)
1924
1601
  {
1925
- Z7_DECL_CMyComPtr_QI_FROM(
1926
- IOutStream,
1927
- outStream, seqOutStream)
1928
- if (!outStream)
1929
- return E_NOTIMPL;
1930
- const UInt64 sfxBlockSize = (db && !options.RemoveSfxBlock) ?
1931
- db->ArcInfo.StartPosition: 0;
1932
- seqOutStream->QueryInterface(IID_IStreamSetRestriction, (void **)&v_StreamSetRestriction);
1933
- if (v_StreamSetRestriction)
1934
- {
1935
- UInt64 offset = 0;
1936
- RINOK(outStream->Seek(0, STREAM_SEEK_CUR, &offset))
1937
- RINOK(v_StreamSetRestriction->SetRestriction(
1938
- outStream ? offset + sfxBlockSize : 0,
1939
- outStream ? offset + sfxBlockSize + k_StartHeadersRewriteSize : 0))
1940
- }
1941
- outStream.Release();
1942
- if (sfxBlockSize != 0)
1943
- {
1944
- RINOK(WriteRange(inStream, seqOutStream, 0, sfxBlockSize, NULL))
1945
- }
1602
+ RINOK(WriteRange(inStream, seqOutStream, 0, startBlockSize, NULL));
1946
1603
  }
1947
1604
 
1948
1605
  CIntArr fileIndexToUpdateIndexMap;
1949
1606
  UInt64 complexity = 0;
1950
- bool isThere_UnknownSize = false;
1951
1607
  UInt64 inSizeForReduce2 = 0;
1952
-
1953
- #ifndef Z7_NO_CRYPTO
1954
1608
  bool needEncryptedRepack = false;
1955
- #endif
1956
1609
 
1957
1610
  CRecordVector<CFilterMode2> filters;
1958
1611
  CObjectVector<CSolidGroup> groups;
1959
-
1960
- #ifndef Z7_ST
1961
1612
  bool thereAreRepacks = false;
1962
- #endif
1963
1613
 
1964
1614
  bool useFilters = options.UseFilters;
1965
1615
  if (useFilters)
@@ -1967,15 +1617,11 @@ HRESULT Update(
1967
1617
  const CCompressionMethodMode &method = *options.Method;
1968
1618
 
1969
1619
  FOR_VECTOR (i, method.Methods)
1970
- {
1971
- /* IsFilterMethod() knows only built-in codecs
1972
- FIXME: we should check IsFilter status for external filters too */
1973
1620
  if (IsFilterMethod(method.Methods[i].Id))
1974
1621
  {
1975
1622
  useFilters = false;
1976
1623
  break;
1977
1624
  }
1978
- }
1979
1625
  }
1980
1626
 
1981
1627
  if (db)
@@ -1990,14 +1636,14 @@ HRESULT Update(
1990
1636
  {
1991
1637
  int index = updateItems[i].IndexInArchive;
1992
1638
  if (index != -1)
1993
- fileIndexToUpdateIndexMap[(unsigned)index] = (int)i;
1639
+ fileIndexToUpdateIndexMap[(unsigned)index] = i;
1994
1640
  }
1995
1641
 
1996
1642
  for (i = 0; i < db->NumFolders; i++)
1997
1643
  {
1998
1644
  CNum indexInFolder = 0;
1999
1645
  CNum numCopyItems = 0;
2000
- const CNum numUnpackStreams = db->NumUnpackStreamsVector[i];
1646
+ CNum numUnpackStreams = db->NumUnpackStreamsVector[i];
2001
1647
  UInt64 repackSize = 0;
2002
1648
 
2003
1649
  for (CNum fi = db->FolderStartFileIndex[i]; indexInFolder < numUnpackStreams; fi++)
@@ -2009,8 +1655,8 @@ HRESULT Update(
2009
1655
  if (file.HasStream)
2010
1656
  {
2011
1657
  indexInFolder++;
2012
- const int updateIndex = fileIndexToUpdateIndexMap[fi];
2013
- if (updateIndex >= 0 && !updateItems[(unsigned)updateIndex].NewData)
1658
+ int updateIndex = fileIndexToUpdateIndexMap[fi];
1659
+ if (updateIndex >= 0 && !updateItems[updateIndex].NewData)
2014
1660
  {
2015
1661
  numCopyItems++;
2016
1662
  repackSize += file.Size;
@@ -2027,13 +1673,11 @@ HRESULT Update(
2027
1673
  CFolderEx f;
2028
1674
  db->ParseFolderEx(i, f);
2029
1675
 
2030
- #ifndef Z7_NO_CRYPTO
2031
1676
  const bool isEncrypted = f.IsEncrypted();
2032
- #endif
2033
1677
  const bool needCopy = (numCopyItems == numUnpackStreams);
2034
1678
  const bool extractFilter = (useFilters || needCopy);
2035
1679
 
2036
- const unsigned groupIndex = Get_FilterGroup_for_Folder(filters, f, extractFilter);
1680
+ unsigned groupIndex = Get_FilterGroup_for_Folder(filters, f, extractFilter);
2037
1681
 
2038
1682
  while (groupIndex >= groups.Size())
2039
1683
  groups.AddNew();
@@ -2044,100 +1688,82 @@ HRESULT Update(
2044
1688
  complexity += db->GetFolderFullPackSize(i);
2045
1689
  else
2046
1690
  {
2047
- #ifndef Z7_ST
2048
1691
  thereAreRepacks = true;
2049
- #endif
2050
1692
  complexity += repackSize;
2051
1693
  if (inSizeForReduce2 < repackSize)
2052
1694
  inSizeForReduce2 = repackSize;
2053
- #ifndef Z7_NO_CRYPTO
2054
1695
  if (isEncrypted)
2055
1696
  needEncryptedRepack = true;
2056
- #endif
2057
1697
  }
2058
1698
  }
2059
1699
  }
2060
1700
 
2061
1701
  UInt64 inSizeForReduce = 0;
2062
1702
  {
2063
- const bool isSolid = (numSolidFiles > 1 && options.NumSolidBytes != 0);
1703
+ bool isSolid = (numSolidFiles > 1 && options.NumSolidBytes != 0);
2064
1704
  FOR_VECTOR (i, updateItems)
2065
1705
  {
2066
1706
  const CUpdateItem &ui = updateItems[i];
2067
1707
  if (ui.NewData)
2068
1708
  {
2069
- if (ui.Size == (UInt64)(Int64)-1)
2070
- isThere_UnknownSize = true;
2071
- else
2072
- {
2073
- complexity += ui.Size;
2074
- if (isSolid)
2075
- inSizeForReduce += ui.Size;
2076
- else if (inSizeForReduce < ui.Size)
2077
- inSizeForReduce = ui.Size;
2078
- }
1709
+ complexity += ui.Size;
1710
+ if (isSolid)
1711
+ inSizeForReduce += ui.Size;
1712
+ else if (inSizeForReduce < ui.Size)
1713
+ inSizeForReduce = ui.Size;
2079
1714
  }
2080
1715
  }
2081
1716
  }
2082
1717
 
2083
- if (isThere_UnknownSize)
2084
- inSizeForReduce = (UInt64)(Int64)-1;
2085
- else
2086
- RINOK(updateCallback->SetTotal(complexity))
2087
-
2088
1718
  if (inSizeForReduce < inSizeForReduce2)
2089
- inSizeForReduce = inSizeForReduce2;
1719
+ inSizeForReduce = inSizeForReduce2;
2090
1720
 
1721
+ RINOK(updateCallback->SetTotal(complexity));
2091
1722
 
2092
- CMyComPtr2_Create<ICompressProgressInfo, CLocalProgress> lps;
1723
+ CLocalProgress *lps = new CLocalProgress;
1724
+ CMyComPtr<ICompressProgressInfo> progress = lps;
2093
1725
  lps->Init(updateCallback, true);
2094
1726
 
2095
- #ifndef Z7_ST
1727
+ #ifndef _7ZIP_ST
2096
1728
 
2097
1729
  CStreamBinder sb;
2098
- /*
2099
1730
  if (options.MultiThreadMixer)
2100
1731
  {
2101
1732
  RINOK(sb.CreateEvents());
2102
1733
  }
2103
- */
2104
1734
 
2105
1735
  #endif
2106
1736
 
2107
1737
  CThreadDecoder threadDecoder(options.MultiThreadMixer);
2108
1738
 
2109
- #ifndef Z7_ST
1739
+ #ifndef _7ZIP_ST
2110
1740
  if (options.MultiThreadMixer && thereAreRepacks)
2111
1741
  {
2112
- #ifdef Z7_EXTERNAL_CODECS
2113
- threadDecoder._externalCodecs = _externalCodecs;
1742
+ #ifdef EXTERNAL_CODECS
1743
+ threadDecoder.__externalCodecs = __externalCodecs;
2114
1744
  #endif
2115
- const WRes wres = threadDecoder.Create();
2116
- if (wres != 0)
2117
- return HRESULT_FROM_WIN32(wres);
1745
+ RINOK(threadDecoder.Create());
2118
1746
  }
2119
1747
  #endif
2120
1748
 
2121
1749
  {
2122
1750
  CAnalysis analysis;
2123
- // analysis.Need_ATime = options.Need_ATime;
2124
- int analysisLevel = options.AnalysisLevel;
2125
- // (analysisLevel < 0) means default level (5)
2126
- if (analysisLevel < 0)
2127
- analysisLevel = 5;
2128
- if (analysisLevel != 0)
1751
+ if (options.AnalysisLevel == 0)
1752
+ {
1753
+ analysis.ParseWav = false;
1754
+ analysis.ParseExe = false;
1755
+ analysis.ParseAll = false;
1756
+ }
1757
+ else
2129
1758
  {
2130
1759
  analysis.Callback = opCallback;
2131
- analysis.ParseWav = true;
2132
- if (analysisLevel >= 5)
1760
+ if (options.AnalysisLevel > 0)
2133
1761
  {
2134
- analysis.ParseExe = true;
2135
- analysis.ParseExeUnix = true;
2136
- // analysis.ParseNoExt = true;
2137
- if (analysisLevel >= 7)
1762
+ analysis.ParseWav = true;
1763
+ if (options.AnalysisLevel >= 7)
2138
1764
  {
2139
- analysis.ParseNoExt = true;
2140
- if (analysisLevel >= 9)
1765
+ analysis.ParseExe = true;
1766
+ if (options.AnalysisLevel >= 9)
2141
1767
  analysis.ParseAll = true;
2142
1768
  }
2143
1769
  }
@@ -2156,19 +1782,11 @@ HRESULT Update(
2156
1782
  CFilterMode2 fm;
2157
1783
  if (useFilters)
2158
1784
  {
2159
- // analysis.ATime_Defined = false;
2160
- RINOK(analysis.GetFilterGroup(i, ui, fm))
2161
- /*
2162
- if (analysis.ATime_Defined)
2163
- {
2164
- ui.ATime = FILETIME_To_UInt64(analysis.ATime);
2165
- ui.ATime_WasReadByAnalysis = true;
2166
- }
2167
- */
1785
+ RINOK(analysis.GetFilterGroup(i, ui, fm));
2168
1786
  }
2169
1787
  fm.Encrypted = method.PasswordIsDefined;
2170
1788
 
2171
- const unsigned groupIndex = GetGroup(filters, fm);
1789
+ unsigned groupIndex = GetGroup(filters, fm);
2172
1790
  while (groupIndex >= groups.Size())
2173
1791
  groups.AddNew();
2174
1792
  groups[groupIndex].Indices.Add(i);
@@ -2176,7 +1794,7 @@ HRESULT Update(
2176
1794
  }
2177
1795
 
2178
1796
 
2179
- #ifndef Z7_NO_CRYPTO
1797
+ #ifndef _NO_CRYPTO
2180
1798
 
2181
1799
  CCryptoGetTextPassword *getPasswordSpec = NULL;
2182
1800
  CMyComPtr<ICryptoGetTextPassword> getTextPassword;
@@ -2185,7 +1803,7 @@ HRESULT Update(
2185
1803
  getPasswordSpec = new CCryptoGetTextPassword;
2186
1804
  getTextPassword = getPasswordSpec;
2187
1805
 
2188
- #ifndef Z7_ST
1806
+ #ifndef _7ZIP_ST
2189
1807
  threadDecoder.getTextPassword = getPasswordSpec;
2190
1808
  #endif
2191
1809
 
@@ -2193,13 +1811,10 @@ HRESULT Update(
2193
1811
  getPasswordSpec->Password = options.Method->Password;
2194
1812
  else
2195
1813
  {
2196
- Z7_DECL_CMyComPtr_QI_FROM(
2197
- ICryptoGetTextPassword,
2198
- getDecoderPassword, updateCallback)
2199
1814
  if (!getDecoderPassword)
2200
1815
  return E_NOTIMPL;
2201
1816
  CMyComBSTR password;
2202
- RINOK(getDecoderPassword->CryptoGetTextPassword(&password))
1817
+ RINOK(getDecoderPassword->CryptoGetTextPassword(&password));
2203
1818
  if (password)
2204
1819
  getPasswordSpec->Password = password;
2205
1820
  }
@@ -2207,12 +1822,11 @@ HRESULT Update(
2207
1822
 
2208
1823
  #endif
2209
1824
 
1825
+
2210
1826
  // ---------- Compress ----------
2211
1827
 
2212
- COutArchive archive;
2213
- CArchiveDatabaseOut newDatabase;
2214
-
2215
- RINOK(archive.Create_and_WriteStartPrefix(seqOutStream))
1828
+ RINOK(archive.Create(seqOutStream, false));
1829
+ RINOK(archive.SkipPrefixArchiveHeader());
2216
1830
 
2217
1831
  /*
2218
1832
  CIntVector treeFolderToArcIndex;
@@ -2273,7 +1887,7 @@ HRESULT Update(
2273
1887
  if (ui.HasStream())
2274
1888
  continue;
2275
1889
  }
2276
- else if (ui.IndexInArchive != -1 && db->Files[(unsigned)ui.IndexInArchive].HasStream)
1890
+ else if (ui.IndexInArchive != -1 && db->Files[ui.IndexInArchive].HasStream)
2277
1891
  continue;
2278
1892
  /*
2279
1893
  if (ui.TreeFolderIndex >= 0)
@@ -2298,8 +1912,8 @@ HRESULT Update(
2298
1912
  }
2299
1913
  else
2300
1914
  {
2301
- GetFile(*db, (unsigned)ui.IndexInArchive, file, file2);
2302
- db->GetPath((unsigned)ui.IndexInArchive, name);
1915
+ GetFile(*db, ui.IndexInArchive, file, file2);
1916
+ db->GetPath(ui.IndexInArchive, name);
2303
1917
  }
2304
1918
 
2305
1919
  /*
@@ -2315,6 +1929,7 @@ HRESULT Update(
2315
1929
 
2316
1930
  {
2317
1931
  // ---------- Sort Filters ----------
1932
+
2318
1933
  FOR_VECTOR (i, filters)
2319
1934
  {
2320
1935
  filters[i].GroupIndex = i;
@@ -2328,23 +1943,22 @@ HRESULT Update(
2328
1943
 
2329
1944
  CCompressionMethodMode method = *options.Method;
2330
1945
  {
2331
- const HRESULT res = MakeExeMethod(method, filterMode,
2332
- // bcj2_IsAllowed:
2333
- #ifdef Z7_ST
1946
+ HRESULT res = MakeExeMethod(method, filterMode,
1947
+ #ifdef _7ZIP_ST
2334
1948
  false
2335
1949
  #else
2336
1950
  options.MaxFilter && options.MultiThreadMixer
2337
1951
  #endif
2338
- , options.DisabledFilterIDs);
1952
+ );
2339
1953
 
2340
- RINOK(res)
1954
+ RINOK(res);
2341
1955
  }
2342
1956
 
2343
1957
  if (filterMode.Encrypted)
2344
1958
  {
2345
1959
  if (!method.PasswordIsDefined)
2346
1960
  {
2347
- #ifndef Z7_NO_CRYPTO
1961
+ #ifndef _NO_CRYPTO
2348
1962
  if (getPasswordSpec)
2349
1963
  method.Password = getPasswordSpec->Password;
2350
1964
  #endif
@@ -2363,13 +1977,13 @@ HRESULT Update(
2363
1977
 
2364
1978
  const CSolidGroup &group = groups[filterMode.GroupIndex];
2365
1979
 
2366
- FOR_VECTOR (folderRefIndex, group.folderRefs)
1980
+ FOR_VECTOR(folderRefIndex, group.folderRefs)
2367
1981
  {
2368
1982
  const CFolderRepack &rep = group.folderRefs[folderRefIndex];
2369
1983
 
2370
- const unsigned folderIndex = rep.FolderIndex;
1984
+ unsigned folderIndex = rep.FolderIndex;
2371
1985
 
2372
- const CNum numUnpackStreams = db->NumUnpackStreamsVector[folderIndex];
1986
+ CNum numUnpackStreams = db->NumUnpackStreamsVector[folderIndex];
2373
1987
 
2374
1988
  if (rep.NumCopyFiles == numUnpackStreams)
2375
1989
  {
@@ -2377,7 +1991,7 @@ HRESULT Update(
2377
1991
  {
2378
1992
  RINOK(opCallback->ReportOperation(
2379
1993
  NEventIndexType::kBlockIndex, (UInt32)folderIndex,
2380
- NUpdateNotifyOp::kReplicate))
1994
+ NUpdateNotifyOp::kReplicate));
2381
1995
 
2382
1996
  // ---------- Copy old solid block ----------
2383
1997
  {
@@ -2389,27 +2003,21 @@ HRESULT Update(
2389
2003
  indexInFolder++;
2390
2004
  RINOK(opCallback->ReportOperation(
2391
2005
  NEventIndexType::kInArcIndex, (UInt32)fi,
2392
- NUpdateNotifyOp::kReplicate))
2006
+ NUpdateNotifyOp::kReplicate));
2393
2007
  }
2394
2008
  }
2395
2009
  }
2396
2010
  }
2397
2011
 
2398
- const UInt64 packSize = db->GetFolderFullPackSize(folderIndex);
2012
+ UInt64 packSize = db->GetFolderFullPackSize(folderIndex);
2399
2013
  RINOK(WriteRange(inStream, archive.SeqStream,
2400
- db->GetFolderStreamPos(folderIndex, 0), packSize, lps))
2014
+ db->GetFolderStreamPos(folderIndex, 0), packSize, progress));
2401
2015
  lps->ProgressOffset += packSize;
2402
-
2403
- const unsigned folderIndex_New = newDatabase.Folders.Size();
2016
+
2404
2017
  CFolder &folder = newDatabase.Folders.AddNew();
2405
- // v23.01: we copy FolderCrc, if FolderCrc was used
2406
- if (db->FolderCRCs.ValidAndDefined(folderIndex))
2407
- newDatabase.FolderUnpackCRCs.SetItem(folderIndex_New,
2408
- true, db->FolderCRCs.Vals[folderIndex]);
2409
-
2410
2018
  db->ParseFolderInfo(folderIndex, folder);
2411
- const CNum startIndex = db->FoStartPackStreamIndex[folderIndex];
2412
- FOR_VECTOR (j, folder.PackStreams)
2019
+ CNum startIndex = db->FoStartPackStreamIndex[folderIndex];
2020
+ FOR_VECTOR(j, folder.PackStreams)
2413
2021
  {
2414
2022
  newDatabase.PackSizes.Add(db->GetStreamPackSize(startIndex + j));
2415
2023
  // newDatabase.PackCRCsDefined.Add(db.PackCRCsDefined[startIndex + j]);
@@ -2417,9 +2025,9 @@ HRESULT Update(
2417
2025
  }
2418
2026
 
2419
2027
  size_t indexStart = db->FoToCoderUnpackSizes[folderIndex];
2420
- const size_t indexEnd = db->FoToCoderUnpackSizes[folderIndex + 1];
2028
+ size_t indexEnd = db->FoToCoderUnpackSizes[folderIndex + 1];
2421
2029
  for (; indexStart < indexEnd; indexStart++)
2422
- newDatabase.CoderUnpackSizes.Add(db->CoderUnpackSizes.ConstData()[indexStart]);
2030
+ newDatabase.CoderUnpackSizes.Add(db->CoderUnpackSizes[indexStart]);
2423
2031
  }
2424
2032
  else
2425
2033
  {
@@ -2456,8 +2064,8 @@ HRESULT Update(
2456
2064
  if (file.HasStream)
2457
2065
  {
2458
2066
  indexInFolder++;
2459
- const int updateIndex = fileIndexToUpdateIndexMap[fi];
2460
- if (updateIndex >= 0 && !updateItems[(unsigned)updateIndex].NewData)
2067
+ int updateIndex = fileIndexToUpdateIndexMap[fi];
2068
+ if (updateIndex >= 0 && !updateItems[updateIndex].NewData)
2461
2069
  needExtract = true;
2462
2070
  // decodeSize += file.Size;
2463
2071
  }
@@ -2478,6 +2086,7 @@ HRESULT Update(
2478
2086
  unsigned startPackIndex = newDatabase.PackSizes.Size();
2479
2087
  UInt64 curUnpackSize;
2480
2088
  {
2089
+
2481
2090
  CMyComPtr<ISequentialInStream> sbInStream;
2482
2091
  CRepackStreamBase *repackBase;
2483
2092
  CFolderInStream2 *FosSpec2 = NULL;
@@ -2485,13 +2094,13 @@ HRESULT Update(
2485
2094
  CRepackInStreamWithSizes *inStreamSizeCountSpec = new CRepackInStreamWithSizes;
2486
2095
  CMyComPtr<ISequentialInStream> inStreamSizeCount = inStreamSizeCountSpec;
2487
2096
  {
2488
- #ifndef Z7_ST
2097
+ #ifndef _7ZIP_ST
2489
2098
  if (options.MultiThreadMixer)
2490
2099
  {
2491
2100
  repackBase = threadDecoder.FosSpec;
2492
2101
  CMyComPtr<ISequentialOutStream> sbOutStream;
2493
- sb.CreateStreams2(sbInStream, sbOutStream);
2494
- RINOK(sb.Create_ReInit())
2102
+ sb.CreateStreams(&sbInStream, &sbOutStream);
2103
+ sb.ReInit();
2495
2104
 
2496
2105
  threadDecoder.FosSpec->_stream = sbOutStream;
2497
2106
 
@@ -2511,7 +2120,7 @@ HRESULT Update(
2511
2120
  sbInStream = FosSpec2;
2512
2121
  repackBase = FosSpec2;
2513
2122
 
2514
- #ifndef Z7_NO_CRYPTO
2123
+ #ifndef _NO_CRYPTO
2515
2124
  bool isEncrypted = false;
2516
2125
  bool passwordIsDefined = false;
2517
2126
  UString password;
@@ -2520,7 +2129,7 @@ HRESULT Update(
2520
2129
  CMyComPtr<ISequentialInStream> decodedStream;
2521
2130
  bool dataAfterEnd_Error = false;
2522
2131
 
2523
- const HRESULT res = threadDecoder.Decoder.Decode(
2132
+ HRESULT res = threadDecoder.Decoder.Decode(
2524
2133
  EXTERNAL_CODECS_LOC_VARS
2525
2134
  inStream,
2526
2135
  db->ArcInfo.DataStartPosition, // db->GetFolderStreamPos(folderIndex, 0);,
@@ -2534,15 +2143,15 @@ HRESULT Update(
2534
2143
  &decodedStream
2535
2144
  , dataAfterEnd_Error
2536
2145
 
2537
- Z7_7Z_DECODER_CRYPRO_VARS
2538
- #ifndef Z7_ST
2146
+ _7Z_DECODER_CRYPRO_VARS
2147
+ #ifndef _7ZIP_ST
2539
2148
  , false // mtMode
2540
2149
  , 1 // numThreads
2541
2150
  , 0 // memUsage
2542
2151
  #endif
2543
2152
  );
2544
2153
 
2545
- RINOK(res)
2154
+ RINOK(res);
2546
2155
  if (!decodedStream)
2547
2156
  return E_FAIL;
2548
2157
 
@@ -2554,44 +2163,33 @@ HRESULT Update(
2554
2163
  repackBase->_extractCallback = extractCallback;
2555
2164
 
2556
2165
  UInt32 startIndex = db->FolderStartFileIndex[folderIndex];
2557
- RINOK(repackBase->Init(startIndex, &extractStatuses))
2166
+ RINOK(repackBase->Init(startIndex, &extractStatuses));
2558
2167
 
2559
2168
  inStreamSizeCountSpec->_db = db;
2560
2169
  inStreamSizeCountSpec->Init(sbInStream, startIndex, &extractStatuses);
2561
2170
 
2562
- #ifndef Z7_ST
2171
+ #ifndef _7ZIP_ST
2563
2172
  if (options.MultiThreadMixer)
2564
2173
  {
2565
- WRes wres = threadDecoder.Start();
2566
- if (wres != 0)
2567
- return HRESULT_FROM_WIN32(wres);
2174
+ threadDecoder.Start();
2568
2175
  }
2569
2176
  #endif
2570
2177
  }
2571
2178
 
2572
- // curUnpackSize = sizeToEncode;
2179
+ curUnpackSize = sizeToEncode;
2573
2180
 
2574
- HRESULT encodeRes = encoder.Encode1(
2181
+ HRESULT encodeRes = encoder.Encode(
2575
2182
  EXTERNAL_CODECS_LOC_VARS
2576
2183
  inStreamSizeCount,
2577
2184
  // NULL,
2578
2185
  &inSizeForReduce,
2579
- sizeToEncode, // expectedDataSize
2580
- newDatabase.Folders.AddNew(),
2581
- // newDatabase.CoderUnpackSizes, curUnpackSize,
2582
- archive.SeqStream, newDatabase.PackSizes, lps);
2186
+ newDatabase.Folders.AddNew(), newDatabase.CoderUnpackSizes, curUnpackSize,
2187
+ archive.SeqStream, newDatabase.PackSizes, progress);
2583
2188
 
2584
2189
  if (encodeRes == k_My_HRESULT_CRC_ERROR)
2585
2190
  return E_FAIL;
2586
2191
 
2587
- curUnpackSize = inStreamSizeCountSpec->GetSize();
2588
-
2589
- if (encodeRes == S_OK)
2590
- {
2591
- encoder.Encode_Post(curUnpackSize, newDatabase.CoderUnpackSizes);
2592
- }
2593
-
2594
- #ifndef Z7_ST
2192
+ #ifndef _7ZIP_ST
2595
2193
  if (options.MultiThreadMixer)
2596
2194
  {
2597
2195
  // 16.00: hang was fixed : for case if decoding was not finished.
@@ -2599,13 +2197,9 @@ HRESULT Update(
2599
2197
  inStreamSizeCount.Release();
2600
2198
  sbInStream.Release();
2601
2199
 
2602
- {
2603
- const WRes wres = threadDecoder.WaitExecuteFinish();
2604
- if (wres != 0)
2605
- return HRESULT_FROM_WIN32(wres);
2606
- }
2200
+ threadDecoder.WaitExecuteFinish();
2607
2201
 
2608
- const HRESULT decodeRes = threadDecoder.Result;
2202
+ HRESULT decodeRes = threadDecoder.Result;
2609
2203
  // if (res == k_My_HRESULT_CRC_ERROR)
2610
2204
  if (decodeRes == S_FALSE || threadDecoder.dataAfterEnd_Error)
2611
2205
  {
@@ -2616,12 +2210,12 @@ HRESULT Update(
2616
2210
  // NEventIndexType::kBlockIndex, (UInt32)folderIndex,
2617
2211
  (decodeRes != S_OK ?
2618
2212
  NExtract::NOperationResult::kDataError :
2619
- NExtract::NOperationResult::kDataAfterEnd)))
2213
+ NExtract::NOperationResult::kDataAfterEnd)));
2620
2214
  }
2621
2215
  if (decodeRes != S_OK)
2622
2216
  return E_FAIL;
2623
2217
  }
2624
- RINOK(decodeRes)
2218
+ RINOK(decodeRes);
2625
2219
  if (encodeRes == S_OK)
2626
2220
  if (sb.ProcessedSize != sizeToEncode)
2627
2221
  encodeRes = E_FAIL;
@@ -2635,15 +2229,15 @@ HRESULT Update(
2635
2229
  {
2636
2230
  RINOK(extractCallback->ReportExtractResult(
2637
2231
  NEventIndexType::kBlockIndex, (UInt32)folderIndex,
2638
- NExtract::NOperationResult::kDataError))
2232
+ NExtract::NOperationResult::kDataError));
2639
2233
  }
2640
2234
  return E_FAIL;
2641
2235
  }
2642
- RINOK(FosSpec2->Result)
2236
+ RINOK(FosSpec2->Result);
2643
2237
  }
2644
2238
 
2645
- RINOK(encodeRes)
2646
- RINOK(repackBase->CheckFinishedState())
2239
+ RINOK(encodeRes);
2240
+ RINOK(repackBase->CheckFinishedState());
2647
2241
 
2648
2242
  if (curUnpackSize != sizeToEncode)
2649
2243
  return E_FAIL;
@@ -2662,10 +2256,10 @@ HRESULT Update(
2662
2256
  if (db->Files[fi].HasStream)
2663
2257
  {
2664
2258
  indexInFolder++;
2665
- const int updateIndex = fileIndexToUpdateIndexMap[fi];
2259
+ int updateIndex = fileIndexToUpdateIndexMap[fi];
2666
2260
  if (updateIndex >= 0)
2667
2261
  {
2668
- const CUpdateItem &ui = updateItems[(unsigned)updateIndex];
2262
+ const CUpdateItem &ui = updateItems[updateIndex];
2669
2263
  if (ui.NewData)
2670
2264
  continue;
2671
2265
 
@@ -2699,13 +2293,13 @@ HRESULT Update(
2699
2293
 
2700
2294
  // ---------- Compress files to new solid blocks ----------
2701
2295
 
2702
- const unsigned numFiles = group.Indices.Size();
2296
+ unsigned numFiles = group.Indices.Size();
2703
2297
  if (numFiles == 0)
2704
2298
  continue;
2705
2299
  CRecordVector<CRefItem> refItems;
2706
2300
  refItems.ClearAndSetSize(numFiles);
2707
2301
  // bool sortByType = (options.UseTypeSorting && isSoid); // numSolidFiles > 1
2708
- const bool sortByType = options.UseTypeSorting;
2302
+ bool sortByType = options.UseTypeSorting;
2709
2303
 
2710
2304
  unsigned i;
2711
2305
 
@@ -2721,7 +2315,7 @@ HRESULT Update(
2721
2315
 
2722
2316
  for (i = 0; i < numFiles; i++)
2723
2317
  {
2724
- const UInt32 index = refItems[i].Index;
2318
+ UInt32 index = refItems[i].Index;
2725
2319
  indices[i] = index;
2726
2320
  /*
2727
2321
  const CUpdateItem &ui = updateItems[index];
@@ -2751,9 +2345,9 @@ HRESULT Update(
2751
2345
  break;
2752
2346
  if (options.SolidExtension)
2753
2347
  {
2754
- const int slashPos = ui.Name.ReverseFind_PathSepar();
2755
- const int dotPos = ui.Name.ReverseFind_Dot();
2756
- const wchar_t *ext = ui.Name.Ptr(dotPos <= slashPos ? ui.Name.Len() : (unsigned)(dotPos + 1));
2348
+ int slashPos = ui.Name.ReverseFind_PathSepar();
2349
+ int dotPos = ui.Name.ReverseFind_Dot();
2350
+ const wchar_t *ext = ui.Name.Ptr(dotPos <= slashPos ? ui.Name.Len() : dotPos + 1);
2757
2351
  if (numSubFiles == 0)
2758
2352
  prevExtension = ext;
2759
2353
  else if (!StringsAreEqualNoCase(ext, prevExtension))
@@ -2764,76 +2358,38 @@ HRESULT Update(
2764
2358
  if (numSubFiles < 1)
2765
2359
  numSubFiles = 1;
2766
2360
 
2767
- RINOK(lps->SetCur())
2768
-
2769
- /*
2770
- const unsigned folderIndex = newDatabase.NumUnpackStreamsVector.Size();
2771
-
2772
- if (opCallback)
2773
- {
2774
- RINOK(opCallback->ReportOperation(
2775
- NEventIndexType::kBlockIndex, (UInt32)folderIndex,
2776
- NUpdateNotifyOp::kAdd));
2777
- }
2778
- */
2779
-
2780
-
2781
- CMyComPtr2_Create<ISequentialInStream, CFolderInStream> inStreamSpec; // solidInStream;
2782
-
2783
- // inStreamSpec->_reportArcProp = reportArcProp;
2784
-
2785
- inStreamSpec->Need_CTime = options.Need_CTime;
2786
- inStreamSpec->Need_ATime = options.Need_ATime;
2787
- inStreamSpec->Need_MTime = options.Need_MTime;
2788
- inStreamSpec->Need_Attrib = options.Need_Attrib;
2789
- // inStreamSpec->Need_Crc = options.Need_Crc;
2361
+ RINOK(lps->SetCur());
2790
2362
 
2363
+ CFolderInStream *inStreamSpec = new CFolderInStream;
2364
+ CMyComPtr<ISequentialInStream> solidInStream(inStreamSpec);
2791
2365
  inStreamSpec->Init(updateCallback, &indices[i], numSubFiles);
2792
2366
 
2793
2367
  unsigned startPackIndex = newDatabase.PackSizes.Size();
2794
- // UInt64 curFolderUnpackSize = totalSize;
2795
- // curFolderUnpackSize = (UInt64)(Int64)-1; // for debug
2796
- const UInt64 expectedDataSize = totalSize;
2797
-
2798
- // const unsigned folderIndex_New = newDatabase.Folders.Size();
2368
+ UInt64 curFolderUnpackSize = totalSize;
2369
+ // curFolderUnpackSize = (UInt64)(Int64)-1;
2799
2370
 
2800
- RINOK(encoder.Encode1(
2371
+ RINOK(encoder.Encode(
2801
2372
  EXTERNAL_CODECS_LOC_VARS
2802
- inStreamSpec,
2373
+ solidInStream,
2803
2374
  // NULL,
2804
2375
  &inSizeForReduce,
2805
- expectedDataSize, // expected size
2806
- newDatabase.Folders.AddNew(),
2807
- // newDatabase.CoderUnpackSizes, curFolderUnpackSize,
2808
- archive.SeqStream, newDatabase.PackSizes, lps))
2376
+ newDatabase.Folders.AddNew(), newDatabase.CoderUnpackSizes, curFolderUnpackSize,
2377
+ archive.SeqStream, newDatabase.PackSizes, progress));
2809
2378
 
2810
2379
  if (!inStreamSpec->WasFinished())
2811
2380
  return E_FAIL;
2812
2381
 
2813
- /*
2814
- if (inStreamSpec->Need_FolderCrc)
2815
- newDatabase.FolderUnpackCRCs.SetItem(folderIndex_New,
2816
- true, inStreamSpec->GetFolderCrc());
2817
- */
2818
-
2819
- const UInt64 curFolderUnpackSize = inStreamSpec->Get_TotalSize_for_Coder();
2820
- encoder.Encode_Post(curFolderUnpackSize, newDatabase.CoderUnpackSizes);
2821
-
2822
- UInt64 packSize = 0;
2823
- // const UInt32 numStreams = newDatabase.PackSizes.Size() - startPackIndex;
2824
2382
  for (; startPackIndex < newDatabase.PackSizes.Size(); startPackIndex++)
2825
- packSize += newDatabase.PackSizes[startPackIndex];
2826
- lps->OutSize += packSize;
2383
+ lps->OutSize += newDatabase.PackSizes[startPackIndex];
2827
2384
 
2385
+ lps->InSize += curFolderUnpackSize;
2828
2386
  // for ()
2829
2387
  // newDatabase.PackCRCsDefined.Add(false);
2830
2388
  // newDatabase.PackCRCs.Add(0);
2831
2389
 
2832
2390
  CNum numUnpackStreams = 0;
2833
2391
  UInt64 skippedSize = 0;
2834
- UInt64 procSize = 0;
2835
- // unsigned numProcessedFiles = 0;
2836
-
2392
+
2837
2393
  for (unsigned subIndex = 0; subIndex < numSubFiles; subIndex++)
2838
2394
  {
2839
2395
  const CUpdateItem &ui = updateItems[indices[i + subIndex]];
@@ -2847,8 +2403,8 @@ HRESULT Update(
2847
2403
  }
2848
2404
  else
2849
2405
  {
2850
- GetFile(*db, (unsigned)ui.IndexInArchive, file, file2);
2851
- db->GetPath((unsigned)ui.IndexInArchive, name);
2406
+ GetFile(*db, ui.IndexInArchive, file, file2);
2407
+ db->GetPath(ui.IndexInArchive, name);
2852
2408
  }
2853
2409
  if (file2.IsAnti || file.IsDir)
2854
2410
  return E_FAIL;
@@ -2859,21 +2415,18 @@ HRESULT Update(
2859
2415
  */
2860
2416
  if (!inStreamSpec->Processed[subIndex])
2861
2417
  {
2862
- // we don't add file here
2863
2418
  skippedSize += ui.Size;
2864
- continue; // comment it for debug
2865
- // name += ".locked"; // for debug
2419
+ continue;
2420
+ // file.Name += ".locked";
2866
2421
  }
2867
2422
 
2868
- // if (inStreamSpec->Need_Crc)
2869
2423
  file.Crc = inStreamSpec->CRCs[subIndex];
2870
2424
  file.Size = inStreamSpec->Sizes[subIndex];
2871
2425
 
2872
- procSize += file.Size;
2873
- // if (file.Size >= 0) // for debug: test purposes
2426
+ // if (file.Size >= 0) // test purposes
2874
2427
  if (file.Size != 0)
2875
2428
  {
2876
- file.CrcDefined = true; // inStreamSpec->Need_Crc;
2429
+ file.CrcDefined = true;
2877
2430
  file.HasStream = true;
2878
2431
  numUnpackStreams++;
2879
2432
  }
@@ -2883,23 +2436,6 @@ HRESULT Update(
2883
2436
  file.HasStream = false;
2884
2437
  }
2885
2438
 
2886
- if (inStreamSpec->TimesDefined[subIndex])
2887
- {
2888
- if (inStreamSpec->Need_CTime)
2889
- { file2.CTimeDefined = true; file2.CTime = inStreamSpec->CTimes[subIndex]; }
2890
- if (inStreamSpec->Need_ATime
2891
- // && !ui.ATime_WasReadByAnalysis
2892
- )
2893
- { file2.ATimeDefined = true; file2.ATime = inStreamSpec->ATimes[subIndex]; }
2894
- if (inStreamSpec->Need_MTime)
2895
- { file2.MTimeDefined = true; file2.MTime = inStreamSpec->MTimes[subIndex]; }
2896
- if (inStreamSpec->Need_Attrib)
2897
- {
2898
- file2.AttribDefined = true;
2899
- file2.Attrib = inStreamSpec->Attribs[subIndex];
2900
- }
2901
- }
2902
-
2903
2439
  /*
2904
2440
  file.Parent = ui.ParentFolderIndex;
2905
2441
  if (ui.TreeFolderIndex >= 0)
@@ -2907,79 +2443,9 @@ HRESULT Update(
2907
2443
  if (totalSecureDataSize != 0)
2908
2444
  newDatabase.SecureIDs.Add(ui.SecureIndex);
2909
2445
  */
2910
- /*
2911
- if (reportArcProp)
2912
- {
2913
- RINOK(ReportItemProps(reportArcProp, ui.IndexInClient, file.Size,
2914
- file.CrcDefined ? &file.Crc : NULL))
2915
- }
2916
- */
2917
-
2918
- // numProcessedFiles++;
2919
2446
  newDatabase.AddFile(file, file2, name);
2920
2447
  }
2921
2448
 
2922
- /*
2923
- // for debug:
2924
- // we can write crc to folders area, if folder contains only one file
2925
- if (numUnpackStreams == 1 && numSubFiles == 1)
2926
- {
2927
- const CFileItem &file = newDatabase.Files.Back();
2928
- if (file.CrcDefined)
2929
- newDatabase.FolderUnpackCRCs.SetItem(folderIndex_New, true, file.Crc);
2930
- }
2931
- */
2932
-
2933
- /*
2934
- // it's optional check to ensure that sizes are correct
2935
- if (inStreamSpec->TotalSize_for_Coder != curFolderUnpackSize)
2936
- return E_FAIL;
2937
- */
2938
- // if (inStreamSpec->AlignLog == 0)
2939
- {
2940
- if (procSize != curFolderUnpackSize)
2941
- return E_FAIL;
2942
- }
2943
- // else
2944
- {
2945
- /*
2946
- {
2947
- const CFolder &old = newDatabase.Folders.Back();
2948
- CFolder &folder = newDatabase.Folders.AddNew();
2949
- {
2950
- const unsigned numBonds = old.Bonds.Size();
2951
- folder.Bonds.SetSize(numBonds + 1);
2952
- for (unsigned k = 0; k < numBonds; k++)
2953
- folder.Bonds[k] = old.Bonds[k];
2954
- CBond &bond = folder.Bonds[numBonds];
2955
- bond.PackIndex = 0;
2956
- bond.UnpackIndex = 0;
2957
- }
2958
- {
2959
- const unsigned numCoders = old.Coders.Size();
2960
- folder.Coders.SetSize(numCoders + 1);
2961
- for (unsigned k = 0; k < numCoders; k++)
2962
- folder.Coders[k] = old.Coders[k];
2963
- CCoderInfo &cod = folder.Coders[numCoders];
2964
- cod.Props.Alloc(1);
2965
- cod.Props[0] = (Byte)inStreamSpec->AlignLog;
2966
- cod.NumStreams = 1;
2967
- }
2968
- {
2969
- const unsigned numPackStreams = old.Coders.Size();
2970
- folder.Coders.SetSize(numPackStreams);
2971
- for (unsigned k = 0; k < numPackStreams; k++)
2972
- folder.PackStreams[k] = old.PackStreams[k];
2973
- }
2974
- }
2975
- newDatabase.Folders.Delete(newDatabase.Folders.Size() - 2);
2976
- */
2977
- }
2978
-
2979
-
2980
- lps->InSize += procSize;
2981
- // lps->InSize += curFolderUnpackSize;
2982
-
2983
2449
  // numUnpackStreams = 0 is very bad case for locked files
2984
2450
  // v3.13 doesn't understand it.
2985
2451
  newDatabase.NumUnpackStreamsVector.Add(numUnpackStreams);
@@ -2988,50 +2454,12 @@ HRESULT Update(
2988
2454
  if (skippedSize != 0 && complexity >= skippedSize)
2989
2455
  {
2990
2456
  complexity -= skippedSize;
2991
- RINOK(updateCallback->SetTotal(complexity))
2457
+ RINOK(updateCallback->SetTotal(complexity));
2992
2458
  }
2993
-
2994
- /*
2995
- if (reportArcProp)
2996
- {
2997
- PROPVARIANT prop;
2998
- prop.vt = VT_EMPTY;
2999
- prop.wReserved1 = 0;
3000
- {
3001
- NWindows::NCOM::PropVarEm_Set_UInt32(&prop, numProcessedFiles);
3002
- RINOK(reportArcProp->ReportProp(
3003
- NEventIndexType::kBlockIndex, (UInt32)folderIndex, kpidNumSubFiles, &prop));
3004
- }
3005
- {
3006
- NWindows::NCOM::PropVarEm_Set_UInt64(&prop, curFolderUnpackSize);
3007
- RINOK(reportArcProp->ReportProp(
3008
- NEventIndexType::kBlockIndex, (UInt32)folderIndex, kpidSize, &prop));
3009
- }
3010
- {
3011
- NWindows::NCOM::PropVarEm_Set_UInt64(&prop, packSize);
3012
- RINOK(reportArcProp->ReportProp(
3013
- NEventIndexType::kBlockIndex, (UInt32)folderIndex, kpidPackSize, &prop));
3014
- }
3015
- {
3016
- NWindows::NCOM::PropVarEm_Set_UInt32(&prop, numStreams);
3017
- RINOK(reportArcProp->ReportProp(
3018
- NEventIndexType::kBlockIndex, (UInt32)folderIndex, kpidNumStreams, &prop));
3019
- }
3020
- RINOK(reportArcProp->ReportFinished(NEventIndexType::kBlockIndex, (UInt32)folderIndex, NUpdate::NOperationResult::kOK));
3021
- }
3022
- */
3023
- /*
3024
- if (opCallback)
3025
- {
3026
- RINOK(opCallback->ReportOperation(
3027
- NEventIndexType::kBlockIndex, (UInt32)folderIndex,
3028
- NUpdateNotifyOp::kOpFinished));
3029
- }
3030
- */
3031
2459
  }
3032
2460
  }
3033
2461
 
3034
- RINOK(lps->SetCur())
2462
+ RINOK(lps->SetCur());
3035
2463
 
3036
2464
  /*
3037
2465
  fileIndexToUpdateIndexMap.ClearAndFree();
@@ -3061,26 +2489,10 @@ HRESULT Update(
3061
2489
  }
3062
2490
  }
3063
2491
  */
3064
-
3065
- {
3066
- const unsigned numFolders = newDatabase.Folders.Size();
3067
- if (newDatabase.NumUnpackStreamsVector.Size() != numFolders
3068
- || newDatabase.FolderUnpackCRCs.Defs.Size() > numFolders)
3069
- return E_FAIL;
3070
- newDatabase.FolderUnpackCRCs.if_NonEmpty_FillResidue_with_false(numFolders);
3071
- }
3072
-
3073
- updateItems.ClearAndFree();
3074
2492
  newDatabase.ReserveDown();
3075
2493
 
3076
2494
  if (opCallback)
3077
- RINOK(opCallback->ReportOperation(NEventIndexType::kNoIndex, (UInt32)(Int32)-1, NUpdateNotifyOp::kHeader))
3078
-
3079
- RINOK(archive.WriteDatabase(EXTERNAL_CODECS_LOC_VARS
3080
- newDatabase, options.HeaderMethod, options.HeaderOptions))
3081
-
3082
- if (v_StreamSetRestriction)
3083
- RINOK(v_StreamSetRestriction->SetRestriction(0, 0))
2495
+ RINOK(opCallback->ReportOperation(NEventIndexType::kNoIndex, (UInt32)(Int32)-1, NUpdateNotifyOp::kHeader));
3084
2496
 
3085
2497
  return S_OK;
3086
2498
  }