react-native-update 10.34.3 → 10.34.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (805) hide show
  1. package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +34 -172
  2. package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +4 -4
  3. package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +63 -379
  4. package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +170 -415
  5. package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +10 -54
  6. package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +1 -13
  7. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +18 -171
  8. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +4 -5
  9. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +7 -38
  10. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +4 -15
  11. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +12 -22
  12. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +4 -22
  13. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +8 -0
  14. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffZ.cbp +219 -0
  15. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HPatchZ.cbp +156 -0
  16. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/unitTest.cbp +65 -0
  17. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +105 -155
  18. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +236 -363
  19. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj.user +3 -0
  20. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +317 -347
  21. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj.user +3 -0
  22. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +181 -295
  23. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj.user +3 -0
  24. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +0 -9
  25. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +14 -53
  26. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +32 -162
  27. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +22 -89
  28. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +13 -237
  29. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +2 -2
  30. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +14 -194
  31. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +10 -30
  32. package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +3 -458
  33. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +71 -106
  34. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +3 -3
  35. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +110 -484
  36. package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +193 -835
  37. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +50 -99
  38. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +4 -18
  39. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +8 -147
  40. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +6 -18
  41. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +25 -7
  42. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +113 -5
  43. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +97 -163
  44. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +39 -49
  45. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +15 -15
  46. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +2 -18
  47. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +4 -8
  48. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +57 -72
  49. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +13 -18
  50. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +1 -1
  51. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +2 -2
  52. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +2 -2
  53. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +2 -2
  54. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +2 -2
  55. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +1 -1
  56. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +100 -311
  57. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +72 -53
  58. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +487 -888
  59. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +28 -45
  60. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +247 -812
  61. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +544 -1265
  62. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +38 -123
  63. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +0 -115
  64. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +102 -272
  65. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +12 -22
  66. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +4 -18
  67. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +5 -7
  68. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/{divsufsort.cpp → divsufsort.c} +8 -5
  69. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +164 -91
  70. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +102 -5
  71. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.c +13 -0
  72. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +97 -1
  73. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +44 -23
  74. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +89 -54
  75. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +55 -48
  76. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/utils.c.inc.h +381 -0
  77. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +47 -110
  78. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +4 -11
  79. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +26 -53
  80. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +25 -103
  81. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +130 -271
  82. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +7 -17
  83. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +37 -628
  84. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +43 -203
  85. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +10 -14
  86. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +7 -22
  87. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +46 -132
  88. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +9 -48
  89. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +299 -650
  90. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +82 -120
  91. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +7 -87
  92. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +9 -119
  93. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +6 -2
  94. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +15 -192
  95. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.cpp +367 -0
  96. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +56 -31
  97. package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +1 -1
  98. package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +1 -0
  99. package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +31 -225
  100. package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +94 -566
  101. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +28 -222
  102. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +117 -228
  103. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +173 -678
  104. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +22 -103
  105. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +167 -485
  106. package/harmony/pushy/src/main/cpp/lzma/C/7z.h +6 -8
  107. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +30 -39
  108. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +3 -3
  109. package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +217 -232
  110. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +3 -3
  111. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +68 -404
  112. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +6 -9
  113. package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +79 -163
  114. package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +78 -160
  115. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +58 -215
  116. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +6 -15
  117. package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +23 -46
  118. package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +89 -311
  119. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +5 -5
  120. package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +68 -191
  121. package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +8 -30
  122. package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +108 -926
  123. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +96 -246
  124. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +8 -33
  125. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +144 -177
  126. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +42 -228
  127. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +182 -377
  128. package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +143 -622
  129. package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +40 -81
  130. package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +58 -163
  131. package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +48 -9
  132. package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +15 -228
  133. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +133 -885
  134. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +78 -428
  135. package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +31 -136
  136. package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +3 -3
  137. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +62 -53
  138. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +5 -5
  139. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +495 -1114
  140. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +25 -64
  141. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +400 -969
  142. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +24 -37
  143. package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +48 -25
  144. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +7 -12
  145. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +7 -8
  146. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +83 -96
  147. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +9 -11
  148. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +92 -96
  149. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +9 -12
  150. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +3 -3
  151. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +4 -3
  152. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +6 -3
  153. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +206 -384
  154. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +8 -11
  155. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +315 -489
  156. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +9 -18
  157. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +3 -5
  158. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +14 -21
  159. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +87 -90
  160. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +25 -28
  161. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +88 -74
  162. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +20 -21
  163. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +34 -118
  164. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +293 -712
  165. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +70 -109
  166. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +116 -237
  167. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +95 -245
  168. package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +5 -122
  169. package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +4 -24
  170. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +143 -387
  171. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +7 -67
  172. package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +114 -241
  173. package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +7 -4
  174. package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +14 -731
  175. package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +14 -204
  176. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.c +396 -0
  177. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.h +31 -0
  178. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +2 -10
  179. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +79 -282
  180. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +7 -10
  181. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +3 -7
  182. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +75 -32
  183. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +56 -111
  184. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +0 -24
  185. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +0 -2
  186. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +41 -18
  187. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +2 -30
  188. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +6 -7
  189. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +2 -27
  190. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +7 -10
  191. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +22 -39
  192. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +2 -9
  193. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +1 -3
  194. package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +3 -5
  195. package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +47 -129
  196. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +43 -97
  197. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +8 -8
  198. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +36 -228
  199. package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +295 -405
  200. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +139 -194
  201. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +11 -15
  202. package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +134 -200
  203. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +6 -6
  204. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +1 -4
  205. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +13 -29
  206. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +90 -120
  207. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +6 -9
  208. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +140 -183
  209. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +20 -23
  210. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +57 -78
  211. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +44 -169
  212. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +17 -57
  213. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +109 -141
  214. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +57 -54
  215. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +116 -336
  216. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +1 -1
  217. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +9 -17
  218. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +136 -234
  219. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +26 -35
  220. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +5 -10
  221. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +155 -280
  222. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +40 -51
  223. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +59 -67
  224. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +2 -6
  225. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +2 -8
  226. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +3 -12
  227. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +9 -23
  228. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +387 -975
  229. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +16 -44
  230. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +2 -5
  231. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +0 -2
  232. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +0 -2
  233. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +8 -15
  234. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +87 -106
  235. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +57 -57
  236. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +1 -1
  237. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +8 -6
  238. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +43 -126
  239. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +18 -77
  240. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +9 -20
  241. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +23 -20
  242. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +9 -61
  243. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +3 -8
  244. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +27 -29
  245. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +26 -23
  246. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +2 -2
  247. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +8 -6
  248. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +2 -2
  249. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +2 -5
  250. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +10 -63
  251. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +173 -319
  252. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +113 -92
  253. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +53 -47
  254. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +2 -5
  255. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +208 -352
  256. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +2 -2
  257. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +3 -6
  258. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +47 -227
  259. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +2 -5
  260. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +5 -19
  261. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +2 -5
  262. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +2 -4
  263. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +2 -5
  264. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +1 -6
  265. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +53 -71
  266. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +22 -85
  267. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +2 -5
  268. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +4 -13
  269. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +166 -102
  270. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +4 -109
  271. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +30 -69
  272. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +2 -5
  273. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +7 -10
  274. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +1 -5
  275. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +16 -16
  276. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +12 -9
  277. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +9 -7
  278. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +2 -2
  279. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +5 -74
  280. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +51 -58
  281. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +10 -3
  282. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +5 -9
  283. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +6 -92
  284. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +19 -46
  285. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +11 -3
  286. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +5 -11
  287. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +0 -5
  288. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +28 -136
  289. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +5 -67
  290. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +62 -74
  291. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +24 -32
  292. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +7 -7
  293. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +2 -2
  294. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +100 -548
  295. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +86 -125
  296. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +116 -258
  297. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +76 -72
  298. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +15 -34
  299. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +9 -38
  300. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +82 -192
  301. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +28 -25
  302. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +52 -78
  303. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +83 -52
  304. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +2 -2
  305. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +2 -2
  306. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +67 -323
  307. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +38 -123
  308. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +8 -6
  309. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +13 -9
  310. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +12 -12
  311. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +7 -74
  312. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +5 -5
  313. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +13 -11
  314. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +1 -10
  315. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +14 -16
  316. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +16 -16
  317. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +2 -5
  318. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +50 -45
  319. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +21 -39
  320. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +42 -47
  321. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +53 -42
  322. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +4 -49
  323. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +2 -20
  324. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +4 -4
  325. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +5 -20
  326. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +9 -8
  327. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +5 -5
  328. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +355 -556
  329. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +59 -66
  330. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +2 -2
  331. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +6 -6
  332. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +13 -19
  333. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +2 -2
  334. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +5 -88
  335. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +18 -42
  336. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +16 -33
  337. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +53 -52
  338. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +30 -64
  339. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +22 -55
  340. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +26 -11
  341. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +28 -26
  342. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +28 -30
  343. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +54 -45
  344. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +12 -24
  345. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +22 -10
  346. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +1 -1
  347. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +26 -33
  348. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +51 -51
  349. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +40 -232
  350. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +14 -13
  351. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +1 -1
  352. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +35 -84
  353. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +41 -42
  354. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +25 -66
  355. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +17 -8
  356. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +1 -1
  357. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +2 -5
  358. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +12 -13
  359. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +32 -26
  360. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +16 -14
  361. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +20 -9
  362. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +1 -1
  363. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +1 -1
  364. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +32 -67
  365. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +18 -30
  366. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +3 -3
  367. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +43 -208
  368. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +25 -90
  369. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +4 -17
  370. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +21 -29
  371. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +3 -4
  372. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +2 -5
  373. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +3 -38
  374. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +3 -26
  375. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +172 -253
  376. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +7 -55
  377. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +12 -43
  378. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +9 -10
  379. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +50 -133
  380. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +2 -4
  381. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +1 -1
  382. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +2 -53
  383. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +177 -329
  384. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +1 -97
  385. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +2 -5
  386. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +1 -2
  387. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +183 -687
  388. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +15 -49
  389. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +913 -2275
  390. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +115 -353
  391. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +106 -127
  392. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +3 -9
  393. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +35 -272
  394. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +64 -134
  395. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +1200 -2608
  396. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +20 -64
  397. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +1 -1
  398. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +2 -2
  399. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +36 -253
  400. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +233 -774
  401. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +6 -2
  402. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +2 -2
  403. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +63 -156
  404. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +10 -23
  405. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +2 -12
  406. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +6 -22
  407. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +4 -4
  408. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +65 -1991
  409. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +29 -241
  410. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +47 -45
  411. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +179 -442
  412. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +89 -147
  413. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +380 -529
  414. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +42 -75
  415. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +86 -163
  416. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +5 -5
  417. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +2 -2
  418. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +15 -23
  419. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +2 -2
  420. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +2 -2
  421. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +2 -5
  422. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +1 -2
  423. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +2 -5
  424. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +368 -595
  425. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +47 -68
  426. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +2 -2
  427. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +146 -444
  428. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +68 -103
  429. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +42 -111
  430. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +2 -2
  431. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +3 -7
  432. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +6 -11
  433. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +35 -25
  434. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +4 -8
  435. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +9 -91
  436. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +4 -4
  437. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +2 -2
  438. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +1 -4
  439. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +0 -3
  440. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +19 -48
  441. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +12 -18
  442. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +41 -162
  443. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +41 -88
  444. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +81 -140
  445. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +17 -27
  446. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +124 -182
  447. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +7 -22
  448. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +109 -590
  449. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +2 -62
  450. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +3 -3
  451. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +10 -17
  452. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +10 -13
  453. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +9 -13
  454. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +2 -5
  455. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +24 -320
  456. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +26 -50
  457. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +5 -13
  458. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +2 -2
  459. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +2 -6
  460. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +6 -12
  461. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +4 -4
  462. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +195 -302
  463. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +4 -15
  464. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +2 -2
  465. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +6 -6
  466. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +2 -2
  467. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +181 -416
  468. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +197 -216
  469. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +2 -2
  470. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +5 -13
  471. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +5 -48
  472. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +49 -215
  473. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +30 -50
  474. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +1 -3
  475. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +3 -5
  476. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +5 -5
  477. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +6 -6
  478. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +0 -4
  479. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +10 -15
  480. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +17 -18
  481. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +130 -276
  482. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +52 -56
  483. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +1 -2
  484. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +3 -8
  485. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +2 -2
  486. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +0 -9
  487. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +89 -185
  488. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +20 -23
  489. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +1 -23
  490. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +0 -10
  491. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +4 -4
  492. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +33 -36
  493. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +15 -15
  494. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +22 -39
  495. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +3 -4
  496. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +2 -2
  497. package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +13 -109
  498. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +14 -25
  499. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +1 -1
  500. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +90 -1
  501. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +49 -2
  502. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +2 -2
  503. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +7 -41
  504. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +3 -3
  505. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +29 -14
  506. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +45 -24
  507. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +2 -3
  508. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +5 -17
  509. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +110 -132
  510. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +9 -35
  511. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +5 -12
  512. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +31 -49
  513. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +4 -4
  514. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +21 -59
  515. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +10 -95
  516. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +81 -497
  517. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +2 -2
  518. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +9 -18
  519. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +5 -17
  520. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +2 -35
  521. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +164 -347
  522. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +35 -246
  523. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +8 -11
  524. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +11 -2
  525. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +94 -184
  526. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +11 -158
  527. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +54 -148
  528. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +27 -204
  529. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +5 -38
  530. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +16 -43
  531. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +2 -2
  532. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +11 -20
  533. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +5 -13
  534. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +39 -124
  535. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +11 -27
  536. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +15 -458
  537. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +2 -24
  538. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +89 -99
  539. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +2 -19
  540. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +11 -10
  541. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +2 -2
  542. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +102 -677
  543. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +5 -377
  544. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +84 -197
  545. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +25 -107
  546. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +14 -11
  547. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +8 -24
  548. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +113 -197
  549. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +12 -32
  550. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +4 -4
  551. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +10 -22
  552. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +6 -6
  553. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +47 -242
  554. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +51 -94
  555. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +2 -2
  556. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +4 -4
  557. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +26 -33
  558. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +22 -32
  559. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +13 -13
  560. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +34 -56
  561. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +9 -9
  562. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +3 -3
  563. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +2 -2
  564. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +5 -5
  565. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +2 -5
  566. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +3 -3
  567. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +2 -2
  568. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +6 -8
  569. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +7 -9
  570. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +8 -77
  571. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +10 -55
  572. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +4 -4
  573. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +2 -69
  574. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +2 -3
  575. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +80 -728
  576. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +7 -62
  577. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +56 -756
  578. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +19 -205
  579. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +47 -569
  580. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +28 -283
  581. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +112 -369
  582. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +3 -3
  583. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +113 -185
  584. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +14 -41
  585. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +10 -66
  586. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +2 -6
  587. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +4 -6
  588. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +14 -29
  589. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +2 -2
  590. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +2 -14
  591. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +56 -102
  592. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +9 -68
  593. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +14 -150
  594. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +3 -13
  595. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +128 -212
  596. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +20 -32
  597. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +4 -4
  598. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +2 -3
  599. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +18 -23
  600. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +56 -39
  601. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +58 -539
  602. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +14 -49
  603. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +2 -5
  604. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +0 -77
  605. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +18 -240
  606. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +38 -317
  607. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +5 -154
  608. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +10 -18
  609. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +37 -291
  610. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +10 -124
  611. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +7 -7
  612. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +19 -98
  613. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj +90 -0
  614. package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +2 -6
  615. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +0 -205
  616. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +13 -93
  617. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +13 -30
  618. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2.sfx +0 -0
  619. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2con.sfx +0 -0
  620. package/harmony/pushy/src/main/cpp/lzma/bin/7zSD.sfx +0 -0
  621. package/harmony/pushy/src/main/cpp/lzma/bin/7zdec.exe +0 -0
  622. package/harmony/pushy/src/main/cpp/lzma/bin/7zr.exe +0 -0
  623. package/harmony/pushy/src/main/cpp/lzma/bin/lzma.exe +0 -0
  624. package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
  625. package/package.json +1 -1
  626. package/react-native-update.podspec +0 -1
  627. package/react-native.config.js +1 -0
  628. package/src/client.ts +1 -2
  629. package/src/type.ts +1 -0
  630. package/harmony/pushy/src/main/cpp/HDiffPatch/README_cn.md +0 -547
  631. package/harmony/pushy/src/main/cpp/HDiffPatch/_hextobytes.h +0 -112
  632. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +0 -389
  633. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +0 -73
  634. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +0 -266
  635. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +0 -58
  636. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +0 -1
  637. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +0 -1
  638. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/bzip2.vcxproj +0 -228
  639. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/hpatchz_test.vcxproj +0 -215
  640. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/libdeflate.vcxproj +0 -256
  641. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/longPathAware.exe.manifest +0 -7
  642. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/lzma.vcxproj +0 -271
  643. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/testHashClash.vcxproj +0 -228
  644. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zlib.vcxproj +0 -242
  645. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zstd.vcxproj +0 -287
  646. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
  647. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +0 -286
  648. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +0 -308
  649. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +0 -33
  650. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +0 -33
  651. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +0 -774
  652. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.c +0 -31
  653. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.h +0 -42
  654. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +0 -74
  655. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +0 -478
  656. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.h +0 -222
  657. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +0 -14
  658. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.cpp +0 -168
  659. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.h +0 -44
  660. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +0 -125
  661. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.c +0 -243
  662. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.h +0 -51
  663. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.c +0 -153
  664. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.h +0 -54
  665. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.c +0 -158
  666. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.h +0 -49
  667. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.c +0 -294
  668. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.h +0 -59
  669. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_patch_private_mt.h +0 -217
  670. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.c +0 -349
  671. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.h +0 -110
  672. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +0 -366
  673. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +0 -91
  674. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +0 -31
  675. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +0 -106
  676. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.c +0 -497
  677. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.h +0 -106
  678. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.cpp +0 -254
  679. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.h +0 -39
  680. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_sign_diff_type.h +0 -37
  681. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.cpp +0 -62
  682. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.h +0 -44
  683. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +0 -156
  684. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +0 -440
  685. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.h +0 -88
  686. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.cpp +0 -332
  687. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.h +0 -48
  688. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_types.h +0 -198
  689. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.cpp +0 -697
  690. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.h +0 -74
  691. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_private.h +0 -262
  692. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type.h +0 -174
  693. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +0 -174
  694. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +0 -252
  695. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.h +0 -67
  696. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +0 -680
  697. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.h +0 -137
  698. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +0 -83
  699. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +0 -125
  700. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.h +0 -56
  701. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +0 -55
  702. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.cpp +0 -147
  703. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.h +0 -38
  704. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +0 -354
  705. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.h +0 -76
  706. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.cpp +0 -521
  707. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.h +0 -69
  708. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +0 -122
  709. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_private.h +0 -66
  710. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type.h +0 -36
  711. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type_private.h +0 -81
  712. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.cpp +0 -247
  713. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.h +0 -71
  714. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.cpp +0 -351
  715. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.h +0 -42
  716. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.cpp +0 -124
  717. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.h +0 -38
  718. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.cpp +0 -203
  719. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.h +0 -55
  720. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.cpp +0 -79
  721. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.h +0 -66
  722. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +0 -628
  723. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +0 -95
  724. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +0 -78
  725. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +0 -950
  726. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +0 -72
  727. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/7zAsm.S +0 -181
  728. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/LzmaDecOpt.S +0 -1487
  729. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzFindOpt.asm +0 -540
  730. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sha256Opt.asm +0 -275
  731. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sort.asm +0 -860
  732. package/harmony/pushy/src/main/cpp/lzma/C/7zWindows.h +0 -101
  733. package/harmony/pushy/src/main/cpp/lzma/C/7zip_gcc_c.mak +0 -360
  734. package/harmony/pushy/src/main/cpp/lzma/C/Asm_c.mak +0 -12
  735. package/harmony/pushy/src/main/cpp/lzma/C/LzFindOpt.c +0 -578
  736. package/harmony/pushy/src/main/cpp/lzma/C/Sha256Opt.c +0 -451
  737. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.c +0 -835
  738. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.h +0 -17
  739. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/Precomp.h +0 -13
  740. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.c +0 -4
  741. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.h +0 -13
  742. package/harmony/pushy/src/main/cpp/lzma/C/var_clang.mak +0 -11
  743. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_arm64.mak +0 -12
  744. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x64.mak +0 -11
  745. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x86.mak +0 -11
  746. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc.mak +0 -12
  747. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_arm64.mak +0 -12
  748. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x64.mak +0 -10
  749. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x86.mak +0 -10
  750. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_arm64.mak +0 -11
  751. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_x64.mak +0 -11
  752. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang.mak +0 -1
  753. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang_mac.mak +0 -1
  754. package/harmony/pushy/src/main/cpp/lzma/C/warn_gcc.mak +0 -51
  755. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip_gcc.mak +0 -1370
  756. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +0 -279
  757. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +0 -215
  758. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.cpp +0 -855
  759. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.h +0 -160
  760. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzFindOpt.mak +0 -7
  761. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec_gcc.mak +0 -14
  762. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sha256.mak +0 -13
  763. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sort.mak +0 -6
  764. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile.gcc +0 -72
  765. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile.gcc +0 -187
  766. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +0 -218
  767. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.h +0 -48
  768. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +0 -13
  769. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/StdAfx.h +0 -67
  770. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +0 -23
  771. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang.mak +0 -3
  772. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_arm64.mak +0 -3
  773. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x64.mak +0 -3
  774. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x86.mak +0 -3
  775. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc.mak +0 -3
  776. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_arm64.mak +0 -3
  777. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x64.mak +0 -3
  778. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x86.mak +0 -3
  779. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_arm64.mak +0 -3
  780. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_x64.mak +0 -3
  781. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang.mak +0 -11
  782. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_arm64.mak +0 -19
  783. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x64.mak +0 -11
  784. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x86.mak +0 -11
  785. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc.mak +0 -12
  786. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_arm64.mak +0 -12
  787. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x64.mak +0 -11
  788. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x86.mak +0 -10
  789. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_arm64.mak +0 -13
  790. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_x64.mak +0 -11
  791. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang.mak +0 -3
  792. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang_mac.mak +0 -9
  793. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_gcc.mak +0 -55
  794. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common0.h +0 -330
  795. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.cpp +0 -93
  796. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.h +0 -41
  797. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/LzFindPrepare.cpp +0 -7
  798. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Prepare.cpp +0 -7
  799. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.cpp +0 -130
  800. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.h +0 -28
  801. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.cpp +0 -36
  802. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.h +0 -55
  803. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.cpp +0 -1251
  804. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.h +0 -19
  805. package/ios/ImportReact.h +0 -2
@@ -28,8 +28,7 @@
28
28
  #ifndef HPatch_decompress_plugin_demo_h
29
29
  #define HPatch_decompress_plugin_demo_h
30
30
  //decompress plugin demo:
31
- // zlibDecompressPlugin; // support all deflate encoding by zlib
32
- // ldefDecompressPlugin; // optimized deompress speed for deflate encoding
31
+ // zlibDecompressPlugin;
33
32
  // bz2DecompressPlugin;
34
33
  // lzmaDecompressPlugin;
35
34
  // lzma2DecompressPlugin;
@@ -37,44 +36,19 @@
37
36
  // zstdDecompressPlugin;
38
37
  // brotliDecompressPlugin;
39
38
  // lzhamDecompressPlugin;
40
- // tuzDecompressPlugin;
41
39
 
42
- // _bz2DecompressPlugin_unsz : support for bspatch_with_cache()
43
- // _7zXZDecompressPlugin : support for vcpatch_with_cache(), diffData created by "xdelta3 -S lzma ..."
44
- // _7zXZDecompressPlugin_a : support for vcpatch_with_cache(), diffData created by "hdiffz -VCD-compressLevel ..."
45
40
  #include <stdlib.h> //malloc free
46
41
  #include <stdio.h> //fprintf
47
42
  #include "libHDiffPatch/HPatch/patch_types.h"
48
43
 
49
44
  #ifndef kDecompressBufSize
50
- # define kDecompressBufSize (1024*32)
45
+ # define kDecompressBufSize (1024*16)
51
46
  #endif
52
47
  #ifndef _IsNeedIncludeDefaultCompressHead
53
48
  # define _IsNeedIncludeDefaultCompressHead 1
54
49
  #endif
55
50
 
56
- #define _dec_memErr() _hpatch_update_decError(decompressPlugin,hpatch_dec_mem_error)
57
- #define _dec_memErr_rt() do { _dec_memErr(); return 0; } while(0)
58
- #define _dec_openErr_rt() do { _hpatch_update_decError(decompressPlugin,hpatch_dec_open_error); return 0; } while(0)
59
- #define _dec_close_check(value) { if (!(value)) { LOG_ERR("check "#value " ERROR!\n"); \
60
- result=hpatch_FALSE; _hpatch_update_decError(decompressPlugin,hpatch_dec_close_error); } }
61
-
62
- #define _dec_onDecErr_rt() do { if (!(self)->decError) (self)->decError=hpatch_dec_error; return 0; } while(0)
63
- #define _dec_onDecErr_up() do { if ((self)->decError) _hpatch_update_decError(decompressPlugin,(self)->decError); } while(0)
64
-
65
- static void* _dec_malloc(hpatch_size_t size) {
66
- void* result=malloc(size);
67
- if (!result) LOG_ERRNO(errno);
68
- return result;
69
- }
70
- #define __dec_Alloc_fun(_type_TDecompress,p,size) { \
71
- void* result=_dec_malloc(size); \
72
- if (!result) \
73
- ((_type_TDecompress*)p)->decError=hpatch_dec_mem_error; \
74
- return result; }
75
-
76
- static void __dec_free(void* _, void* address){
77
- if (address) free(address); }
51
+ #define _close_check(value) { if (!(value)) { fprintf(stderr,"check "#value " ERROR!\n"); result=hpatch_FALSE; } }
78
52
 
79
53
  #ifdef _CompressPlugin_zlib
80
54
  #if (_IsNeedIncludeDefaultCompressHead)
@@ -89,42 +63,42 @@ static void __dec_free(void* _, void* address){
89
63
  size_t dec_buf_size;
90
64
  z_stream d_stream;
91
65
  signed char windowBits;
92
- hpatch_dec_error_t decError;
93
66
  } _zlib_TDecompress;
94
- static void * __zlib_dec_Alloc(void* p,uInt items,uInt size)
95
- __dec_Alloc_fun(_zlib_TDecompress,p,((items)*(size_t)(size)))
96
67
  static hpatch_BOOL _zlib_is_can_open(const char* compressType){
97
68
  return (0==strcmp(compressType,"zlib"))||(0==strcmp(compressType,"pzlib"));
98
69
  }
99
70
 
100
- static _zlib_TDecompress* _zlib_decompress_open_at(hpatch_TDecompress* decompressPlugin,
71
+ static _zlib_TDecompress* _zlib_decompress_open_by(hpatch_TDecompress* decompressPlugin,
101
72
  const hpatch_TStreamInput* codeStream,
102
73
  hpatch_StreamPos_t code_begin,
103
74
  hpatch_StreamPos_t code_end,
104
75
  int isSavedWindowBits,
105
- _zlib_TDecompress* self,size_t _self_and_buf_size){
76
+ unsigned char* _mem_buf,size_t _mem_buf_size){
77
+ _zlib_TDecompress* self=0;
106
78
  int ret;
107
79
  signed char kWindowBits=-MAX_WBITS;
108
- assert(_self_and_buf_size>sizeof(_zlib_TDecompress));
109
80
  if (isSavedWindowBits){//load kWindowBits
110
- if (code_end-code_begin<1) _dec_openErr_rt();
81
+ if (code_end-code_begin<1) return 0;
111
82
  if (!codeStream->read(codeStream,code_begin,(unsigned char*)&kWindowBits,
112
83
  (unsigned char*)&kWindowBits+1)) return 0;
113
84
  ++code_begin;
114
85
  }
115
86
 
87
+ self=(_zlib_TDecompress*)_hpatch_align_upper(_mem_buf,sizeof(hpatch_StreamPos_t));
88
+ assert((_mem_buf+_mem_buf_size)>((unsigned char*)self+sizeof(_zlib_TDecompress)));
89
+ _mem_buf_size=(_mem_buf+_mem_buf_size)-((unsigned char*)self+sizeof(_zlib_TDecompress));
90
+ _mem_buf=(unsigned char*)self+sizeof(_zlib_TDecompress);
91
+
116
92
  memset(self,0,sizeof(_zlib_TDecompress));
117
- self->dec_buf=((unsigned char*)self)+sizeof(_zlib_TDecompress);
118
- self->dec_buf_size=_self_and_buf_size-sizeof(_zlib_TDecompress);
93
+ self->dec_buf=_mem_buf;
94
+ self->dec_buf_size=_mem_buf_size;
119
95
  self->codeStream=codeStream;
120
96
  self->code_begin=code_begin;
121
97
  self->code_end=code_end;
122
98
  self->windowBits=kWindowBits;
123
- self->d_stream.zalloc=__zlib_dec_Alloc;
124
- self->d_stream.zfree=__dec_free;
125
- self->d_stream.opaque=self;
99
+
126
100
  ret = inflateInit2(&self->d_stream,self->windowBits);
127
- if (ret!=Z_OK) { _dec_onDecErr_up(); _dec_openErr_rt(); }
101
+ if (ret!=Z_OK) return 0;
128
102
  return self;
129
103
  }
130
104
  static hpatch_decompressHandle _zlib_decompress_open(hpatch_TDecompress* decompressPlugin,
@@ -133,10 +107,10 @@ static void __dec_free(void* _, void* address){
133
107
  hpatch_StreamPos_t code_begin,
134
108
  hpatch_StreamPos_t code_end){
135
109
  _zlib_TDecompress* self=0;
136
- unsigned char* _mem_buf=(unsigned char*)_dec_malloc(sizeof(_zlib_TDecompress)+kDecompressBufSize);
137
- if (!_mem_buf) _dec_memErr_rt();
138
- self=_zlib_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,1,
139
- (_zlib_TDecompress*)_mem_buf,sizeof(_zlib_TDecompress)+kDecompressBufSize);
110
+ unsigned char* _mem_buf=(unsigned char*)malloc(sizeof(_zlib_TDecompress)+kDecompressBufSize);
111
+ if (!_mem_buf) return 0;
112
+ self=_zlib_decompress_open_by(decompressPlugin,codeStream,code_begin,code_end,1,
113
+ _mem_buf,sizeof(_zlib_TDecompress)+kDecompressBufSize);
140
114
  if (!self)
141
115
  free(_mem_buf);
142
116
  return self;
@@ -147,42 +121,24 @@ static void __dec_free(void* _, void* address){
147
121
  hpatch_StreamPos_t code_begin,
148
122
  hpatch_StreamPos_t code_end){
149
123
  _zlib_TDecompress* self=0;
150
- unsigned char* _mem_buf=(unsigned char*)_dec_malloc(sizeof(_zlib_TDecompress)+kDecompressBufSize);
151
- if (!_mem_buf) _dec_memErr_rt();
152
- self=_zlib_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,0,
153
- (_zlib_TDecompress*)_mem_buf,sizeof(_zlib_TDecompress)+kDecompressBufSize);
124
+ unsigned char* _mem_buf=(unsigned char*)malloc(sizeof(_zlib_TDecompress)+kDecompressBufSize);
125
+ if (!_mem_buf) return 0;
126
+ self=_zlib_decompress_open_by(decompressPlugin,codeStream,code_begin,code_end,0,
127
+ _mem_buf,sizeof(_zlib_TDecompress)+kDecompressBufSize);
154
128
  if (!self)
155
129
  free(_mem_buf);
156
130
  return self;
157
131
  }
158
-
159
- static _zlib_TDecompress* _zlib_decompress_open_by(hpatch_TDecompress* decompressPlugin,
160
- const hpatch_TStreamInput* codeStream,
161
- hpatch_StreamPos_t code_begin,
162
- hpatch_StreamPos_t code_end,
163
- int isSavedWindowBits,
164
- unsigned char* _mem_buf,size_t _mem_buf_size){
165
- #define __MAX_TS(a,b) ((a)>=(b)?(a):(b))
166
- const hpatch_size_t kZlibAlign=__MAX_TS(__MAX_TS(sizeof(hpatch_StreamPos_t),sizeof(void*)),sizeof(uLongf));
167
- #undef __MAX_TS
168
- unsigned char* _mem_buf_end=_mem_buf+_mem_buf_size;
169
- unsigned char* self_at=(unsigned char*)_hpatch_align_upper(_mem_buf,kZlibAlign);
170
- if (self_at>=_mem_buf_end) return 0;
171
- return _zlib_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,isSavedWindowBits,
172
- (_zlib_TDecompress*)self_at,_mem_buf_end-self_at);
173
- }
174
132
  static hpatch_BOOL _zlib_decompress_close_by(struct hpatch_TDecompress* decompressPlugin,
175
133
  _zlib_TDecompress* self){
176
134
  hpatch_BOOL result=hpatch_TRUE;
177
135
  if (!self) return result;
178
- _dec_onDecErr_up();
179
136
  if (self->d_stream.state!=0){
180
- _dec_close_check(Z_OK==inflateEnd(&self->d_stream));
137
+ _close_check(Z_OK==inflateEnd(&self->d_stream));
181
138
  }
182
139
  memset(self,0,sizeof(_zlib_TDecompress));
183
140
  return result;
184
141
  }
185
-
186
142
  static hpatch_BOOL _zlib_decompress_close(struct hpatch_TDecompress* decompressPlugin,
187
143
  hpatch_decompressHandle decompressHandle){
188
144
  _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
@@ -190,22 +146,23 @@ static void __dec_free(void* _, void* address){
190
146
  if (self) free(self);
191
147
  return result;
192
148
  }
193
-
194
- static hpatch_BOOL _zlib_reset_for_next_node(z_stream* d_stream){
195
- //backup
196
- Bytef* next_out_back=d_stream->next_out;
197
- Bytef* next_in_back=d_stream->next_in;
198
- unsigned int avail_out_back=d_stream->avail_out;
199
- unsigned int avail_in_back=d_stream->avail_in;
200
- //reset
201
- if (Z_OK!=inflateReset(d_stream)) return hpatch_FALSE;
202
- //restore
203
- d_stream->next_out=next_out_back;
204
- d_stream->next_in=next_in_back;
205
- d_stream->avail_out=avail_out_back;
206
- d_stream->avail_in=avail_in_back;
207
- return hpatch_TRUE;
208
- }
149
+ static hpatch_BOOL _zlib_reset_for_next_node(_zlib_TDecompress* self){
150
+ //backup
151
+ Bytef* next_out_back=self->d_stream.next_out;
152
+ Bytef* next_in_back=self->d_stream.next_in;
153
+ unsigned int avail_out_back=self->d_stream.avail_out;
154
+ unsigned int avail_in_back=self->d_stream.avail_in;
155
+ //reset
156
+ //if (Z_OK!=inflateEnd(&self->d_stream)) return hpatch_FALSE;
157
+ //if (Z_OK!=inflateInit2(&self->d_stream,self->windowBits)) return hpatch_FALSE;
158
+ if (Z_OK!=inflateReset(&self->d_stream)) return hpatch_FALSE;
159
+ //restore
160
+ self->d_stream.next_out=next_out_back;
161
+ self->d_stream.next_in=next_in_back;
162
+ self->d_stream.avail_out=avail_out_back;
163
+ self->d_stream.avail_in=avail_in_back;
164
+ return hpatch_TRUE;
165
+ }
209
166
  static hpatch_BOOL __zlib_do_inflate(hpatch_decompressHandle decompressHandle){
210
167
  _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
211
168
  uInt avail_out_back,avail_in_back;
@@ -224,20 +181,20 @@ static void __dec_free(void* _, void* address){
224
181
 
225
182
  avail_out_back=self->d_stream.avail_out;
226
183
  avail_in_back=self->d_stream.avail_in;
227
- ret=inflate(&self->d_stream,Z_NO_FLUSH);
184
+ ret=inflate(&self->d_stream,Z_PARTIAL_FLUSH);
228
185
  if (ret==Z_OK){
229
186
  if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
230
- _dec_onDecErr_rt();//error;
187
+ return hpatch_FALSE;//error;
231
188
  }else if (ret==Z_STREAM_END){
232
189
  if (self->d_stream.avail_in+codeLen>0){ //next compress node!
233
- if (!_zlib_reset_for_next_node(&self->d_stream))
234
- _dec_onDecErr_rt();//error;
190
+ if (!_zlib_reset_for_next_node(self))
191
+ return hpatch_FALSE;//error;
235
192
  }else{//all end
236
193
  if (self->d_stream.avail_out!=0)
237
- _dec_onDecErr_rt();//error;
194
+ return hpatch_FALSE;//error;
238
195
  }
239
196
  }else{
240
- _dec_onDecErr_rt();//error;
197
+ return hpatch_FALSE;//error;
241
198
  }
242
199
  return hpatch_TRUE;
243
200
  }
@@ -257,16 +214,13 @@ static void __dec_free(void* _, void* address){
257
214
  static hpatch_inline int _zlib_is_decompress_finish(const hpatch_TDecompress* decompressPlugin,
258
215
  hpatch_decompressHandle decompressHandle){
259
216
  _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
260
- unsigned char _empty=0;
261
217
  while (self->code_begin!=self->code_end){ //for end tag code
218
+ unsigned char _empty;
262
219
  self->d_stream.next_out = &_empty;
263
220
  self->d_stream.avail_out=0;
264
- if (!__zlib_do_inflate(self)){
265
- self->d_stream.next_out=0;
221
+ if (!__zlib_do_inflate(self))
266
222
  return hpatch_FALSE;//error;
267
- }
268
223
  }
269
- self->d_stream.next_out=0;
270
224
  return (self->code_begin==self->code_end)
271
225
  &(self->d_stream.avail_in==0)
272
226
  &(self->d_stream.avail_out==0);
@@ -276,307 +230,7 @@ static void __dec_free(void* _, void* address){
276
230
  static hpatch_TDecompress zlibDecompressPlugin_deflate={_zlib_is_can_open,_zlib_decompress_open_deflate,
277
231
  _zlib_decompress_close,_zlib_decompress_part};
278
232
  #endif//_CompressPlugin_zlib
279
-
280
-
281
- #ifdef _CompressPlugin_ldef
282
- #if (_IsNeedIncludeDefaultCompressHead)
283
- # include "libdeflate.h" // https://github.com/sisong/libdeflate/tree/stream-mt based on https://github.com/ebiggers/libdeflate
284
- # if (_CompressPlugin_ldef_is_use_zlib)
285
- # include "zlib.h" // https://github.com/sisong/zlib/tree/bit_pos_padding based on https://github.com/madler/zlib
286
- # endif
287
- #endif
288
- static const size_t _de_ldef_kDictSize = 1024*32;
289
- static const size_t _de_ldef_kMaxBlockSize =1024*32*19;
290
- // used _de_ldef_kMaxBlockSize*2 memory; optimized speed for
291
- // libdefalte & zlib's deflate code ..., when theirs input deflate code compress block size<=_de_ldef_kMaxBlockSize/2;
292
- // if (_de_ldef_kMaxBlockSize>=compress block size>_de_ldef_kMaxBlockSize/2) speed will little slower;
293
- // if (compress block size>_de_ldef_kMaxBlockSize) && if (_CompressPlugin_ldef_is_use_zlib!=0),
294
- // then swap to zlib decompressor & very slower (slower than zlib); && if (_CompressPlugin_ldef_is_use_zlib==0) will decompress fail.
295
-
296
- typedef struct _ldef_TDecompress{
297
- hpatch_StreamPos_t code_begin;
298
- hpatch_StreamPos_t code_end;
299
- const struct hpatch_TStreamInput* codeStream;
300
-
301
- unsigned char* data_buf;
302
- size_t data_buf_size;
303
- unsigned char* code_buf;
304
- size_t code_buf_size;
305
- struct libdeflate_decompressor* d;
306
- hpatch_dec_error_t decError;
307
-
308
- size_t data_cur;
309
- size_t out_cur;
310
- size_t code_cur;
311
- #if (_CompressPlugin_ldef_is_use_zlib)
312
- hpatch_BOOL is_swap_to_zlib;
313
- z_stream d_stream;
314
- #endif
315
- } _ldef_TDecompress;
316
-
317
- #if (_CompressPlugin_ldef_is_use_zlib)
318
- static hpatch_inline hpatch_BOOL _ldef_is_swap_to_zlib(_ldef_TDecompress* self){
319
- return self->is_swap_to_zlib;
320
- }
321
- static hpatch_BOOL _ldef_decompress_part(hpatch_decompressHandle decompressHandle,
322
- unsigned char* out_part_data,unsigned char* out_part_data_end);
323
- static hpatch_BOOL _ldef_swap_from_zlib(_ldef_TDecompress* self){
324
- const size_t out_part_len=self->d_stream.avail_out;
325
- self->is_swap_to_zlib=hpatch_FALSE;
326
- libdeflate_deflate_decompress_block_reset(self->d);
327
- {
328
- unsigned long shift_v;
329
- unsigned int shift_bit;
330
- zlib_inflate_shift_value(&self->d_stream,&shift_v,&shift_bit);
331
- if (shift_bit>>3) _dec_onDecErr_rt();
332
- libdeflate_deflate_decompress_set_state(self->d,(uint16_t)((shift_v<<3)|shift_bit));
333
- }
334
- assert(self->data_cur==_de_ldef_kDictSize);
335
- self->code_cur=self->code_buf_size-self->d_stream.avail_in;
336
- assert(self->d_stream.next_in==self->code_buf+self->code_cur);
337
- {
338
- uInt dict_size=0;
339
- if (Z_OK!=inflateGetDictionary(&self->d_stream,0,&dict_size)) _dec_onDecErr_rt();
340
- if (Z_OK!=inflateGetDictionary(&self->d_stream,self->data_buf+self->data_cur-dict_size,0)) _dec_onDecErr_rt();
341
- }
342
- if (out_part_len>0)
343
- return _ldef_decompress_part(self,self->d_stream.next_out,self->d_stream.next_out+out_part_len);
344
- else
345
- return hpatch_TRUE;
346
- }
347
- static hpatch_BOOL _ldef_decompress_part_by_zlib(_ldef_TDecompress* self,
348
- unsigned char* out_part_data,size_t out_part_len){
349
- self->d_stream.next_out=out_part_data;
350
- self->d_stream.avail_out=(uInt)out_part_len;
351
- while (self->d_stream.avail_out){
352
- uInt avail_out_back,avail_in_back;
353
- int ret;
354
- hpatch_StreamPos_t codeLen=(self->code_end-self->code_begin);
355
- if ((self->d_stream.avail_in==0)&&(codeLen>0)) {
356
- size_t readLen=self->code_buf_size;
357
- if (readLen>codeLen) readLen=(size_t)codeLen;
358
- self->d_stream.next_in=self->code_buf+self->code_buf_size-readLen;
359
- if (!self->codeStream->read(self->codeStream,self->code_begin,self->d_stream.next_in,
360
- self->d_stream.next_in+readLen)) return hpatch_FALSE;//error;
361
- self->d_stream.avail_in=(uInt)readLen;
362
- self->code_begin+=readLen;
363
- codeLen-=readLen;
364
- }
365
-
366
- avail_out_back=self->d_stream.avail_out;
367
- avail_in_back=self->d_stream.avail_in;
368
- ret=inflate(&self->d_stream,Z_BLOCK);
369
- if (ret==Z_OK){
370
- if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
371
- _dec_onDecErr_rt();//error;
372
- if (zlib_inflate_is_block_end(&self->d_stream)&&(!zlib_inflate_is_last_block_end(&self->d_stream)))
373
- return _ldef_swap_from_zlib(self);
374
- }else if (ret==Z_STREAM_END){
375
- if (self->d_stream.avail_in+codeLen>0){ //next compress node!
376
- zlib_inflate_set_shift_value(&self->d_stream,0,0);
377
- return _ldef_swap_from_zlib(self);
378
- }else{//all end
379
- if (self->d_stream.avail_out!=0)
380
- _dec_onDecErr_rt();//error;
381
- }
382
- }else{
383
- _dec_onDecErr_rt();//error;
384
- }
385
- }
386
- return hpatch_TRUE;
387
- }
388
- static hpatch_BOOL _ldef_swap_to_zlib(_ldef_TDecompress* self,uint16_t dec_state,
389
- unsigned char* out_part_data,size_t out_part_len){
390
- self->is_swap_to_zlib=hpatch_TRUE;
391
- if (self->d_stream.state==0){
392
- if (Z_OK!=inflateInit2(&self->d_stream,-15)){
393
- if (!self->decError) self->decError=hpatch_dec_open_error;
394
- return hpatch_FALSE;
395
- }
396
- }else{
397
- if (Z_OK!=inflateReset(&self->d_stream)) _dec_onDecErr_rt();
398
- }
399
- zlib_inflate_set_shift_value(&self->d_stream,(uLong)(dec_state>>3),(uInt)(dec_state&((1<<3)-1)));
400
- if (Z_OK!=inflateSetDictionary(&self->d_stream,self->data_buf+self->data_cur-_de_ldef_kDictSize,(uInt)_de_ldef_kDictSize)) _dec_onDecErr_rt();
401
- self->d_stream.next_in=self->code_buf+self->code_cur;
402
- self->d_stream.avail_in=(uInt)(self->code_buf_size-self->code_cur);
403
- return _ldef_decompress_part_by_zlib(self,out_part_data,out_part_len);
404
- }
405
- #endif //_CompressPlugin_ldef_is_use_zlib
406
-
407
- static hpatch_BOOL _ldef_is_can_open(const char* compressType){
408
- return (0==strcmp(compressType,"zlib"))||(0==strcmp(compressType,"pzlib"));
409
- }
410
-
411
- static _ldef_TDecompress* _ldef_decompress_open_at(hpatch_TDecompress* decompressPlugin,
412
- const hpatch_TStreamInput* codeStream,
413
- hpatch_StreamPos_t code_begin,hpatch_StreamPos_t code_end,
414
- int isSavedWindowBits,_ldef_TDecompress* self,
415
- size_t data_buf_size,size_t code_buf_size){
416
- if (isSavedWindowBits){//load kWindowBits
417
- signed char kWindowBits=0;
418
- if (code_end-code_begin<1) _dec_openErr_rt();
419
- if (!codeStream->read(codeStream,code_begin,(unsigned char*)&kWindowBits,
420
- (unsigned char*)&kWindowBits+1)) return 0;
421
- ++code_begin;
422
- if (!((-15<=kWindowBits)&&(kWindowBits<0)))
423
- _dec_openErr_rt(); //now, unsupported these window bits
424
- }
425
-
426
- memset(self,0,sizeof(_ldef_TDecompress));
427
- self->d=libdeflate_alloc_decompressor();
428
- if (!self->d) _dec_memErr_rt();
429
- self->data_buf=((unsigned char*)self)+sizeof(_ldef_TDecompress);
430
- self->data_buf_size=data_buf_size;
431
- self->code_buf=self->data_buf+data_buf_size;
432
- self->code_buf_size=code_buf_size;
433
- self->codeStream=codeStream;
434
- self->code_begin=code_begin;
435
- self->code_end=code_end;
436
-
437
- self->data_cur=_de_ldef_kDictSize; //empty
438
- self->out_cur=_de_ldef_kDictSize;
439
- self->code_cur=code_buf_size; //empty
440
- return self;
441
- }
442
-
443
- static hpatch_decompressHandle _ldef_decompress_open(hpatch_TDecompress* decompressPlugin,
444
- hpatch_StreamPos_t dataSize,
445
- const hpatch_TStreamInput* codeStream,
446
- hpatch_StreamPos_t code_begin,
447
- hpatch_StreamPos_t code_end){
448
- _ldef_TDecompress* self=0;
449
- const hpatch_StreamPos_t in_size=code_end-code_begin;
450
- const size_t data_buf_size=_de_ldef_kDictSize+((_de_ldef_kMaxBlockSize<dataSize)?_de_ldef_kMaxBlockSize:(size_t)dataSize);
451
- const size_t code_buf_size=(_de_ldef_kMaxBlockSize<in_size)?_de_ldef_kMaxBlockSize:(size_t)in_size;
452
- size_t _mem_size=sizeof(_ldef_TDecompress)+data_buf_size+code_buf_size;
453
- unsigned char* _mem_buf=(unsigned char*)_dec_malloc(_mem_size);
454
- if (!_mem_buf) _dec_memErr_rt();
455
-
456
- self=_ldef_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,1,
457
- (_ldef_TDecompress*)_mem_buf,data_buf_size,code_buf_size);
458
- if (!self)
459
- free(_mem_buf);
460
- return self;
461
- }
462
-
463
- static hpatch_BOOL _ldef_decompress_close_by(struct hpatch_TDecompress* decompressPlugin,
464
- _ldef_TDecompress* self){
465
- hpatch_BOOL result=hpatch_TRUE;
466
- if (!self) return result;
467
- _dec_onDecErr_up();
468
- #if (_CompressPlugin_ldef_is_use_zlib)
469
- if (self->d_stream.state!=0){
470
- _dec_close_check(Z_OK==inflateEnd(&self->d_stream));
471
- }
472
- #endif
473
- if (self->d!=0)
474
- libdeflate_free_decompressor(self->d);
475
- memset(self,0,sizeof(_ldef_TDecompress));
476
- return result;
477
- }
478
233
 
479
- static hpatch_BOOL _ldef_decompress_close(struct hpatch_TDecompress* decompressPlugin,
480
- hpatch_decompressHandle decompressHandle){
481
- _ldef_TDecompress* self=(_ldef_TDecompress*)decompressHandle;
482
- hpatch_BOOL result=_ldef_decompress_close_by(decompressPlugin,self);
483
- if (self) free(self);
484
- return result;
485
- }
486
-
487
- static hpatch_BOOL _ldef_decompress_part(hpatch_decompressHandle decompressHandle,
488
- unsigned char* out_part_data,unsigned char* out_part_data_end){
489
- _ldef_TDecompress* self=(_ldef_TDecompress*)decompressHandle;
490
- size_t out_part_len=out_part_data_end-out_part_data;
491
- #if (_CompressPlugin_ldef_is_use_zlib)
492
- if (_ldef_is_swap_to_zlib(self)&&out_part_len)
493
- return _ldef_decompress_part_by_zlib(self,out_part_data,out_part_len);
494
- #endif
495
- const size_t kDictSize=_de_ldef_kDictSize;
496
- // [ ( dict ) | dataBuf ] [ codeBuf ]
497
- // ^ ^ ^ ^ ^ ^ ^
498
- // data_buf out_cur data_cur data_buf_size code_buf code_cur code_buf_size
499
- while (out_part_len) {
500
- {//write data out
501
- size_t out_len=self->data_cur-self->out_cur;
502
- if (out_len){ //have data
503
- out_len=(out_len<out_part_len)?out_len:out_part_len;
504
- memcpy(out_part_data,self->data_buf+self->out_cur,out_len);
505
- self->out_cur+=out_len;
506
- out_part_data+=out_len;
507
- out_part_len-=out_len;
508
- continue;
509
- }
510
- }
511
-
512
- size_t kLimitDataSize=_de_ldef_kMaxBlockSize/2+kDictSize;
513
- size_t kLimitCodeSize=self->code_buf_size/2;
514
- __datas_prepare:
515
- {//read code in
516
- if (self->code_cur>kLimitCodeSize){
517
- const hpatch_StreamPos_t _codeSize=self->code_end-self->code_begin;
518
- size_t read_len=(self->code_cur<_codeSize)?self->code_cur:(size_t)_codeSize;
519
- if (read_len){
520
- size_t code_len=self->code_buf_size-self->code_cur;
521
- unsigned char* pcode=self->code_buf+self->code_cur;
522
- unsigned char* pdst=pcode-read_len;
523
- memmove(pdst,pcode,code_len);
524
- pdst+=code_len;
525
- if (!self->codeStream->read(self->codeStream,self->code_begin,pdst,pdst+read_len))
526
- return 0; //read error
527
- self->code_begin+=read_len;
528
- self->code_cur-=read_len;
529
- }
530
- }
531
- }
532
- {//move dict
533
- if (self->data_cur>kLimitDataSize){
534
- size_t move_offset=self->data_cur-kDictSize;
535
- if (move_offset){
536
- memmove(self->data_buf,self->data_buf+move_offset,kDictSize);
537
- self->data_cur=kDictSize;
538
- self->out_cur=kDictSize;
539
- }
540
- }
541
- }
542
- {// decompress
543
- int is_final_block_ret;
544
- size_t actual_in_nbytes_ret;
545
- size_t actual_out_nbytes_ret;
546
- const uint16_t dec_state=libdeflate_deflate_decompress_get_state(self->d);
547
- enum libdeflate_result ret=libdeflate_deflate_decompress_block(self->d,
548
- self->code_buf+self->code_cur,self->code_buf_size-self->code_cur,
549
- self->data_buf,self->data_cur,self->data_buf_size-self->data_cur,
550
- &actual_in_nbytes_ret,&actual_out_nbytes_ret,
551
- LIBDEFLATE_STOP_BY_ANY_BLOCK,&is_final_block_ret);
552
- if (ret!=LIBDEFLATE_SUCCESS){
553
- if ((self->code_begin==self->code_end)&&(ret!=LIBDEFLATE_INSUFFICIENT_SPACE))
554
- _dec_onDecErr_rt();
555
- if ((self->data_cur>kDictSize)||((self->code_cur>0)&&(self->code_begin<self->code_end))){
556
- kLimitDataSize=kDictSize;
557
- kLimitCodeSize=0;
558
- libdeflate_deflate_decompress_set_state(self->d,dec_state);
559
- goto __datas_prepare; //retry by libdefalte
560
- }
561
- #if (_CompressPlugin_ldef_is_use_zlib)
562
- return _ldef_swap_to_zlib(self,dec_state,out_part_data,out_part_len); //retry by zlib
563
- #else
564
- _dec_onDecErr_rt();
565
- #endif
566
- }
567
- self->code_cur+=actual_in_nbytes_ret;
568
- self->data_cur+=actual_out_nbytes_ret;
569
- if (is_final_block_ret)
570
- libdeflate_deflate_decompress_block_reset(self->d);
571
- }
572
- }
573
- return hpatch_TRUE;
574
- }
575
- static hpatch_TDecompress ldefDecompressPlugin={_ldef_is_can_open,_ldef_decompress_open,
576
- _ldef_decompress_close,_ldef_decompress_part};
577
- #endif//_CompressPlugin_ldef
578
-
579
-
580
234
  #ifdef _CompressPlugin_bz2
581
235
  #if (_IsNeedIncludeDefaultCompressHead)
582
236
  # include "bzlib.h" // http://www.bzip.org/ https://github.com/sisong/bzip2
@@ -587,7 +241,6 @@ static void __dec_free(void* _, void* address){
587
241
  hpatch_StreamPos_t code_end;
588
242
 
589
243
  bz_stream d_stream;
590
- hpatch_dec_error_t decError;
591
244
  unsigned char dec_buf[kDecompressBufSize];
592
245
  } _bz2_TDecompress;
593
246
  static hpatch_BOOL _bz2_is_can_open(const char* compressType){
@@ -600,15 +253,15 @@ static void __dec_free(void* _, void* address){
600
253
  hpatch_StreamPos_t code_begin,
601
254
  hpatch_StreamPos_t code_end){
602
255
  int ret;
603
- _bz2_TDecompress* self=(_bz2_TDecompress*)_dec_malloc(sizeof(_bz2_TDecompress));
604
- if (!self) _dec_memErr_rt();
256
+ _bz2_TDecompress* self=(_bz2_TDecompress*)malloc(sizeof(_bz2_TDecompress));
257
+ if (!self) return 0;
605
258
  memset(self,0,sizeof(_bz2_TDecompress)-kDecompressBufSize);
606
259
  self->codeStream=codeStream;
607
260
  self->code_begin=code_begin;
608
261
  self->code_end=code_end;
609
262
 
610
263
  ret=BZ2_bzDecompressInit(&self->d_stream,0,0);
611
- if (ret!=BZ_OK){ free(self); _dec_openErr_rt(); }
264
+ if (ret!=BZ_OK){ free(self); return 0; }
612
265
  return self;
613
266
  }
614
267
  static hpatch_BOOL _bz2_close(struct hpatch_TDecompress* decompressPlugin,
@@ -616,8 +269,7 @@ static void __dec_free(void* _, void* address){
616
269
  hpatch_BOOL result=hpatch_TRUE;
617
270
  _bz2_TDecompress* self=(_bz2_TDecompress*)decompressHandle;
618
271
  if (!self) return result;
619
- _dec_onDecErr_up();
620
- _dec_close_check(BZ_OK==BZ2_bzDecompressEnd(&self->d_stream));
272
+ _close_check(BZ_OK==BZ2_bzDecompressEnd(&self->d_stream));
621
273
  free(self);
622
274
  return result;
623
275
  }
@@ -628,8 +280,8 @@ static void __dec_free(void* _, void* address){
628
280
  unsigned int avail_out_back=self->d_stream.avail_out;
629
281
  unsigned int avail_in_back=self->d_stream.avail_in;
630
282
  //reset
631
- if (BZ_OK!=BZ2_bzDecompressEnd(&self->d_stream)) _dec_onDecErr_rt();
632
- if (BZ_OK!=BZ2_bzDecompressInit(&self->d_stream,0,0)) _dec_onDecErr_rt();
283
+ if (BZ_OK!=BZ2_bzDecompressEnd(&self->d_stream)) return hpatch_FALSE;
284
+ if (BZ_OK!=BZ2_bzDecompressInit(&self->d_stream,0,0)) return hpatch_FALSE;
633
285
  //restore
634
286
  self->d_stream.next_out=next_out_back;
635
287
  self->d_stream.next_in=next_in_back;
@@ -637,10 +289,8 @@ static void __dec_free(void* _, void* address){
637
289
  self->d_stream.avail_in=avail_in_back;
638
290
  return hpatch_TRUE;
639
291
  }
640
-
641
- static hpatch_BOOL _bz2_decompress_part_(hpatch_decompressHandle decompressHandle,
642
- unsigned char* out_part_data,unsigned char* out_part_data_end,
643
- hpatch_BOOL isMustOutData){
292
+ static hpatch_BOOL _bz2_decompress_part(hpatch_decompressHandle decompressHandle,
293
+ unsigned char* out_part_data,unsigned char* out_part_data_end){
644
294
  _bz2_TDecompress* self=(_bz2_TDecompress*)decompressHandle;
645
295
  assert(out_part_data<=out_part_data_end);
646
296
 
@@ -666,43 +316,23 @@ static void __dec_free(void* _, void* address){
666
316
  ret=BZ2_bzDecompress(&self->d_stream);
667
317
  if (ret==BZ_OK){
668
318
  if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
669
- _dec_onDecErr_rt();//error;
319
+ return hpatch_FALSE;//error;
670
320
  }else if (ret==BZ_STREAM_END){
671
321
  if (self->d_stream.avail_in+codeLen>0){ //next compress node!
672
322
  if (!_bz2_reset_for_next_node(self))
673
323
  return hpatch_FALSE;//error;
674
324
  }else{//all end
675
- if (self->d_stream.avail_out!=0){
676
- if (isMustOutData){ //fill out 0
677
- memset(self->d_stream.next_out,0,self->d_stream.avail_out);
678
- self->d_stream.next_out+=self->d_stream.avail_out;
679
- self->d_stream.avail_out=0;
680
- }else{
681
- _dec_onDecErr_rt();//error;
682
- }
683
- }
325
+ if (self->d_stream.avail_out!=0)
326
+ return hpatch_FALSE;//error;
684
327
  }
685
328
  }else{
686
- _dec_onDecErr_rt();//error;
329
+ return hpatch_FALSE;//error;
687
330
  }
688
331
  }
689
332
  return hpatch_TRUE;
690
333
  }
691
- static hpatch_BOOL _bz2_decompress_part(hpatch_decompressHandle decompressHandle,
692
- unsigned char* out_part_data,unsigned char* out_part_data_end){
693
- return _bz2_decompress_part_(decompressHandle,out_part_data,out_part_data_end,hpatch_FALSE);
694
- }
695
- static hpatch_BOOL _bz2_decompress_part_unsz(hpatch_decompressHandle decompressHandle,
696
- unsigned char* out_part_data,unsigned char* out_part_data_end){
697
- return _bz2_decompress_part_(decompressHandle,out_part_data,out_part_data_end,hpatch_TRUE);
698
- }
699
-
700
334
  static hpatch_TDecompress bz2DecompressPlugin={_bz2_is_can_open,_bz2_open,
701
335
  _bz2_close,_bz2_decompress_part};
702
-
703
- //unkown uncompress data size
704
- static hpatch_TDecompress _bz2DecompressPlugin_unsz={_bz2_is_can_open,_bz2_open,
705
- _bz2_close,_bz2_decompress_part_unsz};
706
336
  #endif//_CompressPlugin_bz2
707
337
 
708
338
 
@@ -713,11 +343,17 @@ static void __dec_free(void* _, void* address){
713
343
  # include "Lzma2Dec.h"
714
344
  # endif
715
345
  #endif
346
+ static void * __lzma_dec_Alloc(ISzAllocPtr p, size_t size){
347
+ return malloc(size);
348
+ }
349
+ static void __lzma_dec_Free(ISzAllocPtr p, void *address){
350
+ if (address) free(address);
351
+ }
352
+ static ISzAlloc __lzma_dec_alloc={__lzma_dec_Alloc,__lzma_dec_Free};
716
353
  #endif
717
354
 
718
355
  #ifdef _CompressPlugin_lzma
719
356
  typedef struct _lzma_TDecompress{
720
- ISzAlloc memAllocBase;
721
357
  const struct hpatch_TStreamInput* codeStream;
722
358
  hpatch_StreamPos_t code_begin;
723
359
  hpatch_StreamPos_t code_end;
@@ -725,12 +361,8 @@ static void __dec_free(void* _, void* address){
725
361
  CLzmaDec decEnv;
726
362
  SizeT decCopyPos;
727
363
  SizeT decReadPos;
728
- hpatch_dec_error_t decError;
729
364
  unsigned char dec_buf[kDecompressBufSize];
730
365
  } _lzma_TDecompress;
731
- static void * __lzma1_dec_Alloc(ISzAllocPtr p, size_t size)
732
- __dec_Alloc_fun(_lzma_TDecompress,p,size)
733
-
734
366
  static hpatch_BOOL _lzma_is_can_open(const char* compressType){
735
367
  return (0==strcmp(compressType,"lzma"));
736
368
  }
@@ -744,19 +376,17 @@ static void __dec_free(void* _, void* address){
744
376
  unsigned char propsSize=0;
745
377
  unsigned char props[256];
746
378
  //load propsSize
747
- if (code_end-code_begin<1) _dec_openErr_rt();
379
+ if (code_end-code_begin<1) return 0;
748
380
  if (!codeStream->read(codeStream,code_begin,&propsSize,&propsSize+1)) return 0;
749
381
  ++code_begin;
750
- if (propsSize>(code_end-code_begin)) _dec_openErr_rt();
382
+ if (propsSize>(code_end-code_begin)) return 0;
751
383
  //load props
752
384
  if (!codeStream->read(codeStream,code_begin,props,props+propsSize)) return 0;
753
385
  code_begin+=propsSize;
754
386
 
755
- self=(_lzma_TDecompress*)_dec_malloc(sizeof(_lzma_TDecompress));
756
- if (!self) _dec_memErr_rt();
387
+ self=(_lzma_TDecompress*)malloc(sizeof(_lzma_TDecompress));
388
+ if (!self) return 0;
757
389
  memset(self,0,sizeof(_lzma_TDecompress)-kDecompressBufSize);
758
- self->memAllocBase.Alloc=__lzma1_dec_Alloc;
759
- *((void**)&self->memAllocBase.Free)=(void*)__dec_free;
760
390
  self->codeStream=codeStream;
761
391
  self->code_begin=code_begin;
762
392
  self->code_end=code_end;
@@ -765,8 +395,8 @@ static void __dec_free(void* _, void* address){
765
395
  self->decReadPos=kDecompressBufSize;
766
396
 
767
397
  LzmaDec_Construct(&self->decEnv);
768
- ret=LzmaDec_Allocate(&self->decEnv,props,propsSize,&self->memAllocBase);
769
- if (ret!=SZ_OK){ _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
398
+ ret=LzmaDec_Allocate(&self->decEnv,props,propsSize,&__lzma_dec_alloc);
399
+ if (ret!=SZ_OK){ free(self); return 0; }
770
400
  LzmaDec_Init(&self->decEnv);
771
401
  return self;
772
402
  }
@@ -774,8 +404,7 @@ static void __dec_free(void* _, void* address){
774
404
  hpatch_decompressHandle decompressHandle){
775
405
  _lzma_TDecompress* self=(_lzma_TDecompress*)decompressHandle;
776
406
  if (!self) return hpatch_TRUE;
777
- LzmaDec_Free(&self->decEnv,&self->memAllocBase);
778
- _dec_onDecErr_up();
407
+ LzmaDec_Free(&self->decEnv,&__lzma_dec_alloc);
779
408
  free(self);
780
409
  return hpatch_TRUE;
781
410
  }
@@ -817,9 +446,9 @@ static void __dec_free(void* _, void* address){
817
446
  self->dec_buf+self->decReadPos,&inSize,LZMA_FINISH_ANY,&status);
818
447
  if(res==SZ_OK){
819
448
  if ((inSize==0)&&(self->decEnv.dicPos==dicPos_back))
820
- _dec_onDecErr_rt();//error;
449
+ return hpatch_FALSE;//error;
821
450
  }else{
822
- _dec_onDecErr_rt();//error;
451
+ return hpatch_FALSE;//error;
823
452
  }
824
453
  self->decReadPos+=inSize;
825
454
  }
@@ -831,247 +460,79 @@ static void __dec_free(void* _, void* address){
831
460
  #endif//_CompressPlugin_lzma
832
461
 
833
462
  #ifdef _CompressPlugin_lzma2
834
- typedef struct _lzma2_TDecompress{
835
- ISzAlloc memAllocBase;
836
- const struct hpatch_TStreamInput* codeStream;
837
- hpatch_StreamPos_t code_begin;
838
- hpatch_StreamPos_t code_end;
839
-
840
- CLzma2Dec decEnv;
841
- SizeT decCopyPos;
842
- SizeT decReadPos;
843
- hpatch_dec_error_t decError;
844
- unsigned char dec_buf[kDecompressBufSize];
845
- } _lzma2_TDecompress;
846
- static void * __lzma2_dec_Alloc(ISzAllocPtr p, size_t size)
847
- __dec_Alloc_fun(_lzma2_TDecompress,p,size)
463
+ typedef struct _lzma2_TDecompress{
464
+ const struct hpatch_TStreamInput* codeStream;
465
+ hpatch_StreamPos_t code_begin;
466
+ hpatch_StreamPos_t code_end;
848
467
 
849
- static hpatch_BOOL _lzma2_is_can_open(const char* compressType){
850
- return (0==strcmp(compressType,"lzma2"));
851
- }
852
- static hpatch_decompressHandle _lzma2_open(hpatch_TDecompress* decompressPlugin,
853
- hpatch_StreamPos_t dataSize,
854
- const hpatch_TStreamInput* codeStream,
855
- hpatch_StreamPos_t code_begin,
856
- hpatch_StreamPos_t code_end){
857
- _lzma2_TDecompress* self=0;
858
- SRes ret;
859
- unsigned char propsSize=0;
860
- //load propsSize
861
- if (code_end-code_begin<1) _dec_openErr_rt();
862
- if (!codeStream->read(codeStream,code_begin,&propsSize,&propsSize+1)) return 0;
863
- ++code_begin;
864
-
865
- self=(_lzma2_TDecompress*)_dec_malloc(sizeof(_lzma2_TDecompress));
866
- if (!self) _dec_memErr_rt();
867
- memset(self,0,sizeof(_lzma2_TDecompress)-kDecompressBufSize);
868
- self->memAllocBase.Alloc=__lzma2_dec_Alloc;
869
- *((void**)&self->memAllocBase.Free)=(void*)__dec_free;
870
- self->codeStream=codeStream;
871
- self->code_begin=code_begin;
872
- self->code_end=code_end;
873
-
874
- self->decCopyPos=0;
875
- self->decReadPos=kDecompressBufSize;
876
-
877
- Lzma2Dec_Construct(&self->decEnv);
878
- ret=Lzma2Dec_Allocate(&self->decEnv,propsSize,&self->memAllocBase);
879
- if (ret!=SZ_OK){ _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
880
- Lzma2Dec_Init(&self->decEnv);
881
- return self;
882
- }
883
- static hpatch_BOOL _lzma2_close(struct hpatch_TDecompress* decompressPlugin,
884
- hpatch_decompressHandle decompressHandle){
885
- _lzma2_TDecompress* self=(_lzma2_TDecompress*)decompressHandle;
886
- if (!self) return hpatch_TRUE;
887
- Lzma2Dec_Free(&self->decEnv,&self->memAllocBase);
888
- _dec_onDecErr_up();
889
- free(self);
890
- return hpatch_TRUE;
891
- }
892
- static hpatch_BOOL _lzma2_decompress_part(hpatch_decompressHandle decompressHandle,
893
- unsigned char* out_part_data,unsigned char* out_part_data_end){
894
- _lzma2_TDecompress* self=(_lzma2_TDecompress*)decompressHandle;
895
- unsigned char* out_cur=out_part_data;
896
- assert(out_part_data<=out_part_data_end);
897
- while (out_cur<out_part_data_end){
898
- size_t copyLen=(self->decEnv.decoder.dicPos-self->decCopyPos);
899
- if (copyLen>0){
900
- if (copyLen>(size_t)(out_part_data_end-out_cur))
901
- copyLen=(out_part_data_end-out_cur);
902
- memcpy(out_cur,self->decEnv.decoder.dic+self->decCopyPos,copyLen);
903
- out_cur+=copyLen;
904
- self->decCopyPos+=copyLen;
905
- if ((self->decEnv.decoder.dicPos==self->decEnv.decoder.dicBufSize)
906
- &&(self->decEnv.decoder.dicPos==self->decCopyPos)){
907
- self->decEnv.decoder.dicPos=0;
908
- self->decCopyPos=0;
909
- }
910
- }else{
911
- ELzmaStatus status;
912
- SizeT inSize,dicPos_back;
913
- SRes res;
914
- hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
915
- if ((self->decReadPos==kDecompressBufSize)&&(codeLen>0)) {
916
- size_t readLen=kDecompressBufSize;
917
- if (readLen>codeLen) readLen=(size_t)codeLen;
918
- self->decReadPos=kDecompressBufSize-readLen;
919
- if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf+self->decReadPos,
920
- self->dec_buf+self->decReadPos+readLen)) return hpatch_FALSE;//error;
921
- self->code_begin+=readLen;
922
- }
923
-
924
- inSize=kDecompressBufSize-self->decReadPos;
925
- dicPos_back=self->decEnv.decoder.dicPos;
926
- res=Lzma2Dec_DecodeToDic(&self->decEnv,self->decEnv.decoder.dicBufSize,
927
- self->dec_buf+self->decReadPos,&inSize,LZMA_FINISH_ANY,&status);
928
- if(res==SZ_OK){
929
- if ((inSize==0)&&(self->decEnv.decoder.dicPos==dicPos_back))
930
- _dec_onDecErr_rt();//error;
931
- }else{
932
- _dec_onDecErr_rt();//error;
933
- }
934
- self->decReadPos+=inSize;
935
- }
936
- }
937
- return hpatch_TRUE;
938
- }
939
- static hpatch_TDecompress lzma2DecompressPlugin={_lzma2_is_can_open,_lzma2_open,
940
- _lzma2_close,_lzma2_decompress_part};
941
- #endif//_CompressPlugin_lzma2
942
-
943
- #ifdef _CompressPlugin_7zXZ
944
- #if (_IsNeedIncludeDefaultCompressHead)
945
- # include "Xz.h" // "lzma/C/Xz.h" https://github.com/sisong/lzma
946
- # include "7zCrc.h" // CrcGenerateTable()
947
- #endif
948
-
949
- #ifndef _init_CompressPlugin_7zXZ_DEF
950
- # define _init_CompressPlugin_7zXZ_DEF
951
- static int _init_CompressPlugin_7zXZ(){
952
- static hpatch_BOOL _isInit=hpatch_FALSE;
953
- if (!_isInit){
954
- CrcGenerateTable();
955
- _isInit=hpatch_TRUE;
956
- }
957
- return 0;
958
- }
959
- #endif
468
+ CLzma2Dec decEnv;
469
+ SizeT decCopyPos;
470
+ SizeT decReadPos;
471
+ unsigned char dec_buf[kDecompressBufSize];
472
+ } _lzma2_TDecompress;
473
+ static hpatch_BOOL _lzma2_is_can_open(const char* compressType){
474
+ return (0==strcmp(compressType,"lzma2"));
475
+ }
476
+ static hpatch_decompressHandle _lzma2_open(hpatch_TDecompress* decompressPlugin,
477
+ hpatch_StreamPos_t dataSize,
478
+ const hpatch_TStreamInput* codeStream,
479
+ hpatch_StreamPos_t code_begin,
480
+ hpatch_StreamPos_t code_end){
481
+ _lzma2_TDecompress* self=0;
482
+ SRes ret;
483
+ unsigned char propsSize=0;
484
+ //load propsSize
485
+ if (code_end-code_begin<1) return 0;
486
+ if (!codeStream->read(codeStream,code_begin,&propsSize,&propsSize+1)) return 0;
487
+ ++code_begin;
960
488
 
961
- typedef struct _7zXZ_TDecompress{
962
- ISzAlloc memAllocBase;
963
- const struct hpatch_TStreamInput* codeStream;
964
- hpatch_StreamPos_t code_begin;
965
- hpatch_StreamPos_t code_end;
966
- hpatch_TDecompress* decompressPlugin;
967
- hpatch_BOOL isResetState;
968
-
969
- CXzUnpacker decEnv;
970
- SizeT decCopyPos;
971
- SizeT decReadPos;
972
- hpatch_dec_error_t decError;
973
- unsigned char dec_buf[kDecompressBufSize];
974
- } _7zXZ_TDecompress;
975
- static void * __7zXZ_dec_Alloc(ISzAllocPtr p, size_t size)
976
- __dec_Alloc_fun(_7zXZ_TDecompress,p,size)
489
+ self=(_lzma2_TDecompress*)malloc(sizeof(_lzma2_TDecompress));
490
+ if (!self) return 0;
491
+ memset(self,0,sizeof(_lzma2_TDecompress)-kDecompressBufSize);
492
+ self->codeStream=codeStream;
493
+ self->code_begin=code_begin;
494
+ self->code_end=code_end;
977
495
 
978
- static hpatch_BOOL _7zXZ_is_can_open(const char* compressType){
979
- return (0==strcmp(compressType,"7zXZ"));
980
- }
981
- static void _7zXZ_open_at(_7zXZ_TDecompress* self, hpatch_TDecompress* decompressPlugin,hpatch_StreamPos_t dataSize,
982
- const hpatch_TStreamInput* codeStream,hpatch_StreamPos_t code_begin,
983
- hpatch_StreamPos_t code_end,hpatch_BOOL isResetState,hpatch_BOOL isParseHead){
984
- memset(self,0,sizeof(_7zXZ_TDecompress)-kDecompressBufSize);
985
- self->memAllocBase.Alloc=__7zXZ_dec_Alloc;
986
- *((void**)&self->memAllocBase.Free)=(void*)__dec_free;
987
- self->codeStream=codeStream;
988
- self->code_begin=code_begin;
989
- self->code_end=code_end;
990
- self->decompressPlugin=decompressPlugin;
991
- self->isResetState=isResetState;
992
-
993
- self->decCopyPos=0;
994
- self->decReadPos=kDecompressBufSize;
995
-
996
- XzUnpacker_Construct(&self->decEnv,&self->memAllocBase);
997
- XzUnpacker_Init(&self->decEnv);
998
- if (!isParseHead)
999
- self->decEnv.state=XZ_STATE_BLOCK_HEADER;
1000
- }
1001
- static void _7zXZ_close_at(hpatch_decompressHandle decompressHandle){
1002
- _7zXZ_TDecompress* self=(_7zXZ_TDecompress*)decompressHandle;
1003
- if (self){
1004
- hpatch_TDecompress* decompressPlugin=self->decompressPlugin;
1005
- XzUnpacker_Free(&self->decEnv);
1006
- _dec_onDecErr_up();
1007
- }
1008
- }
1009
- static hpatch_decompressHandle _7zXZ_open(hpatch_TDecompress* decompressPlugin,
1010
- hpatch_StreamPos_t dataSize,
1011
- const hpatch_TStreamInput* codeStream,
1012
- hpatch_StreamPos_t code_begin,
1013
- hpatch_StreamPos_t code_end){
1014
- _7zXZ_TDecompress* self=0;
1015
-
1016
- self=(_7zXZ_TDecompress*)_dec_malloc(sizeof(_7zXZ_TDecompress));
1017
- if (!self) _dec_memErr_rt();
1018
- _7zXZ_open_at(self,decompressPlugin,dataSize,codeStream,
1019
- code_begin,code_end,hpatch_FALSE,hpatch_TRUE);
1020
- return self;
1021
- }
1022
- static hpatch_decompressHandle _7zXZ_a_open(hpatch_TDecompress* decompressPlugin,
1023
- hpatch_StreamPos_t dataSize,
1024
- const hpatch_TStreamInput* codeStream,
1025
- hpatch_StreamPos_t code_begin,
1026
- hpatch_StreamPos_t code_end){
1027
- _7zXZ_TDecompress* self=0;
1028
-
1029
- self=(_7zXZ_TDecompress*)_dec_malloc(sizeof(_7zXZ_TDecompress));
1030
- if (!self) _dec_memErr_rt();
1031
- _7zXZ_open_at(self,decompressPlugin,dataSize,codeStream,
1032
- code_begin,code_end,hpatch_TRUE,hpatch_TRUE);
1033
- return self;
1034
- }
1035
- static hpatch_BOOL _7zXZ_close(struct hpatch_TDecompress* decompressPlugin,
1036
- hpatch_decompressHandle decompressHandle){
1037
- if (decompressHandle){
1038
- _7zXZ_close_at(decompressHandle);
1039
- free(decompressHandle);
1040
- }
1041
- return hpatch_TRUE;
1042
- }
1043
- static hpatch_BOOL _7zXZ_reset_code(hpatch_decompressHandle decompressHandle,
1044
- hpatch_StreamPos_t dataSize,
1045
- const struct hpatch_TStreamInput* codeStream,
1046
- hpatch_StreamPos_t code_begin,
1047
- hpatch_StreamPos_t code_end){
1048
- _7zXZ_TDecompress* self=(_7zXZ_TDecompress*)decompressHandle;
1049
- hpatch_BOOL isResetState=self->isResetState;
1050
- if (isResetState){
1051
- hpatch_TDecompress* decompressPlugin=self->decompressPlugin;
1052
- _7zXZ_close_at(self);
1053
- _7zXZ_open_at(self,decompressPlugin,dataSize,codeStream,
1054
- code_begin,code_end,isResetState,hpatch_FALSE);
496
+ self->decCopyPos=0;
497
+ self->decReadPos=kDecompressBufSize;
498
+
499
+ Lzma2Dec_Construct(&self->decEnv);
500
+ ret=Lzma2Dec_Allocate(&self->decEnv,propsSize,&__lzma_dec_alloc);
501
+ if (ret!=SZ_OK){ free(self); return 0; }
502
+ Lzma2Dec_Init(&self->decEnv);
503
+ return self;
504
+ }
505
+ static hpatch_BOOL _lzma2_close(struct hpatch_TDecompress* decompressPlugin,
506
+ hpatch_decompressHandle decompressHandle){
507
+ _lzma2_TDecompress* self=(_lzma2_TDecompress*)decompressHandle;
508
+ if (!self) return hpatch_TRUE;
509
+ Lzma2Dec_Free(&self->decEnv,&__lzma_dec_alloc);
510
+ free(self);
511
+ return hpatch_TRUE;
512
+ }
513
+ static hpatch_BOOL _lzma2_decompress_part(hpatch_decompressHandle decompressHandle,
514
+ unsigned char* out_part_data,unsigned char* out_part_data_end){
515
+ _lzma2_TDecompress* self=(_lzma2_TDecompress*)decompressHandle;
516
+ unsigned char* out_cur=out_part_data;
517
+ assert(out_part_data<=out_part_data_end);
518
+ while (out_cur<out_part_data_end){
519
+ size_t copyLen=(self->decEnv.decoder.dicPos-self->decCopyPos);
520
+ if (copyLen>0){
521
+ if (copyLen>(size_t)(out_part_data_end-out_cur))
522
+ copyLen=(out_part_data_end-out_cur);
523
+ memcpy(out_cur,self->decEnv.decoder.dic+self->decCopyPos,copyLen);
524
+ out_cur+=copyLen;
525
+ self->decCopyPos+=copyLen;
526
+ if ((self->decEnv.decoder.dicPos==self->decEnv.decoder.dicBufSize)
527
+ &&(self->decEnv.decoder.dicPos==self->decCopyPos)){
528
+ self->decEnv.decoder.dicPos=0;
529
+ self->decCopyPos=0;
530
+ }
1055
531
  }else{
1056
- self->codeStream=codeStream;
1057
- self->code_begin=code_begin;
1058
- self->code_end=code_end;
1059
- self->decCopyPos=0;
1060
- self->decReadPos=kDecompressBufSize;
1061
- }
1062
- return hpatch_TRUE;
1063
- }
1064
- static hpatch_BOOL _7zXZ_decompress_part(hpatch_decompressHandle decompressHandle,
1065
- unsigned char* out_part_data,unsigned char* out_part_data_end){
1066
- _7zXZ_TDecompress* self=(_7zXZ_TDecompress*)decompressHandle;
1067
- unsigned char* out_cur=out_part_data;
1068
- assert(out_part_data<=out_part_data_end);
1069
- while (out_cur<out_part_data_end){
1070
- ECoderStatus status;
1071
- SizeT inSize;
1072
- SizeT outSize=out_part_data_end-out_cur;
532
+ ELzmaStatus status;
533
+ SizeT inSize,dicPos_back;
1073
534
  SRes res;
1074
- hpatch_StreamPos_t codeLen=(self->code_end-self->code_begin);
535
+ hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
1075
536
  if ((self->decReadPos==kDecompressBufSize)&&(codeLen>0)) {
1076
537
  size_t readLen=kDecompressBufSize;
1077
538
  if (readLen>codeLen) readLen=(size_t)codeLen;
@@ -1079,28 +540,26 @@ static void __dec_free(void* _, void* address){
1079
540
  if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf+self->decReadPos,
1080
541
  self->dec_buf+self->decReadPos+readLen)) return hpatch_FALSE;//error;
1081
542
  self->code_begin+=readLen;
1082
- codeLen-=readLen;
1083
543
  }
1084
544
 
1085
545
  inSize=kDecompressBufSize-self->decReadPos;
1086
- res=XzUnpacker_Code(&self->decEnv,out_cur,&outSize,self->dec_buf+self->decReadPos,&inSize,
1087
- codeLen==0,CODER_FINISH_ANY,&status);
546
+ dicPos_back=self->decEnv.decoder.dicPos;
547
+ res=Lzma2Dec_DecodeToDic(&self->decEnv,self->decEnv.decoder.dicBufSize,
548
+ self->dec_buf+self->decReadPos,&inSize,LZMA_FINISH_ANY,&status);
1088
549
  if(res==SZ_OK){
1089
- if ((inSize==0)&&(outSize==0))
1090
- _dec_onDecErr_rt();//error;
550
+ if ((inSize==0)&&(self->decEnv.decoder.dicPos==dicPos_back))
551
+ return hpatch_FALSE;//error;
1091
552
  }else{
1092
- _dec_onDecErr_rt();//error;
553
+ return hpatch_FALSE;//error;
1093
554
  }
1094
555
  self->decReadPos+=inSize;
1095
- out_cur+=outSize;
1096
556
  }
1097
- return hpatch_TRUE;
1098
557
  }
1099
- static hpatch_TDecompress _7zXZDecompressPlugin={_7zXZ_is_can_open,_7zXZ_open,
1100
- _7zXZ_close,_7zXZ_decompress_part,_7zXZ_reset_code};
1101
- static hpatch_TDecompress _7zXZDecompressPlugin_a={_7zXZ_is_can_open,_7zXZ_a_open,
1102
- _7zXZ_close,_7zXZ_decompress_part,_7zXZ_reset_code};
1103
- #endif//_CompressPlugin_7zXZ
558
+ return hpatch_TRUE;
559
+ }
560
+ static hpatch_TDecompress lzma2DecompressPlugin={_lzma2_is_can_open,_lzma2_open,
561
+ _lzma2_close,_lzma2_decompress_part};
562
+ #endif//_CompressPlugin_lzma2
1104
563
 
1105
564
 
1106
565
  #if (defined(_CompressPlugin_lz4) || defined(_CompressPlugin_lz4hc))
@@ -1117,15 +576,14 @@ static void __dec_free(void* _, void* address){
1117
576
  int code_buf_size;
1118
577
  int data_begin;
1119
578
  int data_end;
1120
- hpatch_dec_error_t decError;
1121
579
  unsigned char buf[1];
1122
580
  } _lz4_TDecompress;
1123
581
  static hpatch_BOOL _lz4_is_can_open(const char* compressType){
1124
582
  return (0==strcmp(compressType,"lz4"));
1125
583
  }
1126
- #define _lz4_read_len4(len,in_code,code_begin,code_end,__dec_err_rt) { \
584
+ #define _lz4_read_len4(len,in_code,code_begin,code_end) { \
1127
585
  unsigned char _temp_buf4[4]; \
1128
- if (4>code_end-code_begin) __dec_err_rt(); \
586
+ if (4>code_end-code_begin) return hpatch_FALSE; \
1129
587
  if (!in_code->read(in_code,code_begin,_temp_buf4,_temp_buf4+4)) \
1130
588
  return hpatch_FALSE; \
1131
589
  len=_temp_buf4[0]|(_temp_buf4[1]<<8)|(_temp_buf4[2]<<16)|(_temp_buf4[3]<<24); \
@@ -1142,12 +600,12 @@ static void __dec_free(void* _, void* address){
1142
600
  int code_buf_size=0;
1143
601
  assert(code_begin<code_end);
1144
602
  {//read kLz4CompressBufSize
1145
- _lz4_read_len4(kLz4CompressBufSize,codeStream,code_begin,code_end,_dec_openErr_rt);
1146
- if ((kLz4CompressBufSize<0)||(kLz4CompressBufSize>=kMaxLz4CompressBufSize)) _dec_openErr_rt();
603
+ _lz4_read_len4(kLz4CompressBufSize,codeStream,code_begin,code_end);
604
+ if ((kLz4CompressBufSize<0)||(kLz4CompressBufSize>=kMaxLz4CompressBufSize)) return 0;
1147
605
  code_buf_size=LZ4_compressBound(kLz4CompressBufSize);
1148
606
  }
1149
- self=(_lz4_TDecompress*)_dec_malloc(sizeof(_lz4_TDecompress)+kLz4CompressBufSize+code_buf_size);
1150
- if (!self) _dec_memErr_rt();
607
+ self=(_lz4_TDecompress*)malloc(sizeof(_lz4_TDecompress)+kLz4CompressBufSize+code_buf_size);
608
+ if (!self) return 0;
1151
609
  memset(self,0,sizeof(_lz4_TDecompress));
1152
610
  self->codeStream=codeStream;
1153
611
  self->code_begin=code_begin;
@@ -1158,7 +616,7 @@ static void __dec_free(void* _, void* address){
1158
616
  self->data_end=0;
1159
617
 
1160
618
  self->s = LZ4_createStreamDecode();
1161
- if (!self->s){ free(self); _dec_openErr_rt(); }
619
+ if (!self->s){ free(self); return 0; }
1162
620
  return self;
1163
621
  }
1164
622
  static hpatch_BOOL _lz4_close(struct hpatch_TDecompress* decompressPlugin,
@@ -1166,8 +624,7 @@ static void __dec_free(void* _, void* address){
1166
624
  hpatch_BOOL result=hpatch_TRUE;
1167
625
  _lz4_TDecompress* self=(_lz4_TDecompress*)decompressHandle;
1168
626
  if (!self) return result;
1169
- _dec_onDecErr_up();
1170
- _dec_close_check(0==LZ4_freeStreamDecode(self->s));
627
+ _close_check(0==LZ4_freeStreamDecode(self->s));
1171
628
  free(self);
1172
629
  return result;
1173
630
  }
@@ -1187,16 +644,16 @@ static void __dec_free(void* _, void* address){
1187
644
  self->data_begin+=dataLen;
1188
645
  }else{
1189
646
  int codeLen;
1190
- _lz4_read_len4(codeLen,self->codeStream,self->code_begin,self->code_end,_dec_onDecErr_rt);
647
+ _lz4_read_len4(codeLen,self->codeStream,self->code_begin,self->code_end);
1191
648
  if ((codeLen<=0)||(codeLen>self->code_buf_size)
1192
- ||((size_t)codeLen>(self->code_end-self->code_begin))) _dec_onDecErr_rt();
649
+ ||((size_t)codeLen>(self->code_end-self->code_begin))) return hpatch_FALSE;
1193
650
  if (!self->codeStream->read(self->codeStream,self->code_begin,
1194
651
  code_buf,code_buf+codeLen)) return hpatch_FALSE;
1195
652
  self->code_begin+=codeLen;
1196
653
  self->data_begin=0;
1197
654
  self->data_end=LZ4_decompress_safe_continue(self->s,(const char*)code_buf,(char*)data_buf,
1198
655
  codeLen,self->kLz4CompressBufSize);
1199
- if (self->data_end<=0) _dec_onDecErr_rt();
656
+ if (self->data_end<=0) return hpatch_FALSE;
1200
657
  }
1201
658
  }
1202
659
  return hpatch_TRUE;
@@ -1207,8 +664,7 @@ static void __dec_free(void* _, void* address){
1207
664
 
1208
665
  #ifdef _CompressPlugin_zstd
1209
666
  #if (_IsNeedIncludeDefaultCompressHead)
1210
- //# define ZSTD_STATIC_LINKING_ONLY //for ZSTD_customMem
1211
- # include "zstd.h" // "zstd/lib/zstd.h" https://github.com/sisong/zstd
667
+ # include "zstd.h" // "zstd/lib/zstd.h" https://github.com/facebook/zstd
1212
668
  #endif
1213
669
  typedef struct _zstd_TDecompress{
1214
670
  const struct hpatch_TStreamInput* codeStream;
@@ -1219,13 +675,8 @@ static void __dec_free(void* _, void* address){
1219
675
  ZSTD_outBuffer s_output;
1220
676
  size_t data_begin;
1221
677
  ZSTD_DStream* s;
1222
- hpatch_dec_error_t decError;
1223
678
  unsigned char buf[1];
1224
679
  } _zstd_TDecompress;
1225
- #ifdef ZSTD_STATIC_LINKING_ONLY
1226
- static void* __ZSTD_alloc(void* opaque, size_t size)
1227
- __dec_Alloc_fun(_zstd_TDecompress,opaque,size)
1228
- #endif
1229
680
  static hpatch_BOOL _zstd_is_can_open(const char* compressType){
1230
681
  return (0==strcmp(compressType,"zstd"));
1231
682
  }
@@ -1238,8 +689,9 @@ static void __dec_free(void* _, void* address){
1238
689
  size_t ret;
1239
690
  size_t _input_size=ZSTD_DStreamInSize();
1240
691
  size_t _output_size=ZSTD_DStreamOutSize();
1241
- self=(_zstd_TDecompress*)_dec_malloc(sizeof(_zstd_TDecompress)+_input_size+_output_size);
1242
- if (!self) _dec_memErr_rt();
692
+ assert(code_begin<code_end);
693
+ self=(_zstd_TDecompress*)malloc(sizeof(_zstd_TDecompress)+_input_size+_output_size);
694
+ if (!self) return 0;
1243
695
  memset(self,0,sizeof(_zstd_TDecompress));
1244
696
  self->codeStream=codeStream;
1245
697
  self->code_begin=code_begin;
@@ -1251,20 +703,11 @@ static void __dec_free(void* _, void* address){
1251
703
  self->s_output.size=_output_size;
1252
704
  self->s_output.pos=0;
1253
705
  self->data_begin=0;
1254
- #ifdef ZSTD_STATIC_LINKING_ONLY
1255
- {
1256
- ZSTD_customMem customMem={__ZSTD_alloc,__dec_free,self};
1257
- self->s=ZSTD_createDStream_advanced(customMem);
1258
- }
1259
- #else
1260
- self->s=ZSTD_createDStream();
1261
- #endif
1262
- if (!self->s){ _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
706
+
707
+ self->s = ZSTD_createDStream();
708
+ if (!self->s){ free(self); return 0; }
1263
709
  ret=ZSTD_initDStream(self->s);
1264
- if (ZSTD_isError(ret)) { ZSTD_freeDStream(self->s); _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
1265
- #define _ZSTD_WINDOWLOG_MAX 30
1266
- ret=ZSTD_DCtx_setParameter(self->s,ZSTD_d_windowLogMax,_ZSTD_WINDOWLOG_MAX);
1267
- //if (ZSTD_isError(ret)) { printf("WARNING: ZSTD_DCtx_setMaxWindowSize() error!"); }
710
+ if (ZSTD_isError(ret)) { ZSTD_freeDStream(self->s); free(self); return 0; }
1268
711
  return self;
1269
712
  }
1270
713
  static hpatch_BOOL _zstd_close(struct hpatch_TDecompress* decompressPlugin,
@@ -1272,8 +715,7 @@ static void __dec_free(void* _, void* address){
1272
715
  hpatch_BOOL result=hpatch_TRUE;
1273
716
  _zstd_TDecompress* self=(_zstd_TDecompress*)decompressHandle;
1274
717
  if (!self) return result;
1275
- _dec_onDecErr_up();
1276
- _dec_close_check(0==ZSTD_freeDStream(self->s));
718
+ _close_check(0==ZSTD_freeDStream(self->s));
1277
719
  free(self);
1278
720
  return result;
1279
721
  }
@@ -1305,8 +747,8 @@ static void __dec_free(void* _, void* address){
1305
747
  self->s_output.pos=0;
1306
748
  self->data_begin=0;
1307
749
  ret=ZSTD_decompressStream(self->s,&self->s_output,&self->s_input);
1308
- if (ZSTD_isError(ret)) _dec_onDecErr_rt();
1309
- if (self->s_output.pos==self->data_begin) _dec_onDecErr_rt();
750
+ if (ZSTD_isError(ret)) return hpatch_FALSE;
751
+ if (self->s_output.pos==self->data_begin) return hpatch_FALSE;
1310
752
  }
1311
753
  }
1312
754
  return hpatch_TRUE;
@@ -1333,7 +775,6 @@ static void __dec_free(void* _, void* address){
1333
775
  unsigned char* next_out;
1334
776
  unsigned char* data_begin;
1335
777
  BrotliDecoderState* s;
1336
- hpatch_dec_error_t decError;
1337
778
  unsigned char buf[1];
1338
779
  } _brotli_TDecompress;
1339
780
  static hpatch_BOOL _brotli_is_can_open(const char* compressType){
@@ -1347,8 +788,8 @@ static void __dec_free(void* _, void* address){
1347
788
  const size_t kBufSize=kDecompressBufSize;
1348
789
  _brotli_TDecompress* self=0;
1349
790
  assert(code_begin<code_end);
1350
- self=(_brotli_TDecompress*)_dec_malloc(sizeof(_brotli_TDecompress)+kBufSize*2);
1351
- if (!self) _dec_memErr_rt();
791
+ self=(_brotli_TDecompress*)malloc(sizeof(_brotli_TDecompress)+kBufSize*2);
792
+ if (!self) return 0;
1352
793
  memset(self,0,sizeof(_brotli_TDecompress));
1353
794
  self->codeStream=codeStream;
1354
795
  self->code_begin=code_begin;
@@ -1362,16 +803,15 @@ static void __dec_free(void* _, void* address){
1362
803
  self->data_begin=self->output;
1363
804
 
1364
805
  self->s = BrotliDecoderCreateInstance(0,0,0);
1365
- if (!self->s){ free(self); _dec_openErr_rt(); }
806
+ if (!self->s){ free(self); return 0; }
1366
807
  if (!BrotliDecoderSetParameter(self->s, BROTLI_DECODER_PARAM_LARGE_WINDOW, 1u))
1367
- { BrotliDecoderDestroyInstance(self->s); free(self); _dec_openErr_rt(); }
808
+ { BrotliDecoderDestroyInstance(self->s); free(self); return 0; }
1368
809
  return self;
1369
810
  }
1370
811
  static hpatch_BOOL _brotli_close(struct hpatch_TDecompress* decompressPlugin,
1371
812
  hpatch_decompressHandle decompressHandle){
1372
813
  _brotli_TDecompress* self=(_brotli_TDecompress*)decompressHandle;
1373
814
  if (!self) return hpatch_TRUE;
1374
- _dec_onDecErr_up();
1375
815
  BrotliDecoderDestroyInstance(self->s);
1376
816
  free(self);
1377
817
  return hpatch_TRUE;
@@ -1409,13 +849,13 @@ static void __dec_free(void* _, void* address){
1409
849
  switch (ret){
1410
850
  case BROTLI_DECODER_RESULT_SUCCESS:
1411
851
  case BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: {
1412
- if (self->next_out==self->data_begin) _dec_onDecErr_rt();
852
+ if (self->next_out==self->data_begin) return hpatch_FALSE;
1413
853
  } break;
1414
854
  case BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: {
1415
- if (self->code_end==self->code_begin) _dec_onDecErr_rt();
855
+ if (self->code_end==self->code_begin) return hpatch_FALSE;
1416
856
  } break;
1417
857
  default:
1418
- _dec_onDecErr_rt();
858
+ return hpatch_FALSE;
1419
859
  }
1420
860
  }
1421
861
  }
@@ -1443,7 +883,6 @@ static void __dec_free(void* _, void* address){
1443
883
  unsigned char* next_out;
1444
884
  unsigned char* data_begin;
1445
885
  lzham_decompress_state_ptr s;
1446
- hpatch_dec_error_t decError;
1447
886
  unsigned char buf[1];
1448
887
  } _lzham_TDecompress;
1449
888
  static hpatch_BOOL _lzham_is_can_open(const char* compressType){
@@ -1460,14 +899,14 @@ static void __dec_free(void* _, void* address){
1460
899
  _lzham_TDecompress* self=0;
1461
900
  assert(code_begin<code_end);
1462
901
  {//load head
1463
- if (code_end-code_begin<1) _dec_openErr_rt();
902
+ if (code_end-code_begin<1) return 0;
1464
903
  if (!codeStream->read(codeStream,code_begin,&dict_bits,(&dict_bits)+1))
1465
904
  return 0;
1466
905
  ++code_begin;
1467
906
  }
1468
907
 
1469
- self=(_lzham_TDecompress*)_dec_malloc(sizeof(_lzham_TDecompress)+kBufSize*2);
1470
- if (!self) _dec_memErr_rt();
908
+ self=(_lzham_TDecompress*)malloc(sizeof(_lzham_TDecompress)+kBufSize*2);
909
+ if (!self) return 0;
1471
910
  memset(self,0,sizeof(_lzham_TDecompress));
1472
911
  self->codeStream=codeStream;
1473
912
  self->code_begin=code_begin;
@@ -1485,7 +924,7 @@ static void __dec_free(void* _, void* address){
1485
924
  params.m_dict_size_log2 = dict_bits;
1486
925
 
1487
926
  self->s = lzham_decompress_init(&params);
1488
- if (!self->s){ free(self); _dec_openErr_rt(); }
927
+ if (!self->s){ free(self); return 0; }
1489
928
 
1490
929
  return self;
1491
930
  }
@@ -1493,7 +932,6 @@ static void __dec_free(void* _, void* address){
1493
932
  hpatch_decompressHandle decompressHandle){
1494
933
  _lzham_TDecompress* self=(_lzham_TDecompress*)decompressHandle;
1495
934
  if (!self) return hpatch_TRUE;
1496
- _dec_onDecErr_up();
1497
935
  lzham_decompress_deinit(self->s);
1498
936
  free(self);
1499
937
  return hpatch_TRUE;
@@ -1538,13 +976,13 @@ static void __dec_free(void* _, void* address){
1538
976
  case LZHAM_DECOMP_STATUS_SUCCESS:
1539
977
  case LZHAM_DECOMP_STATUS_HAS_MORE_OUTPUT:
1540
978
  case LZHAM_DECOMP_STATUS_NOT_FINISHED: {
1541
- if (self->next_out==self->data_begin) _dec_onDecErr_rt();
979
+ if (self->next_out==self->data_begin) return hpatch_FALSE;
1542
980
  } break;
1543
981
  case LZHAM_DECOMP_STATUS_NEEDS_MORE_INPUT: {
1544
- if (self->code_end==self->code_begin) _dec_onDecErr_rt();
982
+ if (self->code_end==self->code_begin) return hpatch_FALSE;
1545
983
  } break;
1546
984
  default:
1547
- _dec_onDecErr_rt();
985
+ return hpatch_FALSE;
1548
986
  }
1549
987
  }
1550
988
  }
@@ -1554,84 +992,4 @@ static void __dec_free(void* _, void* address){
1554
992
  _lzham_close,_lzham_decompress_part};
1555
993
  #endif//_CompressPlugin_lzham
1556
994
 
1557
-
1558
- #ifdef _CompressPlugin_tuz
1559
- #if (_IsNeedIncludeDefaultCompressHead)
1560
- # include "tuz_dec.h" // "tinyuz/decompress/tuz_dec.h" https://github.com/sisong/tinyuz
1561
- #endif
1562
- typedef struct _tuz_TDecompress{
1563
- const struct hpatch_TStreamInput* codeStream;
1564
- hpatch_StreamPos_t code_begin;
1565
- hpatch_StreamPos_t code_end;
1566
- tuz_byte* dec_mem;
1567
- tuz_TStream s;
1568
- hpatch_dec_error_t decError;
1569
- } _tuz_TDecompress;
1570
-
1571
- static tuz_BOOL _tuz_TDecompress_read_code(tuz_TInputStreamHandle listener,
1572
- tuz_byte* out_code,tuz_size_t* code_size){
1573
- _tuz_TDecompress* self=(_tuz_TDecompress*)listener;
1574
- tuz_size_t r_size=*code_size;
1575
- hpatch_StreamPos_t s_size=self->code_end-self->code_begin;
1576
- if (r_size>s_size){
1577
- r_size=(tuz_size_t)s_size;
1578
- *code_size=r_size;
1579
- }
1580
- if (!self->codeStream->read(self->codeStream,self->code_begin,
1581
- out_code,out_code+r_size)) return tuz_FALSE;
1582
- self->code_begin+=r_size;
1583
- return tuz_TRUE;
1584
- }
1585
-
1586
- static hpatch_BOOL _tuz_is_can_open(const char* compressType){
1587
- return (0==strcmp(compressType,"tuz"));
1588
- }
1589
- static hpatch_decompressHandle _tuz_open(hpatch_TDecompress* decompressPlugin,
1590
- hpatch_StreamPos_t dataSize,
1591
- const hpatch_TStreamInput* codeStream,
1592
- hpatch_StreamPos_t code_begin,
1593
- hpatch_StreamPos_t code_end){
1594
- tuz_size_t dictSize;
1595
- _tuz_TDecompress* self=0;
1596
- self=(_tuz_TDecompress*)_dec_malloc(sizeof(_tuz_TDecompress));
1597
- if (!self) _dec_memErr_rt();
1598
- self->dec_mem=0;
1599
- self->codeStream=codeStream;
1600
- self->code_begin=code_begin;
1601
- self->code_end=code_end;
1602
- self->decError=hpatch_dec_ok;
1603
- dictSize=tuz_TStream_read_dict_size(self,_tuz_TDecompress_read_code);
1604
- if (((tuz_size_t)(dictSize-1))>=tuz_kMaxOfDictSize) { free(self); _dec_openErr_rt(); }
1605
- self->dec_mem=(tuz_byte*)_dec_malloc(dictSize+kDecompressBufSize);
1606
- if (self->dec_mem==0){ free(self); _dec_memErr_rt(); }
1607
- if (tuz_OK!=tuz_TStream_open(&self->s,self,_tuz_TDecompress_read_code,
1608
- self->dec_mem,dictSize,kDecompressBufSize)){
1609
- free(self->dec_mem); free(self); _dec_openErr_rt(); }
1610
- return self;
1611
- }
1612
- static hpatch_BOOL _tuz_close(struct hpatch_TDecompress* decompressPlugin,
1613
- hpatch_decompressHandle decompressHandle){
1614
- _tuz_TDecompress* self=(_tuz_TDecompress*)decompressHandle;
1615
- if (!self) return hpatch_TRUE;
1616
- _dec_onDecErr_up();
1617
- if (self->dec_mem) free(self->dec_mem);
1618
- free(self);
1619
- return hpatch_TRUE;
1620
- }
1621
- static hpatch_BOOL _tuz_decompress_part(hpatch_decompressHandle decompressHandle,
1622
- unsigned char* out_part_data,unsigned char* out_part_data_end){
1623
- tuz_TResult ret;
1624
- _tuz_TDecompress* self=(_tuz_TDecompress*)decompressHandle;
1625
- size_t out_size=out_part_data_end-out_part_data;
1626
- tuz_size_t data_size=(tuz_size_t)out_size;
1627
- assert(data_size==out_size);
1628
- ret=tuz_TStream_decompress_partial(&self->s,out_part_data,&data_size);
1629
- if (!((ret<=tuz_STREAM_END)&&(data_size==out_size)))
1630
- _dec_onDecErr_rt();
1631
- return hpatch_TRUE;
1632
- }
1633
- static hpatch_TDecompress tuzDecompressPlugin={_tuz_is_can_open,_tuz_open,
1634
- _tuz_close,_tuz_decompress_part};
1635
- #endif//_CompressPlugin_tuz
1636
-
1637
995
  #endif