react-native-update 10.34.2 → 10.34.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (746) hide show
  1. package/.gitmodules +4 -4
  2. package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +153 -0
  3. package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +48 -0
  4. package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +157 -0
  5. package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +307 -0
  6. package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +83 -0
  7. package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +47 -0
  8. package/harmony/pushy/src/main/cpp/HDiffPatch/_dir_ignore.h +191 -0
  9. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +37 -0
  10. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +7 -0
  11. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +1 -0
  12. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +1 -0
  13. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +18 -0
  14. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +20 -0
  15. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +28 -0
  16. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +8 -0
  17. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +8 -0
  18. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffZ.cbp +219 -0
  19. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HPatchZ.cbp +156 -0
  20. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/unitTest.cbp +65 -0
  21. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +105 -0
  22. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +237 -0
  23. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj.user +3 -0
  24. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +318 -0
  25. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj.user +3 -0
  26. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +182 -0
  27. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj.user +3 -0
  28. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +30 -0
  29. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  30. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +408 -0
  31. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +573 -0
  32. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +396 -0
  33. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +268 -0
  34. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +361 -0
  35. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +301 -0
  36. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +411 -0
  37. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +504 -0
  38. package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +344 -0
  39. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +166 -0
  40. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +59 -0
  41. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +1152 -0
  42. package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +995 -0
  43. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +797 -0
  44. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +65 -0
  45. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +200 -0
  46. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +178 -0
  47. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +357 -0
  48. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +87 -0
  49. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +151 -0
  50. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +770 -0
  51. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +236 -0
  52. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +47 -0
  53. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +112 -0
  54. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +53 -0
  55. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +61 -0
  56. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +331 -0
  57. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +144 -0
  58. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +176 -0
  59. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +84 -0
  60. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +146 -0
  61. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +61 -0
  62. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +152 -0
  63. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +76 -0
  64. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +524 -0
  65. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +259 -0
  66. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +1570 -0
  67. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +290 -0
  68. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +1221 -0
  69. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +1025 -0
  70. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +116 -0
  71. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +72 -0
  72. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +213 -0
  73. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +63 -0
  74. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +170 -0
  75. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +86 -0
  76. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +89 -0
  77. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c +13 -0
  78. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +398 -0
  79. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +194 -0
  80. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.c +13 -0
  81. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +204 -0
  82. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +207 -0
  83. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +815 -0
  84. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +586 -0
  85. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/utils.c.inc.h +381 -0
  86. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +352 -0
  87. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +137 -0
  88. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +137 -0
  89. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +70 -0
  90. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +628 -0
  91. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +87 -0
  92. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +363 -0
  93. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +139 -0
  94. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +68 -0
  95. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +115 -0
  96. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +342 -0
  97. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +94 -0
  98. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +52 -0
  99. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +2292 -0
  100. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +215 -0
  101. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +165 -0
  102. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +251 -0
  103. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +174 -0
  104. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +73 -0
  105. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.cpp +367 -0
  106. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +92 -0
  107. package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +301 -0
  108. package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +292 -0
  109. package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +436 -0
  110. package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +417 -0
  111. package/harmony/pushy/src/main/cpp/lzma/Asm/arm/7zCrcOpt.asm +100 -0
  112. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +147 -0
  113. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +147 -0
  114. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +237 -0
  115. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +1258 -0
  116. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +205 -0
  117. package/harmony/pushy/src/main/cpp/lzma/C/7z.h +202 -0
  118. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +80 -0
  119. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +19 -0
  120. package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +1771 -0
  121. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.c +36 -0
  122. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +35 -0
  123. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf2.c +52 -0
  124. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +128 -0
  125. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +25 -0
  126. package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +115 -0
  127. package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +591 -0
  128. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +286 -0
  129. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +83 -0
  130. package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +176 -0
  131. package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +375 -0
  132. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +27 -0
  133. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.rc +55 -0
  134. package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +306 -0
  135. package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +38 -0
  136. package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +184 -0
  137. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +455 -0
  138. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +51 -0
  139. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +257 -0
  140. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +146 -0
  141. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +311 -0
  142. package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +230 -0
  143. package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +64 -0
  144. package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +82 -0
  145. package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +53 -0
  146. package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +33 -0
  147. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +218 -0
  148. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +336 -0
  149. package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +64 -0
  150. package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +19 -0
  151. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +108 -0
  152. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +20 -0
  153. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +1127 -0
  154. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +121 -0
  155. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +853 -0
  156. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +101 -0
  157. package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +57 -0
  158. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +488 -0
  159. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +120 -0
  160. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +1082 -0
  161. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +79 -0
  162. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +803 -0
  163. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +55 -0
  164. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +111 -0
  165. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +54 -0
  166. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +106 -0
  167. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +1185 -0
  168. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +234 -0
  169. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +2976 -0
  170. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +76 -0
  171. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +40 -0
  172. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +131 -0
  173. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +601 -0
  174. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +141 -0
  175. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +1138 -0
  176. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +201 -0
  177. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +85 -0
  178. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +712 -0
  179. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +142 -0
  180. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +191 -0
  181. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +187 -0
  182. package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +10 -0
  183. package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +30 -0
  184. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +248 -0
  185. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +26 -0
  186. package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +141 -0
  187. package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +18 -0
  188. package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +95 -0
  189. package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +70 -0
  190. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.c +396 -0
  191. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.h +31 -0
  192. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +241 -0
  193. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsw +29 -0
  194. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +686 -0
  195. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.c +4 -0
  196. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +10 -0
  197. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +40 -0
  198. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +75 -0
  199. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +258 -0
  200. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +168 -0
  201. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsw +29 -0
  202. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +28 -0
  203. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +44 -0
  204. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.def +4 -0
  205. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +178 -0
  206. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsw +29 -0
  207. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +14 -0
  208. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +34 -0
  209. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/resource.rc +3 -0
  210. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.c +4 -0
  211. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +10 -0
  212. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +640 -0
  213. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsp +231 -0
  214. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsw +29 -0
  215. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +37 -0
  216. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +38 -0
  217. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/resource.rc +5 -0
  218. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/setup.ico +0 -0
  219. package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +90 -0
  220. package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +460 -0
  221. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +86 -0
  222. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +26 -0
  223. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +69 -0
  224. package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +2766 -0
  225. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +1329 -0
  226. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +60 -0
  227. package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +319 -0
  228. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +240 -0
  229. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +7 -0
  230. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
  231. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +76 -0
  232. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +569 -0
  233. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +70 -0
  234. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +678 -0
  235. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +92 -0
  236. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +423 -0
  237. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +139 -0
  238. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +61 -0
  239. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +763 -0
  240. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +181 -0
  241. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +942 -0
  242. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
  243. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +148 -0
  244. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +1666 -0
  245. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +445 -0
  246. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +202 -0
  247. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +901 -0
  248. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +335 -0
  249. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +174 -0
  250. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +22 -0
  251. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +21 -0
  252. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +22 -0
  253. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +35 -0
  254. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +2500 -0
  255. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +139 -0
  256. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
  257. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +8 -0
  258. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +12 -0
  259. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +19 -0
  260. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +151 -0
  261. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +1125 -0
  262. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
  263. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
  264. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +25 -0
  265. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +232 -0
  266. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +110 -0
  267. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +46 -0
  268. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +67 -0
  269. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +88 -0
  270. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +28 -0
  271. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +191 -0
  272. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +89 -0
  273. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
  274. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +37 -0
  275. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
  276. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
  277. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +8 -0
  278. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +122 -0
  279. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +608 -0
  280. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
  281. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +629 -0
  282. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +359 -0
  283. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +8 -0
  284. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +1308 -0
  285. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +11 -0
  286. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +9 -0
  287. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +1910 -0
  288. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
  289. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
  290. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +8 -0
  291. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +154 -0
  292. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
  293. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
  294. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +8 -0
  295. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +96 -0
  296. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
  297. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
  298. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +8 -0
  299. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +116 -0
  300. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
  301. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +799 -0
  302. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +477 -0
  303. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
  304. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
  305. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +8 -0
  306. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +59 -0
  307. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +195 -0
  308. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
  309. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +715 -0
  310. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  311. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +912 -0
  312. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
  313. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +482 -0
  314. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
  315. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +8 -0
  316. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +134 -0
  317. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +5 -0
  318. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
  319. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +86 -0
  320. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +137 -0
  321. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
  322. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +803 -0
  323. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
  324. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +364 -0
  325. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
  326. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +13 -0
  327. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +117 -0
  328. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
  329. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
  330. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  331. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  332. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +988 -0
  333. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
  334. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +241 -0
  335. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
  336. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +14 -0
  337. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +153 -0
  338. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
  339. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +50 -0
  340. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +250 -0
  341. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +120 -0
  342. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +536 -0
  343. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +192 -0
  344. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
  345. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +10 -0
  346. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +475 -0
  347. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +166 -0
  348. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +435 -0
  349. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +205 -0
  350. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +163 -0
  351. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +92 -0
  352. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +127 -0
  353. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +48 -0
  354. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +367 -0
  355. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +252 -0
  356. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.cpp +3 -0
  357. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +6 -0
  358. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.cpp +3 -0
  359. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +10 -0
  360. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +509 -0
  361. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +264 -0
  362. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +39 -0
  363. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +26 -0
  364. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +111 -0
  365. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +66 -0
  366. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +51 -0
  367. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +35 -0
  368. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +108 -0
  369. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +78 -0
  370. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +106 -0
  371. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +8 -0
  372. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +156 -0
  373. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +60 -0
  374. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +285 -0
  375. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +157 -0
  376. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +56 -0
  377. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +13 -0
  378. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +57 -0
  379. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +26 -0
  380. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +48 -0
  381. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +24 -0
  382. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +666 -0
  383. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +120 -0
  384. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
  385. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +24 -0
  386. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +31 -0
  387. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +17 -0
  388. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +23 -0
  389. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +35 -0
  390. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +41 -0
  391. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +92 -0
  392. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +344 -0
  393. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +120 -0
  394. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +49 -0
  395. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyRegister.cpp +15 -0
  396. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +128 -0
  397. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +265 -0
  398. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +96 -0
  399. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +122 -0
  400. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +42 -0
  401. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
  402. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +343 -0
  403. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +113 -0
  404. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +182 -0
  405. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +46 -0
  406. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
  407. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +170 -0
  408. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +86 -0
  409. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +152 -0
  410. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +58 -0
  411. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
  412. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +8 -0
  413. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +150 -0
  414. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +92 -0
  415. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +245 -0
  416. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +46 -0
  417. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +8 -0
  418. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +8 -0
  419. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +280 -0
  420. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +118 -0
  421. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
  422. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +112 -0
  423. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +57 -0
  424. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +16 -0
  425. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +233 -0
  426. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +40 -0
  427. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +8 -0
  428. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +84 -0
  429. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +220 -0
  430. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +399 -0
  431. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +28 -0
  432. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +23 -0
  433. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +19 -0
  434. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +127 -0
  435. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +5 -0
  436. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersion.h +2 -0
  437. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +2 -0
  438. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +127 -0
  439. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/SubBuild.mak +3 -0
  440. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +993 -0
  441. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +235 -0
  442. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
  443. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
  444. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +8 -0
  445. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +28 -0
  446. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/resource.rc +3 -0
  447. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1295 -0
  448. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +136 -0
  449. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +1715 -0
  450. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +403 -0
  451. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +155 -0
  452. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +10 -0
  453. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +161 -0
  454. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +112 -0
  455. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +3618 -0
  456. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +77 -0
  457. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
  458. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +11 -0
  459. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +190 -0
  460. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +1096 -0
  461. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +42 -0
  462. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +27 -0
  463. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +482 -0
  464. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +94 -0
  465. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +34 -0
  466. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +280 -0
  467. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
  468. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +347 -0
  469. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +110 -0
  470. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +114 -0
  471. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +1074 -0
  472. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +424 -0
  473. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +3553 -0
  474. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +436 -0
  475. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +668 -0
  476. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
  477. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +14 -0
  478. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +80 -0
  479. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +10 -0
  480. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
  481. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +10 -0
  482. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +8 -0
  483. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +19 -0
  484. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +16 -0
  485. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +1704 -0
  486. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +200 -0
  487. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
  488. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +66 -0
  489. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +771 -0
  490. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +162 -0
  491. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +233 -0
  492. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +27 -0
  493. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +70 -0
  494. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +55 -0
  495. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +94 -0
  496. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +26 -0
  497. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +130 -0
  498. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
  499. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +14 -0
  500. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +43 -0
  501. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +13 -0
  502. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +69 -0
  503. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +33 -0
  504. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +825 -0
  505. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +164 -0
  506. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +367 -0
  507. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +48 -0
  508. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +1359 -0
  509. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +27 -0
  510. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +1154 -0
  511. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +175 -0
  512. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
  513. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +66 -0
  514. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +183 -0
  515. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +62 -0
  516. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
  517. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +8 -0
  518. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +702 -0
  519. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +124 -0
  520. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +110 -0
  521. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
  522. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +64 -0
  523. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/resource.rc +7 -0
  524. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +37 -0
  525. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
  526. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1025 -0
  527. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +21 -0
  528. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
  529. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
  530. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
  531. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
  532. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
  533. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1037 -0
  534. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +328 -0
  535. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
  536. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
  537. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +40 -0
  538. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +76 -0
  539. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +122 -0
  540. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +69 -0
  541. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +91 -0
  542. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +17 -0
  543. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
  544. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
  545. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +14 -0
  546. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
  547. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +196 -0
  548. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +170 -0
  549. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
  550. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1337 -0
  551. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +351 -0
  552. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
  553. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +48 -0
  554. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +80 -0
  555. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
  556. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
  557. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
  558. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +95 -0
  559. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +255 -0
  560. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +62 -0
  561. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +177 -0
  562. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +15 -0
  563. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +59 -0
  564. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +418 -0
  565. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
  566. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
  567. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
  568. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +280 -0
  569. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +38 -0
  570. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
  571. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +27 -0
  572. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/resource2.h +2 -0
  573. package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +156 -0
  574. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +35 -0
  575. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +7 -0
  576. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +92 -0
  577. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +53 -0
  578. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +21 -0
  579. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +197 -0
  580. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +63 -0
  581. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +43 -0
  582. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +98 -0
  583. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +15 -0
  584. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +64 -0
  585. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +193 -0
  586. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +28 -0
  587. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +23 -0
  588. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +132 -0
  589. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +18 -0
  590. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +259 -0
  591. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +100 -0
  592. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +277 -0
  593. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +14 -0
  594. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +54 -0
  595. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +45 -0
  596. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +42 -0
  597. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +1659 -0
  598. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +868 -0
  599. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +35 -0
  600. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +17 -0
  601. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.cpp +3 -0
  602. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +634 -0
  603. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +145 -0
  604. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +231 -0
  605. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +163 -0
  606. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +88 -0
  607. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +40 -0
  608. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +8 -0
  609. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +89 -0
  610. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +38 -0
  611. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +163 -0
  612. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +71 -0
  613. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +319 -0
  614. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +88 -0
  615. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +144 -0
  616. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +21 -0
  617. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +124 -0
  618. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +19 -0
  619. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +288 -0
  620. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +12 -0
  621. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +676 -0
  622. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +149 -0
  623. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Init.cpp +7 -0
  624. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +42 -0
  625. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +70 -0
  626. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +185 -0
  627. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +23 -0
  628. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +66 -0
  629. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +65 -0
  630. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +52 -0
  631. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +251 -0
  632. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +170 -0
  633. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +19 -0
  634. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.cpp +10 -0
  635. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +87 -0
  636. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +155 -0
  637. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +146 -0
  638. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +35 -0
  639. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +143 -0
  640. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +50 -0
  641. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +34 -0
  642. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +28 -0
  643. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +42 -0
  644. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +8 -0
  645. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +43 -0
  646. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +27 -0
  647. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +200 -0
  648. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +51 -0
  649. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +109 -0
  650. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +58 -0
  651. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +17 -0
  652. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +66 -0
  653. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +15 -0
  654. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +714 -0
  655. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +117 -0
  656. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +749 -0
  657. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +161 -0
  658. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +432 -0
  659. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +212 -0
  660. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +440 -0
  661. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.cpp +12 -0
  662. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +66 -0
  663. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +839 -0
  664. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +115 -0
  665. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +131 -0
  666. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +27 -0
  667. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +37 -0
  668. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +112 -0
  669. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +40 -0
  670. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +46 -0
  671. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +347 -0
  672. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +114 -0
  673. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +138 -0
  674. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +37 -0
  675. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +390 -0
  676. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +84 -0
  677. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +103 -0
  678. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +16 -0
  679. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +181 -0
  680. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +167 -0
  681. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +358 -0
  682. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +94 -0
  683. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +8 -0
  684. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +10 -0
  685. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +164 -0
  686. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +142 -0
  687. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +40 -0
  688. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +38 -0
  689. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +213 -0
  690. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +32 -0
  691. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +179 -0
  692. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +284 -0
  693. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CRC.cs +55 -0
  694. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CommandLineParser.cs +274 -0
  695. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/InBuffer.cs +72 -0
  696. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/OutBuffer.cs +47 -0
  697. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +24 -0
  698. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +367 -0
  699. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +132 -0
  700. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +110 -0
  701. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +76 -0
  702. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +398 -0
  703. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +1480 -0
  704. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +364 -0
  705. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj +90 -0
  706. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +20 -0
  707. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +340 -0
  708. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +29 -0
  709. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +70 -0
  710. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +42 -0
  711. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +234 -0
  712. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +117 -0
  713. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +157 -0
  714. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/ICoder.cs +157 -0
  715. package/harmony/pushy/src/main/cpp/lzma/DOC/7zC.txt +187 -0
  716. package/harmony/pushy/src/main/cpp/lzma/DOC/7zFormat.txt +469 -0
  717. package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +173 -0
  718. package/harmony/pushy/src/main/cpp/lzma/DOC/installer.txt +166 -0
  719. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +446 -0
  720. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +357 -0
  721. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-specification.txt +1176 -0
  722. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +328 -0
  723. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/CRC.java +52 -0
  724. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/BinTree.java +382 -0
  725. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/InWindow.java +131 -0
  726. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +85 -0
  727. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Base.java +88 -0
  728. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +329 -0
  729. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +1416 -0
  730. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +55 -0
  731. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +99 -0
  732. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +88 -0
  733. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +151 -0
  734. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/ICodeProgress.java +6 -0
  735. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaAlone.java +253 -0
  736. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaBench.java +392 -0
  737. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2.sfx +0 -0
  738. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2con.sfx +0 -0
  739. package/harmony/pushy/src/main/cpp/lzma/bin/7zSD.sfx +0 -0
  740. package/harmony/pushy/src/main/cpp/lzma/bin/7zdec.exe +0 -0
  741. package/harmony/pushy/src/main/cpp/lzma/bin/7zr.exe +0 -0
  742. package/harmony/pushy/src/main/cpp/lzma/bin/installer/config.txt +5 -0
  743. package/harmony/pushy/src/main/cpp/lzma/bin/installer/cr.bat +5 -0
  744. package/harmony/pushy/src/main/cpp/lzma/bin/lzma.exe +0 -0
  745. package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
  746. package/package.json +1 -1
@@ -0,0 +1,1221 @@
1
+ //hpatchz.c
2
+ // patch tool
3
+ //
4
+ /*
5
+ This is the HDiffPatch copyright.
6
+
7
+ Copyright (c) 2012-2019 HouSisong All Rights Reserved.
8
+
9
+ Permission is hereby granted, free of charge, to any person
10
+ obtaining a copy of this software and associated documentation
11
+ files (the "Software"), to deal in the Software without
12
+ restriction, including without limitation the rights to use,
13
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the
15
+ Software is furnished to do so, subject to the following
16
+ conditions:
17
+
18
+ The above copyright notice and this permission notice shall be
19
+ included in all copies of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28
+ OTHER DEALINGS IN THE SOFTWARE.
29
+ */
30
+
31
+ #include <string.h>
32
+ #include <stdlib.h>
33
+ #include <stdio.h> //fprintf
34
+ #include "libHDiffPatch/HPatch/patch.h"
35
+ #include "_clock_for_demo.h"
36
+ #include "_atosize.h"
37
+ #include "file_for_patch.h"
38
+
39
+ #if (_IS_NEED_DIR_DIFF_PATCH)
40
+ #include "dirDiffPatch/dir_patch/dir_patch.h"
41
+ #include "hpatch_dir_listener.h"
42
+ #endif
43
+
44
+ #ifndef _IS_NEED_MAIN
45
+ # define _IS_NEED_MAIN 1
46
+ #endif
47
+ #ifndef _IS_NEED_SFX
48
+ # define _IS_NEED_SFX 1
49
+ #endif
50
+
51
+ #ifndef _IS_NEED_DEFAULT_CompressPlugin
52
+ # define _IS_NEED_DEFAULT_CompressPlugin 1
53
+ #endif
54
+ #if (_IS_NEED_ALL_CompressPlugin)
55
+ # undef _IS_NEED_DEFAULT_CompressPlugin
56
+ # define _IS_NEED_DEFAULT_CompressPlugin 1
57
+ #endif
58
+ #if (_IS_NEED_DEFAULT_CompressPlugin)
59
+ //===== select needs decompress plugins or change to your plugin=====
60
+ # define _CompressPlugin_zlib
61
+ # define _CompressPlugin_bz2
62
+ # define _CompressPlugin_lzma
63
+ # define _CompressPlugin_lzma2
64
+ #endif
65
+ #if (_IS_NEED_ALL_CompressPlugin)
66
+ //===== select needs decompress plugins or change to your plugin=====
67
+ # define _CompressPlugin_lz4 // || _CompressPlugin_lz4hc
68
+ # define _CompressPlugin_zstd
69
+ # define _CompressPlugin_brotli
70
+ # define _CompressPlugin_lzham
71
+ #endif
72
+
73
+ #include "decompress_plugin_demo.h"
74
+
75
+ #if (_IS_NEED_DIR_DIFF_PATCH)
76
+
77
+ #ifndef _IS_NEED_DEFAULT_ChecksumPlugin
78
+ # define _IS_NEED_DEFAULT_ChecksumPlugin 1
79
+ #endif
80
+ #if (_IS_NEED_ALL_ChecksumPlugin)
81
+ # undef _IS_NEED_DEFAULT_ChecksumPlugin
82
+ # define _IS_NEED_DEFAULT_ChecksumPlugin 1
83
+ #endif
84
+ #if (_IS_NEED_DEFAULT_ChecksumPlugin)
85
+ //===== select needs checksum plugins or change to your plugin=====
86
+ # define _ChecksumPlugin_crc32 // = 32 bit effective //need zlib
87
+ # define _ChecksumPlugin_fadler64 // ? 63 bit effective
88
+ #endif
89
+ #if (_IS_NEED_ALL_ChecksumPlugin)
90
+ //===== select needs checksum plugins or change to your plugin=====
91
+ # define _ChecksumPlugin_adler32 // ? 29 bit effective
92
+ # define _ChecksumPlugin_adler64 // ? 30 bit effective
93
+ # define _ChecksumPlugin_fadler32 // ~ 32 bit effective
94
+ # define _ChecksumPlugin_fadler128// ? 81 bit effective
95
+ # define _ChecksumPlugin_md5 // ? 128 bit effective
96
+ #endif
97
+
98
+
99
+ #include "checksum_plugin_demo.h"
100
+ #endif
101
+
102
+ static void printVersion(){
103
+ printf("HDiffPatch::hpatchz v" HDIFFPATCH_VERSION_STRING "\n\n");
104
+ }
105
+
106
+ static void printUsage(){
107
+ printVersion();
108
+ printf("patch usage: hpatchz [options] oldPath diffFile outNewPath\n"
109
+ #if (_IS_NEED_SFX)
110
+ "create SFX: hpatchz [-X-exe#selfExecuteFile] diffFile -X#outSelfExtractArchive\n"
111
+ "run SFX: selfExtractArchive [[options] oldPath -X outNewPath]\n"
112
+ "extract SFX: selfExtractArchive (same as: selfExtractArchive -f \"\" -X "
113
+ # ifdef _WIN32
114
+ "\".\\\")\n"
115
+ # else
116
+ "\"./\")\n"
117
+ # endif
118
+ #endif
119
+ " if oldPath is empty input parameter \"\"\n"
120
+ "memory options:\n"
121
+ " -m oldPath all loaded into Memory;\n"
122
+ " requires (oldFileSize+ 4*decompress stream size)+O(1) bytes of memory.\n"
123
+ " -s[-cacheSize] \n"
124
+ " DEFAULT -s-64m; oldPath loaded as Stream;\n"
125
+ " requires (cacheSize+ 4*decompress stream size)+O(1) bytes of memory;\n"
126
+ " cacheSize can like 262144 or 256k or 512m or 2g etc....\n"
127
+ "special options:\n"
128
+ #if (_IS_NEED_DIR_DIFF_PATCH)
129
+ " -C-checksumSets\n"
130
+ " set Checksum data for directory patch, DEFAULT -C-new-copy;\n"
131
+ " checksumSets support (can choose multiple):\n"
132
+ " -C-diff checksum diffFile;\n"
133
+ " -C-old checksum old reference files;\n"
134
+ " -C-new checksum new files edited from old reference files;\n"
135
+ " -C-copy checksum new files copy from old same files;\n"
136
+ " -C-no no checksum;\n"
137
+ " -C-all same as: -C-diff-old-new-copy;\n"
138
+ " -n-maxOpenFileNumber\n"
139
+ " limit Number of open files at same time when stream directory patch;\n"
140
+ " maxOpenFileNumber>=8, DEFAULT -n-24, the best limit value by different\n"
141
+ " operating system.\n"
142
+ #endif
143
+ " -f Force overwrite, ignore write path already exists;\n"
144
+ " DEFAULT (no -f) not overwrite and then return error;\n"
145
+ " support oldPath outNewPath same path!(patch to tempPath and overwrite old)\n"
146
+ " if used -f and outNewPath is exist file:\n"
147
+ #if (_IS_NEED_DIR_DIFF_PATCH)
148
+ " if patch output file, will overwrite;\n"
149
+ #else
150
+ " will overwrite;\n"
151
+ #endif
152
+ #if (_IS_NEED_DIR_DIFF_PATCH)
153
+ " if patch output directory, will always return error;\n"
154
+ #endif
155
+ " if used -f and outNewPath is exist directory:\n"
156
+ #if (_IS_NEED_DIR_DIFF_PATCH)
157
+ " if patch output file, will always return error;\n"
158
+ #else
159
+ " will always return error;\n"
160
+ #endif
161
+ #if (_IS_NEED_DIR_DIFF_PATCH)
162
+ " if patch output directory, will overwrite, but not delete\n"
163
+ " needless existing files in directory.\n"
164
+ #endif
165
+ " -h or -?\n"
166
+ " output Help info (this usage).\n"
167
+ " -v output Version info.\n\n"
168
+ );
169
+ }
170
+
171
+ typedef enum THPatchResult {
172
+ HPATCH_SUCCESS=0,
173
+ HPATCH_OPTIONS_ERROR,
174
+ HPATCH_OPENREAD_ERROR,
175
+ HPATCH_OPENWRITE_ERROR,
176
+ HPATCH_FILEREAD_ERROR,
177
+ HPATCH_FILEWRITE_ERROR, // 5
178
+ HPATCH_FILEDATA_ERROR,
179
+ HPATCH_FILECLOSE_ERROR,
180
+ HPATCH_MEM_ERROR,
181
+ HPATCH_HDIFFINFO_ERROR,
182
+ HPATCH_COMPRESSTYPE_ERROR, // 10
183
+ HPATCH_PATCH_ERROR,
184
+
185
+ HPATCH_PATHTYPE_ERROR, //adding begin v3.0
186
+ HPATCH_TEMPPATH_ERROR,
187
+ HPATCH_DELETEPATH_ERROR,
188
+ HPATCH_RENAMEPATH_ERROR, // 15
189
+
190
+ #if (_IS_NEED_DIR_DIFF_PATCH)
191
+ DIRPATCH_DIRDIFFINFO_ERROR=101,
192
+ DIRPATCH_CHECKSUMTYPE_ERROR,
193
+ DIRPATCH_CHECKSUMSET_ERROR,
194
+ DIRPATCH_CHECKSUM_DIFFDATA_ERROR,
195
+ DIRPATCH_CHECKSUM_OLDDATA_ERROR, // 105
196
+ DIRPATCH_CHECKSUM_NEWDATA_ERROR,
197
+ DIRPATCH_CHECKSUM_COPYDATA_ERROR,
198
+ DIRPATCH_PATCH_ERROR,
199
+ DIRPATCH_LAOD_DIRDIFFDATA_ERROR,
200
+ DIRPATCH_OPEN_OLDPATH_ERROR, // 110
201
+ DIRPATCH_OPEN_NEWPATH_ERROR,
202
+ DIRPATCH_CLOSE_OLDPATH_ERROR,
203
+ DIRPATCH_CLOSE_NEWPATH_ERROR,
204
+ DIRPATCH_PATCHBEGIN_ERROR,
205
+ DIRPATCH_PATCHFINISH_ERROR, // 115
206
+ #endif
207
+ #if (_IS_NEED_SFX)
208
+ HPATCH_CREATE_SFX_DIFFFILETYPE_ERROR=201,
209
+ HPATCH_CREATE_SFX_SFXTYPE_ERROR,
210
+ HPATCH_CREATE_SFX_EXECUTETAG_ERROR,
211
+ HPATCH_RUN_SFX_NOTSFX_ERROR,
212
+ HPATCH_RUN_SFX_DIFFOFFSERT_ERROR, // 205
213
+ #endif
214
+ } THPatchResult;
215
+
216
+ int hpatch_cmd_line(int argc, const char * argv[]);
217
+
218
+ int hpatch(const char* oldFileName,const char* diffFileName,const char* outNewFileName,
219
+ hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
220
+ hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize);
221
+ #if (_IS_NEED_DIR_DIFF_PATCH)
222
+ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPath,
223
+ hpatch_BOOL isLoadOldAll,size_t patchCacheSize,size_t kMaxOpenFileNumber,
224
+ TDirPatchChecksumSet* checksumSet,IHPatchDirListener* hlistener,
225
+ hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize);
226
+ #endif
227
+ #if (_IS_NEED_SFX)
228
+ int createSfx(const char* selfExecuteFileName,const char* diffFileName,const char* out_sfxFileName);
229
+ hpatch_BOOL getDiffDataOffertInSfx(hpatch_StreamPos_t* out_diffDataOffert,hpatch_StreamPos_t* out_diffDataSize);
230
+ #endif
231
+
232
+ #if (_IS_NEED_MAIN)
233
+ # if (_IS_USED_WIN32_UTF8_WAPI)
234
+ int wmain(int argc,wchar_t* argv_w[]){
235
+ char* argv_utf8[hpatch_kPathMaxSize*3/sizeof(char*)];
236
+ if (!_wFileNames_to_utf8((const wchar_t**)argv_w,argc,argv_utf8,sizeof(argv_utf8)))
237
+ return HPATCH_OPTIONS_ERROR;
238
+ SetDefaultStringLocale();
239
+ return hpatch_cmd_line(argc,argv_utf8);
240
+ }
241
+ # else
242
+ int main(int argc, const char * argv[]){
243
+ return hpatch_cmd_line(argc,argv);
244
+ }
245
+ # endif
246
+ #endif
247
+
248
+ #if (_IS_NEED_DIR_DIFF_PATCH)
249
+ static hpatch_BOOL _toChecksumSet(const char* psets,TDirPatchChecksumSet* checksumSet){
250
+ while (hpatch_TRUE) {
251
+ const char* pend=findUntilEnd(psets,'-');
252
+ size_t len=(size_t)(pend-psets);
253
+ if (len==0) return hpatch_FALSE; //error no set
254
+ if ((len==4)&&(0==memcmp(psets,"diff",len))){
255
+ checksumSet->isCheck_dirDiffData=hpatch_TRUE;
256
+ }else if ((len==3)&&(0==memcmp(psets,"old",len))){
257
+ checksumSet->isCheck_oldRefData=hpatch_TRUE;
258
+ }else if ((len==3)&&(0==memcmp(psets,"new",len))){
259
+ checksumSet->isCheck_newRefData=hpatch_TRUE;
260
+ }else if ((len==4)&&(0==memcmp(psets,"copy",len))){
261
+ checksumSet->isCheck_copyFileData=hpatch_TRUE;
262
+ }else if ((len==3)&&(0==memcmp(psets,"all",len))){
263
+ checksumSet->isCheck_dirDiffData=hpatch_TRUE;
264
+ checksumSet->isCheck_oldRefData=hpatch_TRUE;
265
+ checksumSet->isCheck_newRefData=hpatch_TRUE;
266
+ checksumSet->isCheck_copyFileData=hpatch_TRUE;
267
+ }else if ((len==2)&&(0==memcmp(psets,"no",len))){
268
+ checksumSet->isCheck_dirDiffData=hpatch_FALSE;
269
+ checksumSet->isCheck_oldRefData=hpatch_FALSE;
270
+ checksumSet->isCheck_newRefData=hpatch_FALSE;
271
+ checksumSet->isCheck_copyFileData=hpatch_FALSE;
272
+ }else{
273
+ return hpatch_FALSE;//error unknow set
274
+ }
275
+ if (*pend=='\0')
276
+ return hpatch_TRUE; //ok
277
+ else
278
+ psets=pend+1;
279
+ }
280
+ }
281
+ #endif
282
+
283
+ #define _return_check(value,exitCode,errorInfo){ \
284
+ if (!(value)) { fprintf(stderr,errorInfo " ERROR!\n"); return exitCode; } }
285
+
286
+ #define _options_check(value,errorInfo){ \
287
+ if (!(value)) { fprintf(stderr,"options " errorInfo " ERROR!\n\n"); \
288
+ printUsage(); return HPATCH_OPTIONS_ERROR; } }
289
+
290
+ #define kPatchCacheSize_min (hpatch_kStreamCacheSize*8)
291
+ #define kPatchCacheSize_bestmin ((size_t)1<<21)
292
+ #define kPatchCacheSize_default ((size_t)1<<26)
293
+ #define kPatchCacheSize_bestmax ((size_t)1<<30)
294
+
295
+ #define _kNULL_VALUE (-1)
296
+ #define _kNULL_SIZE (~(size_t)0)
297
+
298
+ int hpatch_cmd_line(int argc, const char * argv[]){
299
+ hpatch_BOOL isLoadOldAll=_kNULL_VALUE;
300
+ hpatch_BOOL isForceOverwrite=_kNULL_VALUE;
301
+ hpatch_BOOL isOutputHelp=_kNULL_VALUE;
302
+ hpatch_BOOL isOutputVersion=_kNULL_VALUE;
303
+ hpatch_BOOL isOldPathInputEmpty=_kNULL_VALUE;
304
+ #if (_IS_NEED_SFX)
305
+ hpatch_BOOL isRunSFX=_kNULL_VALUE;
306
+ const char* out_SFX=0;
307
+ const char* selfExecuteFile=0;
308
+ #endif
309
+ size_t patchCacheSize=0;
310
+ #if (_IS_NEED_DIR_DIFF_PATCH)
311
+ size_t kMaxOpenFileNumber=_kNULL_SIZE; //only used in stream dir patch
312
+ TDirPatchChecksumSet checksumSet={0,hpatch_FALSE,hpatch_TRUE,hpatch_TRUE,hpatch_FALSE}; //DEFAULT
313
+ #endif
314
+ #define kMax_arg_values_size 3
315
+ const char* arg_values[kMax_arg_values_size]={0};
316
+ int arg_values_size=0;
317
+ int i;
318
+ for (i=1; i<argc; ++i) {
319
+ const char* op=argv[i];
320
+ _options_check(op!=0,"?");
321
+ if (op[0]!='-'){
322
+ hpatch_BOOL isEmpty=(strlen(op)==0);
323
+ _options_check(arg_values_size<kMax_arg_values_size,"input count");
324
+ if (isEmpty){
325
+ if (isOldPathInputEmpty==_kNULL_VALUE)
326
+ isOldPathInputEmpty=hpatch_TRUE;
327
+ else
328
+ _options_check(!isEmpty,"?"); //error return
329
+ }else{
330
+ if (isOldPathInputEmpty==_kNULL_VALUE)
331
+ isOldPathInputEmpty=hpatch_FALSE;
332
+ }
333
+ arg_values[arg_values_size]=op; //path: file or directory
334
+ ++arg_values_size;
335
+ continue;
336
+ }
337
+ _options_check((op!=0)&&(op[0]=='-'),"?");
338
+ switch (op[1]) {
339
+ case 'm':{
340
+ _options_check((isLoadOldAll==_kNULL_VALUE)&&(op[2]=='\0'),"-m");
341
+ isLoadOldAll=hpatch_TRUE;
342
+ } break;
343
+ case 's':{
344
+ _options_check((isLoadOldAll==_kNULL_VALUE)&&((op[2]=='-')||(op[2]=='\0')),"-s");
345
+ isLoadOldAll=hpatch_FALSE; //stream
346
+ if (op[2]=='-'){
347
+ const char* pnum=op+3;
348
+ _options_check(kmg_to_size(pnum,strlen(pnum),&patchCacheSize),"-s-?");
349
+ }else{
350
+ patchCacheSize=kPatchCacheSize_default;
351
+ }
352
+ } break;
353
+ #if (_IS_NEED_SFX)
354
+ case 'X':{
355
+ if (op[2]=='#'){
356
+ const char* pnum=op+3;
357
+ _options_check(out_SFX==0,"-X#?");
358
+ out_SFX=pnum;
359
+ _options_check(strlen(out_SFX)>0,"-X#?");
360
+ }else if (op[2]=='-'){
361
+ _options_check(selfExecuteFile==0,"-X-?");
362
+ if ((op[3]=='e')&&(op[4]=='x')&&(op[5]=='e')&&(op[6]=='#')){
363
+ selfExecuteFile=op+7;
364
+ _options_check(strlen(selfExecuteFile)>0,"-X-exe#?");
365
+ }else{
366
+ _options_check(hpatch_FALSE,"-X-?");
367
+ }
368
+ }else{
369
+ _options_check((isRunSFX==_kNULL_VALUE)&&(op[2]=='\0'),"-X");
370
+ isRunSFX=hpatch_TRUE;
371
+ }
372
+ } break;
373
+ #endif
374
+ case 'f':{
375
+ _options_check((isForceOverwrite==_kNULL_VALUE)&&(op[2]=='\0'),"-f");
376
+ isForceOverwrite=hpatch_TRUE;
377
+ } break;
378
+ #if (_IS_NEED_DIR_DIFF_PATCH)
379
+ case 'C':{
380
+ const char* psets=op+3;
381
+ _options_check((op[2]=='-'),"-C-?");
382
+ memset(&checksumSet,0,sizeof(checksumSet));//all set false
383
+ _options_check(_toChecksumSet(psets,&checksumSet),"-C-?");
384
+ } break;
385
+ case 'n':{
386
+ const char* pnum=op+3;
387
+ _options_check((kMaxOpenFileNumber==_kNULL_SIZE)&&(op[2]=='-'),"-n-?");
388
+ _options_check(kmg_to_size(pnum,strlen(pnum),&kMaxOpenFileNumber),"-n-?");
389
+ } break;
390
+ #endif
391
+ case '?':
392
+ case 'h':{
393
+ _options_check((isOutputHelp==_kNULL_VALUE)&&(op[2]=='\0'),"-h");
394
+ isOutputHelp=hpatch_TRUE;
395
+ } break;
396
+ case 'v':{
397
+ _options_check((isOutputVersion==_kNULL_VALUE)&&(op[2]=='\0'),"-v");
398
+ isOutputVersion=hpatch_TRUE;
399
+ } break;
400
+ default: {
401
+ _options_check(hpatch_FALSE,"-?");
402
+ } break;
403
+ }//switch
404
+ }
405
+
406
+ if (isOutputHelp==_kNULL_VALUE)
407
+ isOutputHelp=hpatch_FALSE;
408
+ if (isOutputVersion==_kNULL_VALUE)
409
+ isOutputVersion=hpatch_FALSE;
410
+ if (isForceOverwrite==_kNULL_VALUE)
411
+ isForceOverwrite=hpatch_FALSE;
412
+ #if (_IS_NEED_SFX)
413
+ if (isRunSFX==_kNULL_VALUE)
414
+ isRunSFX=hpatch_FALSE;
415
+ if (arg_values_size==0){
416
+ hpatch_StreamPos_t _diffDataOffert=0;
417
+ hpatch_StreamPos_t _diffDataSize=0;
418
+ if (getDiffDataOffertInSfx(&_diffDataOffert,&_diffDataSize)){//autoExtractSFX
419
+ isForceOverwrite=hpatch_TRUE;
420
+ isRunSFX=hpatch_TRUE;
421
+ }
422
+ }
423
+ #endif
424
+ if (isOutputHelp||isOutputVersion){
425
+ if (isOutputHelp)
426
+ printUsage();//with version
427
+ else
428
+ printVersion();
429
+ #if (_IS_NEED_SFX)
430
+ if ((arg_values_size==0)&&(!isRunSFX)&&(out_SFX==0)&&(selfExecuteFile==0))
431
+ #else
432
+ if (arg_values_size==0)
433
+ #endif
434
+ return 0; //ok
435
+ }
436
+ #if (_IS_NEED_DIR_DIFF_PATCH)
437
+ if (kMaxOpenFileNumber==_kNULL_SIZE)
438
+ kMaxOpenFileNumber=kMaxOpenFileNumber_default_patch;
439
+ if (kMaxOpenFileNumber<kMaxOpenFileNumber_default_min)
440
+ kMaxOpenFileNumber=kMaxOpenFileNumber_default_min;
441
+ #endif
442
+
443
+ if (isLoadOldAll==_kNULL_VALUE){
444
+ isLoadOldAll=hpatch_FALSE;
445
+ patchCacheSize=kPatchCacheSize_default;
446
+ }
447
+ if (isOldPathInputEmpty==_kNULL_VALUE)
448
+ isOldPathInputEmpty=hpatch_FALSE;
449
+
450
+ #if (_IS_NEED_SFX)
451
+ if ((out_SFX!=0)||(selfExecuteFile!=0)){ //create SFX
452
+ _options_check(out_SFX!=0,"-X#?");
453
+ _options_check(!isRunSFX, "-X");
454
+ _options_check(arg_values_size==1,"-X# input count");
455
+ {
456
+ const char* diffFileName =arg_values[0];
457
+ if (selfExecuteFile==0) selfExecuteFile=argv[0];
458
+ if (!isForceOverwrite){
459
+ hpatch_TPathType outPathType;
460
+ _return_check(hpatch_getPathStat(out_SFX,&outPathType,0),
461
+ HPATCH_PATHTYPE_ERROR,"get outSelfExtractArchive type");
462
+ _return_check(outPathType==kPathType_notExist,
463
+ HPATCH_PATHTYPE_ERROR,"outSelfExtractArchive already exists, overwrite");
464
+ }
465
+ return createSfx(selfExecuteFile,diffFileName,out_SFX);
466
+ }
467
+ }else if (isRunSFX){//patch run as SFX mode
468
+ _options_check((arg_values_size==2)||(arg_values_size==0),"-X input count");
469
+ }else
470
+ #endif
471
+ {//patch default mode
472
+ _options_check(arg_values_size==3,"input count");
473
+ }
474
+ {//patch
475
+ const char* oldPath =0;
476
+ const char* diffFileName=0;
477
+ const char* outNewPath =0;
478
+ #if (_IS_NEED_SFX)
479
+ # ifdef _WIN32
480
+ const char* kSFX_curDefaultPath=".\\";
481
+ # else
482
+ const char* kSFX_curDefaultPath="./";
483
+ # endif
484
+ const char* kSFX_emptyPath="";
485
+ #endif
486
+ #if (_IS_NEED_DIR_DIFF_PATCH)
487
+ TDirDiffInfo dirDiffInfo;
488
+ hpatch_BOOL isOutDir;
489
+ #endif
490
+ hpatch_BOOL isSamePath;
491
+ hpatch_StreamPos_t diffDataOffert=0;
492
+ hpatch_StreamPos_t diffDataSize=0;
493
+ #if (_IS_NEED_SFX)
494
+ if (isRunSFX){
495
+ printf("run as SFX mode!\n");
496
+ _return_check(getDiffDataOffertInSfx(&diffDataOffert,&diffDataSize),
497
+ HPATCH_RUN_SFX_NOTSFX_ERROR,"not found diff data in selfExecuteFile");
498
+ diffFileName=argv[0];//selfExecuteFileName
499
+ if (arg_values_size==0){//autoExtractSFX
500
+ oldPath =kSFX_emptyPath;
501
+ outNewPath =kSFX_curDefaultPath;
502
+ }else{
503
+ oldPath =arg_values[0];
504
+ outNewPath =arg_values[1];
505
+ }
506
+ //continue
507
+ }else
508
+ #endif
509
+ {
510
+ oldPath =arg_values[0];
511
+ diffFileName=arg_values[1];
512
+ outNewPath =arg_values[2];
513
+ }
514
+
515
+ isSamePath=hpatch_getIsSamePath(oldPath,outNewPath);
516
+ _return_check(!hpatch_getIsSamePath(oldPath,diffFileName),
517
+ HPATCH_PATHTYPE_ERROR,"oldPath diffFile same path");
518
+ _return_check(!hpatch_getIsSamePath(outNewPath,diffFileName),
519
+ HPATCH_PATHTYPE_ERROR,"outNewPath diffFile same path");
520
+ if (!isForceOverwrite){
521
+ hpatch_TPathType outNewPathType;
522
+ _return_check(hpatch_getPathStat(outNewPath,&outNewPathType,0),
523
+ HPATCH_PATHTYPE_ERROR,"get outNewPath type");
524
+ _return_check(outNewPathType==kPathType_notExist,
525
+ HPATCH_PATHTYPE_ERROR,"outNewPath already exists, overwrite");
526
+ }
527
+ if (isSamePath)
528
+ _return_check(isForceOverwrite,HPATCH_PATHTYPE_ERROR,"oldPath outNewPath same path, overwrite");
529
+ #if (_IS_NEED_DIR_DIFF_PATCH)
530
+ _return_check(getDirDiffInfoByFile(diffFileName,&dirDiffInfo,diffDataOffert,diffDataSize),
531
+ HPATCH_OPENREAD_ERROR,"input diffFile open read");
532
+ isOutDir=(dirDiffInfo.isDirDiff)&&(dirDiffInfo.newPathIsDir);
533
+ #endif
534
+ if (!isSamePath){ // out new file or new dir
535
+ #if (_IS_NEED_DIR_DIFF_PATCH)
536
+ if (dirDiffInfo.isDirDiff){
537
+ return hpatch_dir(oldPath,diffFileName,outNewPath,isLoadOldAll,patchCacheSize,kMaxOpenFileNumber,
538
+ &checksumSet,&defaultPatchDirlistener,diffDataOffert,diffDataSize);
539
+ }else
540
+ #endif
541
+ {
542
+ return hpatch(oldPath,diffFileName,outNewPath,
543
+ isLoadOldAll,patchCacheSize,diffDataOffert,diffDataSize);
544
+ }
545
+ }else
546
+ #if (_IS_NEED_DIR_DIFF_PATCH)
547
+ if (!isOutDir)
548
+ #endif
549
+ { // isSamePath==true and out to file
550
+ int result;
551
+ char newTempName[hpatch_kPathMaxSize];
552
+ #if (_IS_NEED_DIR_DIFF_PATCH)
553
+ if (dirDiffInfo.isDirDiff)
554
+ _return_check(!dirDiffInfo.oldPathIsDir,
555
+ HPATCH_PATHTYPE_ERROR,"can not use file overwrite oldDirectory");
556
+ #endif
557
+ // 1. patch to newTempName
558
+ // 2. if patch ok then { delelte oldPath; rename newTempName to oldPath; }
559
+ // if patch error then { delelte newTempName; }
560
+ _return_check(hpatch_getTempPathName(outNewPath,newTempName,newTempName+hpatch_kPathMaxSize),
561
+ HPATCH_TEMPPATH_ERROR,"getTempPathName(outNewPath)");
562
+ printf("NOTE: outNewPath temp file will be rename to oldPath name after patch!\n");
563
+ #if (_IS_NEED_DIR_DIFF_PATCH)
564
+ if (dirDiffInfo.isDirDiff){
565
+ result=hpatch_dir(oldPath,diffFileName,newTempName,isLoadOldAll,patchCacheSize,
566
+ kMaxOpenFileNumber,&checksumSet,&defaultPatchDirlistener,diffDataOffert,diffDataSize);
567
+ }else
568
+ #endif
569
+ {
570
+ result=hpatch(oldPath,diffFileName,newTempName,
571
+ isLoadOldAll,patchCacheSize,diffDataOffert,diffDataSize);
572
+ }
573
+ if (result==HPATCH_SUCCESS){
574
+ _return_check(hpatch_removeFile(oldPath),
575
+ HPATCH_DELETEPATH_ERROR,"removeFile(oldPath)");
576
+ _return_check(hpatch_renamePath(newTempName,oldPath),
577
+ HPATCH_RENAMEPATH_ERROR,"renamePath(temp,oldPath)");
578
+ printf("outNewPath temp file renamed to oldPath name!\n");
579
+ }else{//patch error
580
+ if (!hpatch_removeFile(newTempName)){
581
+ printf("WARNING: can't remove temp file \"");
582
+ hpatch_printPath_utf8(newTempName); printf("\"\n");
583
+ }
584
+ }
585
+ return result;
586
+ }
587
+ #if (_IS_NEED_DIR_DIFF_PATCH)
588
+ else{ // isDirDiff==true isSamePath==true and out to dir
589
+ int result;
590
+ char newTempDir[hpatch_kPathMaxSize];
591
+ assert(dirDiffInfo.isDirDiff);
592
+ _return_check(dirDiffInfo.oldPathIsDir,
593
+ HPATCH_PATHTYPE_ERROR,"can not use directory overwrite oldFile");
594
+ _return_check(hpatch_getTempPathName(outNewPath,newTempDir,newTempDir+hpatch_kPathMaxSize),
595
+ HPATCH_TEMPPATH_ERROR,"getTempPathName(outNewPath)");
596
+ printf("NOTE: all in outNewPath temp directory will be move to oldDirectory after patch!\n");
597
+ result=hpatch_dir(oldPath,diffFileName,newTempDir,isLoadOldAll,patchCacheSize,
598
+ kMaxOpenFileNumber,&checksumSet,&tempDirPatchListener,diffDataOffert,diffDataSize);
599
+ if (result==HPATCH_SUCCESS){
600
+ printf("all in outNewPath temp directory moved to oldDirectory!\n");
601
+ }else if(!hpatch_isPathNotExist(newTempDir)){
602
+ printf("WARNING: not remove temp directory \"");
603
+ hpatch_printPath_utf8(newTempDir); printf("\"\n");
604
+ }
605
+ return result;
606
+ }
607
+ #endif
608
+ }
609
+ }
610
+
611
+
612
+ #define check_on_error(errorType) { \
613
+ if (result==HPATCH_SUCCESS) result=errorType; if (!_isInClear){ goto clear; } }
614
+ #define check(value,errorType,errorInfo) { \
615
+ if (!(value)){ fprintf(stderr,errorInfo " ERROR!\n"); check_on_error(errorType); } }
616
+
617
+
618
+ static hpatch_BOOL getDecompressPlugin(const hpatch_compressedDiffInfo* diffInfo,
619
+ hpatch_TDecompress** out_decompressPlugin){
620
+ hpatch_TDecompress* decompressPlugin=0;
621
+ assert(0==*out_decompressPlugin);
622
+ if (strlen(diffInfo->compressType)>0){
623
+ #ifdef _CompressPlugin_zlib
624
+ if ((!decompressPlugin)&&zlibDecompressPlugin.is_can_open(diffInfo->compressType))
625
+ decompressPlugin=&zlibDecompressPlugin;
626
+ #endif
627
+ #ifdef _CompressPlugin_bz2
628
+ if ((!decompressPlugin)&&bz2DecompressPlugin.is_can_open(diffInfo->compressType))
629
+ decompressPlugin=&bz2DecompressPlugin;
630
+ #endif
631
+ #ifdef _CompressPlugin_lzma
632
+ if ((!decompressPlugin)&&lzmaDecompressPlugin.is_can_open(diffInfo->compressType))
633
+ decompressPlugin=&lzmaDecompressPlugin;
634
+ #endif
635
+ #ifdef _CompressPlugin_lzma2
636
+ if ((!decompressPlugin)&&lzma2DecompressPlugin.is_can_open(diffInfo->compressType))
637
+ decompressPlugin=&lzma2DecompressPlugin;
638
+ #endif
639
+ #if (defined(_CompressPlugin_lz4) || (defined(_CompressPlugin_lz4hc)))
640
+ if ((!decompressPlugin)&&lz4DecompressPlugin.is_can_open(diffInfo->compressType))
641
+ decompressPlugin=&lz4DecompressPlugin;
642
+ #endif
643
+ #ifdef _CompressPlugin_zstd
644
+ if ((!decompressPlugin)&&zstdDecompressPlugin.is_can_open(diffInfo->compressType))
645
+ decompressPlugin=&zstdDecompressPlugin;
646
+ #endif
647
+ #ifdef _CompressPlugin_brotli
648
+ if ((!decompressPlugin)&&brotliDecompressPlugin.is_can_open(diffInfo->compressType))
649
+ decompressPlugin=&brotliDecompressPlugin;
650
+ #endif
651
+ #ifdef _CompressPlugin_lzham
652
+ if ((!decompressPlugin)&&lzhamDecompressPlugin.is_can_open(diffInfo->compressType))
653
+ decompressPlugin=&lzhamDecompressPlugin;
654
+ #endif
655
+ }
656
+ if (!decompressPlugin){
657
+ if (diffInfo->compressedCount>0){
658
+ return hpatch_FALSE; //error
659
+ }else{
660
+ if (strlen(diffInfo->compressType)>0)
661
+ printf(" diffFile added useless compress tag \"%s\"\n",diffInfo->compressType);
662
+ decompressPlugin=0;
663
+ }
664
+ }else{
665
+ printf("hpatchz run with decompress plugin: \"%s\" (need decompress %d)\n",
666
+ diffInfo->compressType,diffInfo->compressedCount);
667
+ }
668
+ *out_decompressPlugin=decompressPlugin;
669
+ return hpatch_TRUE;
670
+ }
671
+
672
+ #if (_IS_NEED_DIR_DIFF_PATCH)
673
+ static void _trySetChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType,
674
+ hpatch_TChecksum* testChecksumPlugin){
675
+ if ((*out_checksumPlugin)!=0) return;
676
+ if (0==strcmp(checksumType,testChecksumPlugin->checksumType()))
677
+ *out_checksumPlugin=testChecksumPlugin;
678
+ }
679
+ static hpatch_BOOL findChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType){
680
+ *out_checksumPlugin=0;
681
+ if (strlen(checksumType)==0) return hpatch_TRUE;
682
+ #ifdef _ChecksumPlugin_crc32
683
+ _trySetChecksum(out_checksumPlugin,checksumType,&crc32ChecksumPlugin);
684
+ #endif
685
+ #ifdef _ChecksumPlugin_adler32
686
+ _trySetChecksum(out_checksumPlugin,checksumType,&adler32ChecksumPlugin);
687
+ #endif
688
+ #ifdef _ChecksumPlugin_adler64
689
+ _trySetChecksum(out_checksumPlugin,checksumType,&adler64ChecksumPlugin);
690
+ #endif
691
+ #ifdef _ChecksumPlugin_fadler32
692
+ _trySetChecksum(out_checksumPlugin,checksumType,&fadler32ChecksumPlugin);
693
+ #endif
694
+ #ifdef _ChecksumPlugin_fadler64
695
+ _trySetChecksum(out_checksumPlugin,checksumType,&fadler64ChecksumPlugin);
696
+ #endif
697
+ #ifdef _ChecksumPlugin_fadler128
698
+ _trySetChecksum(out_checksumPlugin,checksumType,&fadler128ChecksumPlugin);
699
+ #endif
700
+ #ifdef _ChecksumPlugin_md5
701
+ _trySetChecksum(out_checksumPlugin,checksumType,&md5ChecksumPlugin);
702
+ #endif
703
+ return (0!=*out_checksumPlugin);
704
+ }
705
+ #endif
706
+
707
+ #define _free_mem(p) { if (p) { free(p); p=0; } }
708
+
709
+ static TByte* getPatchMemCache(hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
710
+ hpatch_StreamPos_t oldDataSize,size_t* out_memCacheSize){
711
+ TByte* temp_cache=0;
712
+ size_t temp_cache_size;
713
+ if (isLoadOldAll){
714
+ size_t addSize=kPatchCacheSize_bestmin;
715
+ if (addSize>oldDataSize+kPatchCacheSize_min)
716
+ addSize=(size_t)(oldDataSize+kPatchCacheSize_min);
717
+ assert(patchCacheSize==0);
718
+ temp_cache_size=(size_t)(oldDataSize+addSize);
719
+ if (temp_cache_size!=oldDataSize+addSize)
720
+ temp_cache_size=kPatchCacheSize_bestmax;//can not load all,load part
721
+ }else{
722
+ if (patchCacheSize<kPatchCacheSize_min)
723
+ patchCacheSize=kPatchCacheSize_min;
724
+ temp_cache_size=patchCacheSize;
725
+ if (temp_cache_size>oldDataSize+kPatchCacheSize_bestmin)
726
+ temp_cache_size=(size_t)(oldDataSize+kPatchCacheSize_bestmin);
727
+ }
728
+ while (!temp_cache) {
729
+ temp_cache=(TByte*)malloc(temp_cache_size);
730
+ if ((!temp_cache)&&(temp_cache_size>=kPatchCacheSize_min*2))
731
+ temp_cache_size>>=1;
732
+ }
733
+ *out_memCacheSize=(temp_cache)?temp_cache_size:0;
734
+ return temp_cache;
735
+ }
736
+
737
+
738
+ int hpatch(const char* oldFileName,const char* diffFileName,
739
+ const char* outNewFileName,hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
740
+ hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize){
741
+ int result=HPATCH_SUCCESS;
742
+ int _isInClear=hpatch_FALSE;
743
+ double time0=clock_s();
744
+ #if (_IS_NEED_SINGLE_STREAM_DIFF)
745
+ hpatch_BOOL isSingleStreamDiff=hpatch_FALSE;
746
+ hpatch_singleCompressedDiffInfo sdiffInfo;
747
+ #endif
748
+ hpatch_TDecompress* decompressPlugin=0;
749
+ hpatch_TFileStreamOutput newData;
750
+ hpatch_TFileStreamInput diffData;
751
+ hpatch_TFileStreamInput oldData;
752
+ hpatch_TStreamInput* poldData=&oldData.base;
753
+ TByte* temp_cache=0;
754
+ size_t temp_cache_size;
755
+ hpatch_StreamPos_t savedNewSize=0;
756
+ hpatch_BOOL patch_result;
757
+ hpatch_TFileStreamInput_init(&oldData);
758
+ hpatch_TFileStreamInput_init(&diffData);
759
+ hpatch_TFileStreamOutput_init(&newData);
760
+ {//open
761
+ printf( "old : \""); hpatch_printPath_utf8(oldFileName);
762
+ printf("\"\ndiff: \""); hpatch_printPath_utf8(diffFileName);
763
+ printf("\"\nout : \""); hpatch_printPath_utf8(outNewFileName);
764
+ printf("\"\n");
765
+ if (0==strcmp(oldFileName,"")){ // isOldPathInputEmpty
766
+ mem_as_hStreamInput(&oldData.base,0,0);
767
+ }else{
768
+ check(hpatch_TFileStreamInput_open(&oldData,oldFileName),
769
+ HPATCH_OPENREAD_ERROR,"open oldFile for read");
770
+ }
771
+ check(hpatch_TFileStreamInput_open(&diffData,diffFileName),
772
+ HPATCH_OPENREAD_ERROR,"open diffFile for read");
773
+ #if (_IS_NEED_SFX)
774
+ if (diffDataOffert>0){ //run sfx
775
+ check(hpatch_TFileStreamInput_setOffset(&diffData,diffDataOffert),
776
+ HPATCH_RUN_SFX_DIFFOFFSERT_ERROR,"readed sfx diffFile offset");
777
+ check(diffData.base.streamSize>=diffDataSize,
778
+ HPATCH_RUN_SFX_DIFFOFFSERT_ERROR,"readed sfx diffFile size");
779
+ diffData.base.streamSize=diffDataSize;
780
+ }
781
+ #endif
782
+ }
783
+
784
+ {
785
+ hpatch_compressedDiffInfo diffInfo;
786
+ if (!getCompressedDiffInfo(&diffInfo,&diffData.base)){
787
+ check(!diffData.fileError,HPATCH_FILEREAD_ERROR,"read diffFile");
788
+ #if (_IS_NEED_SINGLE_STREAM_DIFF)
789
+ if (getSingleCompressedDiffInfo(&sdiffInfo,&diffData.base,0)){
790
+ memcpy(diffInfo.compressType,sdiffInfo.compressType,strlen(sdiffInfo.compressType)+1);
791
+ diffInfo.compressedCount=(sdiffInfo.compressType[0]!='\0')?1:0;
792
+ diffInfo.newDataSize=sdiffInfo.newDataSize;
793
+ diffInfo.oldDataSize=sdiffInfo.oldDataSize;
794
+ patchCacheSize+=(size_t)sdiffInfo.stepMemSize;
795
+ if (patchCacheSize<sdiffInfo.stepMemSize+hpatch_kStreamCacheSize*3)
796
+ patchCacheSize=sdiffInfo.stepMemSize+hpatch_kStreamCacheSize*3;
797
+ isSingleStreamDiff=hpatch_TRUE;
798
+ printf("patch single compressed stream diffData!\n");
799
+ }else
800
+ #endif
801
+ check(hpatch_FALSE,HPATCH_HDIFFINFO_ERROR,"is hdiff file? getCompressedDiffInfo()");
802
+ }
803
+ if (poldData->streamSize!=diffInfo.oldDataSize){
804
+ fprintf(stderr,"oldFile dataSize %" PRIu64 " != diffFile saved oldDataSize %" PRIu64 " ERROR!\n",
805
+ poldData->streamSize,diffInfo.oldDataSize);
806
+ check_on_error(HPATCH_FILEDATA_ERROR);
807
+ }
808
+ if(!getDecompressPlugin(&diffInfo,&decompressPlugin)){
809
+ fprintf(stderr,"can not decompress \"%s\" data ERROR!\n",diffInfo.compressType);
810
+ check_on_error(HPATCH_COMPRESSTYPE_ERROR);
811
+ }
812
+ savedNewSize=diffInfo.newDataSize;
813
+ }
814
+ check(hpatch_TFileStreamOutput_open(&newData, outNewFileName,savedNewSize),
815
+ HPATCH_OPENWRITE_ERROR,"open out newFile for write");
816
+ printf("oldDataSize : %" PRIu64 "\ndiffDataSize: %" PRIu64 "\nnewDataSize : %" PRIu64 "\n",
817
+ poldData->streamSize,diffData.base.streamSize,newData.base.streamSize);
818
+
819
+ temp_cache=getPatchMemCache(isLoadOldAll,patchCacheSize,poldData->streamSize, &temp_cache_size);
820
+ check(temp_cache,HPATCH_MEM_ERROR,"alloc cache memory");
821
+ #if (_IS_NEED_SINGLE_STREAM_DIFF)
822
+ if (isSingleStreamDiff){
823
+ check(temp_cache_size>=sdiffInfo.stepMemSize+hpatch_kStreamCacheSize*3,HPATCH_MEM_ERROR,"alloc cache memory");
824
+ patch_result=patch_single_compressed_diff(&newData.base,poldData,&diffData.base,sdiffInfo.diffDataPos,
825
+ sdiffInfo.uncompressedSize,decompressPlugin,sdiffInfo.coverCount,
826
+ sdiffInfo.stepMemSize,temp_cache,temp_cache+temp_cache_size);
827
+ }else
828
+ #endif
829
+ patch_result=patch_decompress_with_cache(&newData.base,poldData,&diffData.base,decompressPlugin,
830
+ temp_cache,temp_cache+temp_cache_size);
831
+ if (!patch_result){
832
+ check(!oldData.fileError,HPATCH_FILEREAD_ERROR,"oldFile read");
833
+ check(!diffData.fileError,HPATCH_FILEREAD_ERROR,"diffFile read");
834
+ check(!newData.fileError,HPATCH_FILEWRITE_ERROR,"out newFile write");
835
+ check(hpatch_FALSE,HPATCH_PATCH_ERROR,"patch run");
836
+ }
837
+ if (newData.out_length!=newData.base.streamSize){
838
+ fprintf(stderr,"out newFile dataSize %" PRIu64 " != diffFile saved newDataSize %" PRIu64 " ERROR!\n",
839
+ newData.out_length,newData.base.streamSize);
840
+ check_on_error(HPATCH_FILEDATA_ERROR);
841
+ }
842
+ printf(" patch ok!\n");
843
+
844
+ clear:
845
+ _isInClear=hpatch_TRUE;
846
+ check(hpatch_TFileStreamOutput_close(&newData),HPATCH_FILECLOSE_ERROR,"out newFile close");
847
+ check(hpatch_TFileStreamInput_close(&diffData),HPATCH_FILECLOSE_ERROR,"diffFile close");
848
+ check(hpatch_TFileStreamInput_close(&oldData),HPATCH_FILECLOSE_ERROR,"oldFile close");
849
+ _free_mem(temp_cache);
850
+ printf("\nhpatchz time: %.3f s\n",(clock_s()-time0));
851
+ return result;
852
+ }
853
+
854
+ #if (_IS_NEED_DIR_DIFF_PATCH)
855
+ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPath,
856
+ hpatch_BOOL isLoadOldAll,size_t patchCacheSize,size_t kMaxOpenFileNumber,
857
+ TDirPatchChecksumSet* checksumSet,IHPatchDirListener* hlistener,
858
+ hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize){
859
+ int result=HPATCH_SUCCESS;
860
+ int _isInClear=hpatch_FALSE;
861
+ double time0=clock_s();
862
+ hpatch_TFileStreamInput diffData;
863
+ TDirPatcher dirPatcher;
864
+ const TDirDiffInfo* dirDiffInfo=0;
865
+ TByte* p_temp_mem=0;
866
+ TByte* temp_cache=0;
867
+ size_t temp_cache_size;
868
+ const hpatch_TStreamInput* oldStream=0;
869
+ const hpatch_TStreamOutput* newStream=0;
870
+ hpatch_TFileStreamInput_init(&diffData);
871
+ TDirPatcher_init(&dirPatcher);
872
+ assert(0!=strcmp(oldPath,outNewPath));
873
+ {//dir diff info
874
+ hpatch_BOOL rt;
875
+ hpatch_TPathType oldType;
876
+ if (0==strcmp(oldPath,"")){ // isOldPathInputEmpty
877
+ oldType=kPathType_file; //as empty file
878
+ }else{
879
+ check(hpatch_getPathStat(oldPath,&oldType,0),HPATCH_PATHTYPE_ERROR,"get oldPath type");
880
+ check((oldType!=kPathType_notExist),HPATCH_PATHTYPE_ERROR,"oldPath not exist");
881
+ }
882
+ check(hpatch_TFileStreamInput_open(&diffData,diffFileName),HPATCH_OPENREAD_ERROR,"open diffFile for read");
883
+ #if (_IS_NEED_SFX)
884
+ if (diffDataOffert>0){ //run sfx
885
+ check(hpatch_TFileStreamInput_setOffset(&diffData,diffDataOffert),
886
+ HPATCH_RUN_SFX_DIFFOFFSERT_ERROR,"readed sfx diffFile offset");
887
+ check(diffData.base.streamSize>=diffDataSize,
888
+ HPATCH_RUN_SFX_DIFFOFFSERT_ERROR,"readed sfx diffFile size");
889
+ diffData.base.streamSize=diffDataSize;
890
+ }
891
+ #endif
892
+ rt=TDirPatcher_open(&dirPatcher,&diffData.base,&dirDiffInfo);
893
+ if((!rt)||(!dirDiffInfo->isDirDiff)){
894
+ check(!diffData.fileError,HPATCH_FILEREAD_ERROR,"read diffFile");
895
+ check(hpatch_FALSE,DIRPATCH_DIRDIFFINFO_ERROR,"is hdiff file? get dir diff info");
896
+ }
897
+ if (dirDiffInfo->oldPathIsDir){
898
+ check(kPathType_dir==oldType,HPATCH_PATHTYPE_ERROR,"input old path need dir");
899
+ }else{
900
+ check(kPathType_file==oldType,HPATCH_PATHTYPE_ERROR,"input old path need file");
901
+ }
902
+ printf( dirDiffInfo->oldPathIsDir?"old dir: \"":"old file: \"");
903
+ hpatch_printPath_utf8(oldPath);
904
+ if (dirDiffInfo->oldPathIsDir&&(!hpatch_getIsDirName(oldPath))) printf("%c",kPatch_dirSeparator);
905
+ printf( "\"\ndiffFile: \"");
906
+ hpatch_printPath_utf8(diffFileName);
907
+ printf(dirDiffInfo->newPathIsDir?"\"\nout dir: \"":"\"\nout file: \"");
908
+ hpatch_printPath_utf8(outNewPath);
909
+ if (dirDiffInfo->newPathIsDir&&(!hpatch_getIsDirName(outNewPath))) printf("%c",kPatch_dirSeparator);
910
+ printf("\"\n");
911
+ }
912
+ {//decompressPlugin
913
+ hpatch_TDecompress* decompressPlugin=0;
914
+ hpatch_compressedDiffInfo hdiffInfo;
915
+ hdiffInfo=dirDiffInfo->hdiffInfo;
916
+ hdiffInfo.compressedCount+=(dirDiffInfo->dirDataIsCompressed)?1:0;
917
+ if(!getDecompressPlugin(&hdiffInfo,&decompressPlugin)){
918
+ fprintf(stderr,"can not decompress \"%s\" data ERROR!\n",hdiffInfo.compressType);
919
+ check_on_error(HPATCH_COMPRESSTYPE_ERROR);
920
+ }
921
+ //load dir data
922
+ check(TDirPatcher_loadDirData(&dirPatcher,decompressPlugin,oldPath,outNewPath),
923
+ DIRPATCH_LAOD_DIRDIFFDATA_ERROR,"load dir data in diffFile");
924
+ }
925
+ check(hlistener->patchBegin(hlistener,&dirPatcher),
926
+ DIRPATCH_PATCHBEGIN_ERROR,"dir patch begin");
927
+ {// checksumPlugin
928
+ int wantChecksumCount = checksumSet->isCheck_dirDiffData+checksumSet->isCheck_oldRefData+
929
+ checksumSet->isCheck_newRefData+checksumSet->isCheck_copyFileData;
930
+ assert(checksumSet->checksumPlugin==0);
931
+ if (wantChecksumCount>0){
932
+ if (strlen(dirDiffInfo->checksumType)==0){
933
+ memset(checksumSet,0,sizeof(*checksumSet));
934
+ printf(" NOTE: no checksum saved in diffFile,can not do checksum\n");
935
+ }else{
936
+ if (!findChecksum(&checksumSet->checksumPlugin,dirDiffInfo->checksumType)){
937
+ fprintf(stderr,"not found checksumType \"%s\" ERROR!\n",dirDiffInfo->checksumType);
938
+ check_on_error(DIRPATCH_CHECKSUMTYPE_ERROR);
939
+ }
940
+ printf("hpatchz run with checksum plugin: \"%s\" (need checksum %d)\n",
941
+ dirDiffInfo->checksumType,wantChecksumCount);
942
+ if (!TDirPatcher_checksum(&dirPatcher,checksumSet)){
943
+ check(!TDirPatcher_isDiffDataChecksumError(&dirPatcher),
944
+ DIRPATCH_CHECKSUM_DIFFDATA_ERROR,"diffFile checksum");
945
+ check(hpatch_FALSE,DIRPATCH_CHECKSUMSET_ERROR,"diffFile set checksum");
946
+ }
947
+ }
948
+ }
949
+ }
950
+ {//info
951
+ const _TDirDiffHead* head=&dirPatcher.dirDiffHead;
952
+ printf("DirPatch new path count: %" PRIu64 " (fileCount:%" PRIu64 ")\n",(hpatch_StreamPos_t)head->newPathCount,
953
+ (hpatch_StreamPos_t)(head->sameFilePairCount+head->newRefFileCount));
954
+ printf(" copy from old count: %" PRIu64 " (dataSize: %" PRIu64 ")\n",
955
+ (hpatch_StreamPos_t)head->sameFilePairCount,head->sameFileSize);
956
+ printf(" ref old file count: %" PRIu64 "\n",(hpatch_StreamPos_t)head->oldRefFileCount);
957
+ printf(" ref new file count: %" PRIu64 "\n",(hpatch_StreamPos_t)head->newRefFileCount);
958
+ printf("oldRefSize : %" PRIu64 "\ndiffDataSize: %" PRIu64 "\nnewRefSize : %" PRIu64 " (all newSize: %" PRIu64 ")\n",
959
+ dirDiffInfo->hdiffInfo.oldDataSize,diffData.base.streamSize,dirDiffInfo->hdiffInfo.newDataSize,
960
+ dirDiffInfo->hdiffInfo.newDataSize+head->sameFileSize);
961
+ }
962
+ {//mem cache
963
+ p_temp_mem=getPatchMemCache(isLoadOldAll,patchCacheSize,dirDiffInfo->hdiffInfo.oldDataSize, &temp_cache_size);
964
+ check(p_temp_mem,HPATCH_MEM_ERROR,"alloc cache memory");
965
+ temp_cache=p_temp_mem;
966
+ }
967
+ {//old data
968
+ if (temp_cache_size>=dirDiffInfo->hdiffInfo.oldDataSize+kPatchCacheSize_min){
969
+ // all old while auto cache by patch; not need open old files at same time
970
+ kMaxOpenFileNumber=kMaxOpenFileNumber_limit_min;
971
+ }
972
+ check(TDirPatcher_openOldRefAsStream(&dirPatcher,kMaxOpenFileNumber,&oldStream),
973
+ DIRPATCH_OPEN_OLDPATH_ERROR,"open oldFile");
974
+ }
975
+ {//new data
976
+ check(TDirPatcher_openNewDirAsStream(&dirPatcher,&hlistener->base,&newStream),
977
+ DIRPATCH_OPEN_NEWPATH_ERROR,"open newFile");
978
+ }
979
+ //patch
980
+ if(!TDirPatcher_patch(&dirPatcher,newStream,oldStream,temp_cache,temp_cache+temp_cache_size)){
981
+ check(!TDirPatcher_isOldRefDataChecksumError(&dirPatcher),
982
+ DIRPATCH_CHECKSUM_OLDDATA_ERROR,"oldFile checksum");
983
+ check(!TDirPatcher_isCopyDataChecksumError(&dirPatcher),
984
+ DIRPATCH_CHECKSUM_COPYDATA_ERROR,"copyOldFile checksum");
985
+ check(!TDirPatcher_isNewRefDataChecksumError(&dirPatcher),
986
+ DIRPATCH_CHECKSUM_NEWDATA_ERROR,"newFile checksum");
987
+ check(hpatch_FALSE,DIRPATCH_PATCH_ERROR,"dir patch run");
988
+ }
989
+ clear:
990
+ _isInClear=hpatch_TRUE;
991
+ check(hlistener->patchFinish(hlistener,result==HPATCH_SUCCESS),
992
+ DIRPATCH_PATCHFINISH_ERROR,"dir patch finish");
993
+ check(TDirPatcher_closeNewDirStream(&dirPatcher),DIRPATCH_CLOSE_NEWPATH_ERROR,"newPath close");
994
+ check(TDirPatcher_closeOldRefStream(&dirPatcher),DIRPATCH_CLOSE_OLDPATH_ERROR,"oldPath close");
995
+ TDirPatcher_close(&dirPatcher);
996
+ check(hpatch_TFileStreamInput_close(&diffData),HPATCH_FILECLOSE_ERROR,"diffFile close");
997
+ _free_mem(p_temp_mem);
998
+ printf("\nhpatchz dir patch time: %.3f s\n",(clock_s()-time0));
999
+ return result;
1000
+ }
1001
+ #endif
1002
+
1003
+ #if (_IS_NEED_SFX)
1004
+ #define _sfx_guid_size 16
1005
+ #define _sfx_guid_node_size (_sfx_guid_size+sizeof(hpatch_uint32_t)+sizeof(hpatch_uint64_t))
1006
+ //_sfx_guid_node:{fd6c3a9d-1498-4a5d-a9d5-7303a82fd08e-ffffffff-ffffffffffffffff}
1007
+ TByte _sfx_guid_node[_sfx_guid_node_size]={
1008
+ 0xfd,0x6c,0x3a,0x9d,
1009
+ 0x14,0x98,
1010
+ 0x4a,0x5d,
1011
+ 0xa9,0xd5,
1012
+ 0x73,0x03,0xa8,0x2f,0xd0,0x8e,
1013
+ 0xff,0xff,0xff,0xff, // saved diffDataOffert , selfExecute fileSize < 4GB
1014
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; // diffDataSize
1015
+
1016
+ static TByte* _search(TByte* src,TByte* src_end,const TByte* sub,const TByte* sub_end){
1017
+ size_t sub_len=(size_t)(sub_end-sub);
1018
+ TByte* search_last=src_end-sub_len;
1019
+ TByte c0;
1020
+ if (sub_len==0) return src;
1021
+ if ((size_t)(src_end-src)<sub_len) return src_end;
1022
+ c0=*sub;
1023
+ for (;src<=search_last;++src) {
1024
+ if (c0!=*src){
1025
+ continue;
1026
+ }else{
1027
+ hpatch_BOOL is_eq=hpatch_TRUE;
1028
+ size_t i;
1029
+ for (i=1; i<sub_len;++i) {
1030
+ if (sub[i]!=src[i]){
1031
+ is_eq=hpatch_FALSE;
1032
+ break;
1033
+ }
1034
+ }
1035
+ if (!is_eq)
1036
+ continue;
1037
+ else
1038
+ return src;
1039
+ }
1040
+ }
1041
+ return src_end;
1042
+ }
1043
+
1044
+ static int createSfx_notCheckDiffFile_byStream(const hpatch_TStreamInput* selfExecute,
1045
+ const hpatch_TStreamInput* diffData,
1046
+ const hpatch_TStreamOutput* out_sfxData){
1047
+ int result=HPATCH_SUCCESS;
1048
+ int _isInClear=hpatch_FALSE;
1049
+ TByte* buf=0;
1050
+ TByte* pmem=0;
1051
+ hpatch_StreamPos_t writePos=0;
1052
+ hpatch_BOOL isFoundGuid=hpatch_FALSE;
1053
+ const hpatch_StreamPos_t diffDataOffert=selfExecute->streamSize;
1054
+ const hpatch_StreamPos_t diffDataSize=diffData->streamSize;
1055
+ {//mem
1056
+ pmem=(TByte*)malloc(_sfx_guid_node_size+hpatch_kFileIOBufBetterSize);
1057
+ check(pmem!=0,HPATCH_MEM_ERROR,"createSfx() malloc");
1058
+ memset(pmem,0,_sfx_guid_node_size);
1059
+ buf=pmem+_sfx_guid_node_size; // [ _sfx_guid_node_size | hpatch_kFileIOBufBetterSize ]
1060
+ }
1061
+ {//copy exe ,find guid pos and write diffDataOffset
1062
+ const hpatch_uint32_t dataSize=(hpatch_uint32_t)(selfExecute->streamSize);
1063
+ hpatch_StreamPos_t readPos=0;
1064
+ check(dataSize==selfExecute->streamSize,
1065
+ HPATCH_CREATE_SFX_SFXTYPE_ERROR,"createSfx() selfExecute fileSize");
1066
+ while (readPos < dataSize) {
1067
+ TByte* wbuf=0;
1068
+ const TByte* wbuf_end=0;
1069
+ TByte* rbuf_end=0;
1070
+ size_t readLen=hpatch_kFileIOBufBetterSize;
1071
+ if (readLen+readPos > dataSize)
1072
+ readLen=(size_t)(dataSize - readPos);
1073
+ rbuf_end=buf+readLen;
1074
+ check(selfExecute->read(selfExecute,readPos,buf,rbuf_end),
1075
+ HPATCH_FILEREAD_ERROR,"createSfx() read selfExecute");
1076
+ wbuf=(readPos!=0)?pmem:buf;
1077
+ if (!isFoundGuid){ //find in [wbuf..rbuf_end)
1078
+ TByte* pos=_search(wbuf,rbuf_end,_sfx_guid_node,_sfx_guid_node+_sfx_guid_node_size);
1079
+ if (pos!=rbuf_end){
1080
+ size_t i;
1081
+ isFoundGuid=hpatch_TRUE;
1082
+ for (i=0; i<sizeof(hpatch_uint32_t); ++i){
1083
+ size_t di=_sfx_guid_size+i;
1084
+ assert(pos[di]==0xff);
1085
+ pos[di]=(TByte)(diffDataOffert>>(8*i));
1086
+ }
1087
+ for (i=0; i<sizeof(hpatch_uint64_t); ++i){
1088
+ size_t di=_sfx_guid_size+sizeof(hpatch_uint32_t)+i;
1089
+ assert(pos[di]==0xff);
1090
+ pos[di]=(TByte)(diffDataSize>>(8*i));
1091
+ }
1092
+ }
1093
+ }
1094
+ wbuf_end=(readPos+readLen<dataSize)?(rbuf_end-_sfx_guid_node_size):rbuf_end;
1095
+ check(out_sfxData->write(out_sfxData,writePos,wbuf,wbuf_end),
1096
+ HPATCH_FILEWRITE_ERROR,"createSfx() write sfxData");
1097
+ memcpy(pmem,rbuf_end-_sfx_guid_node_size,_sfx_guid_node_size);
1098
+ readPos+=readLen;
1099
+ writePos+=(size_t)(wbuf_end-wbuf);
1100
+ }
1101
+ }
1102
+ assert(writePos==diffDataOffert);
1103
+ check(isFoundGuid,HPATCH_CREATE_SFX_SFXTYPE_ERROR,"createSfx() selfExecute type");
1104
+ {//copy diffData
1105
+ const hpatch_StreamPos_t dataSize=diffData->streamSize;
1106
+ hpatch_StreamPos_t readPos=0;
1107
+ while (readPos < dataSize) {
1108
+ size_t readLen=hpatch_kFileIOBufBetterSize;
1109
+ if (readLen+readPos > dataSize)
1110
+ readLen=(size_t)(dataSize - readPos);
1111
+ check(diffData->read(diffData,readPos,buf,buf+readLen),
1112
+ HPATCH_FILEREAD_ERROR,"createSfx() read diffData");
1113
+ check(out_sfxData->write(out_sfxData,writePos,buf,buf+readLen),
1114
+ HPATCH_FILEWRITE_ERROR,"createSfx() write sfxData");
1115
+ readPos+=readLen;
1116
+ writePos+=readLen;
1117
+ }
1118
+ }
1119
+ clear:
1120
+ _isInClear=hpatch_TRUE;
1121
+ _free_mem(pmem);
1122
+ return result;
1123
+ }
1124
+
1125
+ int createSfx_notCheckDiffFile(const char* selfExecuteFileName,const char* diffFileName,
1126
+ const char* out_sfxFileName){
1127
+ int result=HPATCH_SUCCESS;
1128
+ int _isInClear=hpatch_FALSE;
1129
+ hpatch_TFileStreamInput exeData;
1130
+ hpatch_TFileStreamInput diffData;
1131
+ hpatch_TFileStreamOutput out_sfxData;
1132
+ hpatch_TFileStreamInput_init(&exeData);
1133
+ hpatch_TFileStreamInput_init(&diffData);
1134
+ hpatch_TFileStreamOutput_init(&out_sfxData);
1135
+ printf( "selfExecute: \""); hpatch_printPath_utf8(selfExecuteFileName);
1136
+ printf("\"\ndiffFile : \""); hpatch_printPath_utf8(diffFileName);
1137
+ printf("\"\nout sfxFile: \""); hpatch_printPath_utf8(out_sfxFileName);
1138
+ printf("\"\n\n");
1139
+ {//open
1140
+ hpatch_StreamPos_t sfxFileLength=0;
1141
+ check(hpatch_TFileStreamInput_open(&exeData,selfExecuteFileName),
1142
+ HPATCH_OPENREAD_ERROR,"createSfx() open selfExecuteFile read");
1143
+ sfxFileLength+=exeData.base.streamSize;
1144
+ check(hpatch_TFileStreamInput_open(&diffData,diffFileName),
1145
+ HPATCH_OPENREAD_ERROR,"createSfx() open diffFileName read");
1146
+ sfxFileLength+=diffData.base.streamSize;
1147
+ check(hpatch_TFileStreamOutput_open(&out_sfxData,out_sfxFileName,sfxFileLength),
1148
+ HPATCH_OPENWRITE_ERROR,"createSfx() open sfxFile write");
1149
+ }
1150
+ result=createSfx_notCheckDiffFile_byStream(&exeData.base,&diffData.base,&out_sfxData.base);
1151
+ if (result!=HPATCH_SUCCESS) check_on_error(result);
1152
+ assert(out_sfxData.base.streamSize==out_sfxData.out_length);
1153
+ check(hpatch_TFileStreamOutput_close(&out_sfxData),HPATCH_FILECLOSE_ERROR,"createSfx() out sfxFile close");
1154
+ printf("sfxFileSize: %" PRIu64 "\n",out_sfxData.base.streamSize);
1155
+ if (hpatch_getIsExecuteFile(selfExecuteFileName)){
1156
+ check(hpatch_setIsExecuteFile(out_sfxFileName),
1157
+ HPATCH_CREATE_SFX_EXECUTETAG_ERROR,"createSfx() set sfxFile Execute tag");
1158
+ }
1159
+ printf("out sfxFile ok!\n");
1160
+ clear:
1161
+ _isInClear=hpatch_TRUE;
1162
+ check(hpatch_TFileStreamOutput_close(&out_sfxData),HPATCH_FILECLOSE_ERROR,"createSfx() out sfxFile close");
1163
+ check(hpatch_TFileStreamInput_close(&diffData),HPATCH_FILECLOSE_ERROR,"createSfx() diffFile close");
1164
+ check(hpatch_TFileStreamInput_close(&exeData),HPATCH_FILECLOSE_ERROR,"createSfx() selfExecuteFile close");
1165
+ return result;
1166
+ }
1167
+
1168
+ static hpatch_BOOL _getIsCompressedDiffFile(const char* diffFileName){
1169
+ hpatch_TFileStreamInput diffData;
1170
+ hpatch_compressedDiffInfo diffInfo;
1171
+ hpatch_BOOL result=hpatch_TRUE;
1172
+ hpatch_TFileStreamInput_init(&diffData);
1173
+ if (!hpatch_TFileStreamInput_open(&diffData,diffFileName)) return hpatch_FALSE;
1174
+ result=getCompressedDiffInfo(&diffInfo,&diffData.base);
1175
+ if (!hpatch_TFileStreamInput_close(&diffData)) return hpatch_FALSE;
1176
+ return result;
1177
+ }
1178
+
1179
+ int createSfx(const char* selfExecuteFileName,const char* diffFileName,const char* out_sfxFileName){
1180
+ int result=HPATCH_SUCCESS;
1181
+ int _isInClear=hpatch_FALSE;
1182
+ {//check diffFile type
1183
+ hpatch_BOOL isDiffFile=hpatch_FALSE;
1184
+ #if (_IS_NEED_DIR_DIFF_PATCH)
1185
+ if (!isDiffFile)
1186
+ isDiffFile=getIsDirDiffFile(diffFileName);
1187
+ #endif
1188
+ if (!isDiffFile)
1189
+ isDiffFile=_getIsCompressedDiffFile(diffFileName);
1190
+ check(isDiffFile,HPATCH_CREATE_SFX_DIFFFILETYPE_ERROR,
1191
+ "createSfx() input diffFile is unsupported type");
1192
+ }
1193
+ result=createSfx_notCheckDiffFile(selfExecuteFileName,diffFileName,out_sfxFileName);
1194
+ clear:
1195
+ _isInClear=hpatch_TRUE;
1196
+ return result;
1197
+ }
1198
+
1199
+ hpatch_BOOL getDiffDataOffertInSfx(hpatch_StreamPos_t* out_diffDataOffert,hpatch_StreamPos_t* out_diffDataSize){
1200
+ hpatch_uint32_t diffOff=0;
1201
+ hpatch_uint64_t diffSize=0;
1202
+ size_t i;
1203
+ for (i=0; i<sizeof(hpatch_uint32_t); ++i){
1204
+ size_t si=_sfx_guid_size+i;
1205
+ diffOff|=((hpatch_uint32_t)_sfx_guid_node[si])<<(8*i);
1206
+ }
1207
+ if (diffOff==(~(hpatch_uint32_t)0)) return hpatch_FALSE;
1208
+ assert(diffOff>_sfx_guid_node_size);
1209
+
1210
+ for (i=0; i<sizeof(hpatch_uint64_t); ++i){
1211
+ size_t si=_sfx_guid_size+sizeof(hpatch_uint32_t)+i;
1212
+ diffSize|=((hpatch_uint64_t)_sfx_guid_node[si])<<(8*i);
1213
+ }
1214
+ if (diffSize==(~(hpatch_uint64_t)0)) return hpatch_FALSE;
1215
+
1216
+ *out_diffDataOffert=diffOff;
1217
+ *out_diffDataSize=diffSize;
1218
+ return hpatch_TRUE;
1219
+ }
1220
+
1221
+ #endif // _IS_NEED_SFX