react-native-update 10.60.0 → 10.61.0

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 (820) hide show
  1. package/README-CN.md +6 -0
  2. package/README.md +8 -0
  3. package/android/jni/Android.mk +2 -0
  4. package/android/jni/Application.mk +3 -1
  5. package/android/lib/arm64-v8a/librnpushy.so +0 -0
  6. package/android/lib/armeabi-v7a/librnpushy.so +0 -0
  7. package/android/lib/x86/librnpushy.so +0 -0
  8. package/android/lib/x86_64/librnpushy.so +0 -0
  9. package/android/src/main/java/cn/reactnative/modules/update/ApkInstaller.java +1 -1
  10. package/android/src/main/java/cn/reactnative/modules/update/ArchiveLimits.java +3 -2
  11. package/android/src/main/java/cn/reactnative/modules/update/BundlePreparationResult.java +2 -0
  12. package/android/src/main/java/cn/reactnative/modules/update/DownloadTask.java +102 -119
  13. package/android/src/main/java/cn/reactnative/modules/update/DownloadTaskParams.java +5 -3
  14. package/android/src/main/java/cn/reactnative/modules/update/ErrorCodes.java +5 -3
  15. package/android/src/main/java/cn/reactnative/modules/update/FlowBridge.java +7 -0
  16. package/android/src/main/java/cn/reactnative/modules/update/HttpUtils.java +0 -34
  17. package/android/src/main/java/cn/reactnative/modules/update/InstallRecord.java +3 -1
  18. package/android/src/main/java/cn/reactnative/modules/update/NativeCore.java +1 -1
  19. package/android/src/main/java/cn/reactnative/modules/update/PushyRuntime.java +23 -4
  20. package/android/src/main/java/cn/reactnative/modules/update/ReactReloadManager.java +1 -1
  21. package/android/src/main/java/cn/reactnative/modules/update/ResumePlan.java +31 -0
  22. package/android/src/main/java/cn/reactnative/modules/update/SyncCoordinator.java +397 -300
  23. package/android/src/main/java/cn/reactnative/modules/update/Texts.java +15 -1
  24. package/android/src/main/java/cn/reactnative/modules/update/Threads.java +9 -0
  25. package/android/src/main/java/cn/reactnative/modules/update/UpdateContext.java +24 -15
  26. package/android/src/main/java/cn/reactnative/modules/update/UpdateModule.java +1 -1
  27. package/android/src/main/java/cn/reactnative/modules/update/VersionScopedKeys.java +64 -0
  28. package/android/src/oldarch/cn/reactnative/modules/update/NativePushySpec.java +2 -0
  29. package/cpp/android_jni/jni_log.h +2 -3
  30. package/cpp/android_jni/jni_natives.h +14 -8
  31. package/cpp/android_jni/jni_registration.cpp +13 -0
  32. package/cpp/android_jni/resume_plan_jni.cpp +58 -0
  33. package/cpp/android_jni/update_core_android.cpp +3 -5
  34. package/cpp/android_jni/update_flow_jni.cpp +17 -0
  35. package/cpp/patch_core/archive_limits.h +5 -3
  36. package/cpp/patch_core/archive_patch_core.cpp +2 -3
  37. package/cpp/patch_core/archive_patch_core.h +2 -0
  38. package/cpp/patch_core/error_codes.h +15 -13
  39. package/cpp/patch_core/install_record.h +5 -3
  40. package/cpp/patch_core/native_texts.h +102 -0
  41. package/cpp/patch_core/resume_plan.cpp +226 -0
  42. package/cpp/patch_core/resume_plan.h +88 -0
  43. package/cpp/patch_core/state_ops.h +2 -0
  44. package/cpp/update_flow_core/native_config.cpp +5 -25
  45. package/cpp/update_flow_core/native_round.cpp +9 -14
  46. package/cpp/update_flow_core/native_round.h +7 -3
  47. package/cpp/update_flow_core/round_engine.cpp +456 -0
  48. package/cpp/update_flow_core/round_engine.h +106 -0
  49. package/cpp/update_flow_core/update_flow_core.cpp +5 -14
  50. package/harmony/pushy/src/main/cpp/CMakeLists.txt +2 -0
  51. package/harmony/pushy/src/main/cpp/PushyTurboModule.cpp +22 -20
  52. package/harmony/pushy/src/main/cpp/pushy.cpp +146 -24
  53. package/harmony/pushy/src/main/ets/ArchiveLimits.ts +9 -5
  54. package/harmony/pushy/src/main/ets/DownloadTask.ts +138 -158
  55. package/harmony/pushy/src/main/ets/DownloadTaskParams.ts +5 -3
  56. package/harmony/pushy/src/main/ets/ErrorCodes.ts +3 -2
  57. package/harmony/pushy/src/main/ets/InstallRecord.ts +3 -1
  58. package/harmony/pushy/src/main/ets/NativePatchCore.ts +35 -0
  59. package/harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets +8 -3
  60. package/harmony/pushy/src/main/ets/SyncCoordinator.ts +256 -309
  61. package/harmony/pushy/src/main/ets/Texts.ts +8 -3
  62. package/harmony/pushy/src/main/ets/UpdateContext.ts +152 -46
  63. package/harmony/pushy.har +0 -0
  64. package/ios/RCTPushy/RCTPushy+Launch.mm +5 -0
  65. package/ios/RCTPushy/RCTPushy.mm +60 -44
  66. package/ios/RCTPushy/RCTPushyCommon.h +0 -6
  67. package/ios/RCTPushy/RCTPushyConfiguration.mm +8 -10
  68. package/ios/RCTPushy/RCTPushyDownloader.mm +112 -161
  69. package/ios/RCTPushy/RCTPushyInstallRecord.mm +42 -2
  70. package/ios/RCTPushy/RCTPushyInstaller.mm +195 -152
  71. package/ios/RCTPushy/RCTPushyInternal.h +41 -0
  72. package/ios/RCTPushy/RCTPushyOrchestrator.mm +233 -265
  73. package/ios/RCTPushy/RCTPushyState.mm +70 -2
  74. package/package.json +23 -4
  75. package/src/client.ts +126 -1543
  76. package/src/clientActivation.ts +324 -0
  77. package/src/clientCheck.ts +405 -0
  78. package/src/clientDownload.ts +448 -0
  79. package/src/clientNativeConfig.ts +171 -0
  80. package/src/clientReporter.ts +398 -0
  81. package/src/clientState.ts +51 -0
  82. package/src/core.ts +4 -2
  83. package/src/endpoint.ts +22 -6
  84. package/src/error.ts +6 -4
  85. package/src/locales/en.ts +1 -1
  86. package/src/locales/zh.ts +1 -1
  87. package/src/provider.tsx +32 -20
  88. package/android/jni/HDiffPatch/.travis.yml +0 -33
  89. package/android/jni/HDiffPatch/CHANGELOG.md +0 -153
  90. package/android/jni/HDiffPatch/Makefile +0 -157
  91. package/android/jni/HDiffPatch/_atosize.h +0 -83
  92. package/android/jni/HDiffPatch/_clock_for_demo.h +0 -47
  93. package/android/jni/HDiffPatch/_dir_ignore.h +0 -191
  94. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +0 -37
  95. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +0 -7
  96. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +0 -1
  97. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +0 -1
  98. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +0 -18
  99. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +0 -20
  100. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +0 -28
  101. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +0 -8
  102. package/android/jni/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +0 -8
  103. package/android/jni/HDiffPatch/builds/codeblocks/HDiffZ.cbp +0 -219
  104. package/android/jni/HDiffPatch/builds/codeblocks/HPatchZ.cbp +0 -156
  105. package/android/jni/HDiffPatch/builds/codeblocks/unitTest.cbp +0 -65
  106. package/android/jni/HDiffPatch/builds/vc/HDiffPatch.sln +0 -105
  107. package/android/jni/HDiffPatch/builds/vc/HDiffZ.vcxproj +0 -237
  108. package/android/jni/HDiffPatch/builds/vc/HDiffZ.vcxproj.user +0 -3
  109. package/android/jni/HDiffPatch/builds/vc/HPatchZ.vcxproj +0 -318
  110. package/android/jni/HDiffPatch/builds/vc/HPatchZ.vcxproj.user +0 -3
  111. package/android/jni/HDiffPatch/builds/vc/unitTest.vcxproj +0 -182
  112. package/android/jni/HDiffPatch/builds/vc/unitTest.vcxproj.user +0 -3
  113. package/android/jni/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +0 -30
  114. package/android/jni/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  115. package/android/jni/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +0 -408
  116. package/android/jni/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  117. package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +0 -573
  118. package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  119. package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  120. package/android/jni/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +0 -396
  121. package/android/jni/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  122. package/android/jni/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +0 -268
  123. package/android/jni/HDiffPatch/builds/xcode/lz4.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  124. package/android/jni/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +0 -361
  125. package/android/jni/HDiffPatch/builds/xcode/lzma.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  126. package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +0 -301
  127. package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  128. package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  129. package/android/jni/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +0 -411
  130. package/android/jni/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  131. package/android/jni/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +0 -504
  132. package/android/jni/HDiffPatch/builds/xcode/zstd.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  133. package/android/jni/HDiffPatch/checksum_plugin_demo.h +0 -344
  134. package/android/jni/HDiffPatch/compress_parallel.cpp +0 -166
  135. package/android/jni/HDiffPatch/compress_parallel.h +0 -59
  136. package/android/jni/HDiffPatch/compress_plugin_demo.h +0 -1152
  137. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +0 -797
  138. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +0 -65
  139. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +0 -200
  140. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +0 -178
  141. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +0 -357
  142. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +0 -87
  143. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +0 -151
  144. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +0 -770
  145. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +0 -236
  146. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +0 -47
  147. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +0 -112
  148. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +0 -53
  149. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +0 -331
  150. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +0 -144
  151. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +0 -176
  152. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +0 -84
  153. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +0 -146
  154. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +0 -61
  155. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +0 -152
  156. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +0 -76
  157. package/android/jni/HDiffPatch/hdiffz.cpp +0 -1570
  158. package/android/jni/HDiffPatch/hpatch_dir_listener.h +0 -290
  159. package/android/jni/HDiffPatch/hpatchz.c +0 -1221
  160. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +0 -1025
  161. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/diff.h +0 -116
  162. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +0 -72
  163. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +0 -213
  164. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +0 -63
  165. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +0 -170
  166. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +0 -86
  167. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +0 -89
  168. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c +0 -13
  169. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +0 -398
  170. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +0 -194
  171. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.c +0 -13
  172. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +0 -204
  173. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +0 -207
  174. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +0 -815
  175. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +0 -586
  176. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/utils.c.inc.h +0 -381
  177. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +0 -352
  178. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +0 -137
  179. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +0 -137
  180. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +0 -70
  181. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +0 -628
  182. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +0 -87
  183. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +0 -363
  184. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +0 -139
  185. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +0 -68
  186. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +0 -115
  187. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +0 -342
  188. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +0 -94
  189. package/android/jni/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +0 -52
  190. package/android/jni/HDiffPatch/libParallel/parallel_channel.cpp +0 -174
  191. package/android/jni/HDiffPatch/libParallel/parallel_channel.h +0 -73
  192. package/android/jni/HDiffPatch/libParallel/parallel_import.cpp +0 -367
  193. package/android/jni/HDiffPatch/libParallel/parallel_import.h +0 -92
  194. package/android/jni/lzma/Asm/arm/7zCrcOpt.asm +0 -100
  195. package/android/jni/lzma/Asm/x86/7zAsm.asm +0 -147
  196. package/android/jni/lzma/Asm/x86/7zCrcOpt.asm +0 -147
  197. package/android/jni/lzma/Asm/x86/AesOpt.asm +0 -237
  198. package/android/jni/lzma/Asm/x86/LzmaDecOpt.asm +0 -1258
  199. package/android/jni/lzma/Asm/x86/XzCrc64Opt.asm +0 -205
  200. package/android/jni/lzma/C/7z.h +0 -202
  201. package/android/jni/lzma/C/7zAlloc.c +0 -80
  202. package/android/jni/lzma/C/7zAlloc.h +0 -19
  203. package/android/jni/lzma/C/7zArcIn.c +0 -1771
  204. package/android/jni/lzma/C/7zBuf.c +0 -36
  205. package/android/jni/lzma/C/7zBuf.h +0 -35
  206. package/android/jni/lzma/C/7zBuf2.c +0 -52
  207. package/android/jni/lzma/C/7zCrc.c +0 -128
  208. package/android/jni/lzma/C/7zCrc.h +0 -25
  209. package/android/jni/lzma/C/7zCrcOpt.c +0 -115
  210. package/android/jni/lzma/C/7zDec.c +0 -591
  211. package/android/jni/lzma/C/7zFile.c +0 -286
  212. package/android/jni/lzma/C/7zFile.h +0 -83
  213. package/android/jni/lzma/C/7zStream.c +0 -176
  214. package/android/jni/lzma/C/7zVersion.h +0 -27
  215. package/android/jni/lzma/C/7zVersion.rc +0 -55
  216. package/android/jni/lzma/C/Aes.c +0 -306
  217. package/android/jni/lzma/C/Aes.h +0 -38
  218. package/android/jni/lzma/C/AesOpt.c +0 -184
  219. package/android/jni/lzma/C/Alloc.c +0 -455
  220. package/android/jni/lzma/C/Alloc.h +0 -51
  221. package/android/jni/lzma/C/Bcj2.c +0 -257
  222. package/android/jni/lzma/C/Bcj2.h +0 -146
  223. package/android/jni/lzma/C/Bcj2Enc.c +0 -311
  224. package/android/jni/lzma/C/Bra.c +0 -230
  225. package/android/jni/lzma/C/Bra.h +0 -64
  226. package/android/jni/lzma/C/Bra86.c +0 -82
  227. package/android/jni/lzma/C/BraIA64.c +0 -53
  228. package/android/jni/lzma/C/CpuArch.c +0 -218
  229. package/android/jni/lzma/C/CpuArch.h +0 -336
  230. package/android/jni/lzma/C/Delta.c +0 -64
  231. package/android/jni/lzma/C/Delta.h +0 -19
  232. package/android/jni/lzma/C/DllSecur.c +0 -108
  233. package/android/jni/lzma/C/DllSecur.h +0 -20
  234. package/android/jni/lzma/C/LzFind.c +0 -1127
  235. package/android/jni/lzma/C/LzFind.h +0 -121
  236. package/android/jni/lzma/C/LzFindMt.c +0 -853
  237. package/android/jni/lzma/C/LzFindMt.h +0 -101
  238. package/android/jni/lzma/C/LzHash.h +0 -57
  239. package/android/jni/lzma/C/Lzma2DecMt.c +0 -1082
  240. package/android/jni/lzma/C/Lzma2DecMt.h +0 -79
  241. package/android/jni/lzma/C/Lzma2Enc.c +0 -803
  242. package/android/jni/lzma/C/Lzma2Enc.h +0 -55
  243. package/android/jni/lzma/C/Lzma86.h +0 -111
  244. package/android/jni/lzma/C/Lzma86Dec.c +0 -54
  245. package/android/jni/lzma/C/Lzma86Enc.c +0 -106
  246. package/android/jni/lzma/C/LzmaEnc.c +0 -2976
  247. package/android/jni/lzma/C/LzmaEnc.h +0 -76
  248. package/android/jni/lzma/C/LzmaLib.c +0 -40
  249. package/android/jni/lzma/C/LzmaLib.h +0 -131
  250. package/android/jni/lzma/C/MtCoder.c +0 -601
  251. package/android/jni/lzma/C/MtCoder.h +0 -141
  252. package/android/jni/lzma/C/MtDec.c +0 -1138
  253. package/android/jni/lzma/C/MtDec.h +0 -201
  254. package/android/jni/lzma/C/Ppmd.h +0 -85
  255. package/android/jni/lzma/C/Ppmd7.c +0 -712
  256. package/android/jni/lzma/C/Ppmd7.h +0 -142
  257. package/android/jni/lzma/C/Ppmd7Dec.c +0 -191
  258. package/android/jni/lzma/C/Ppmd7Enc.c +0 -187
  259. package/android/jni/lzma/C/RotateDefs.h +0 -30
  260. package/android/jni/lzma/C/Sha256.c +0 -248
  261. package/android/jni/lzma/C/Sha256.h +0 -26
  262. package/android/jni/lzma/C/Sort.c +0 -141
  263. package/android/jni/lzma/C/Sort.h +0 -18
  264. package/android/jni/lzma/C/Threads.c +0 -95
  265. package/android/jni/lzma/C/Threads.h +0 -70
  266. package/android/jni/lzma/C/ThreadsP.c +0 -396
  267. package/android/jni/lzma/C/ThreadsP.h +0 -31
  268. package/android/jni/lzma/C/Util/7z/7z.dsp +0 -241
  269. package/android/jni/lzma/C/Util/7z/7z.dsw +0 -29
  270. package/android/jni/lzma/C/Util/7z/7zMain.c +0 -686
  271. package/android/jni/lzma/C/Util/7z/Precomp.c +0 -4
  272. package/android/jni/lzma/C/Util/7z/Precomp.h +0 -10
  273. package/android/jni/lzma/C/Util/7z/makefile +0 -40
  274. package/android/jni/lzma/C/Util/7z/makefile.gcc +0 -75
  275. package/android/jni/lzma/C/Util/Lzma/LzmaUtil.c +0 -258
  276. package/android/jni/lzma/C/Util/Lzma/LzmaUtil.dsp +0 -168
  277. package/android/jni/lzma/C/Util/Lzma/LzmaUtil.dsw +0 -29
  278. package/android/jni/lzma/C/Util/Lzma/makefile +0 -28
  279. package/android/jni/lzma/C/Util/Lzma/makefile.gcc +0 -44
  280. package/android/jni/lzma/C/Util/LzmaLib/LzmaLib.def +0 -4
  281. package/android/jni/lzma/C/Util/LzmaLib/LzmaLib.dsp +0 -178
  282. package/android/jni/lzma/C/Util/LzmaLib/LzmaLib.dsw +0 -29
  283. package/android/jni/lzma/C/Util/LzmaLib/LzmaLibExports.c +0 -14
  284. package/android/jni/lzma/C/Util/LzmaLib/makefile +0 -34
  285. package/android/jni/lzma/C/Util/LzmaLib/resource.rc +0 -3
  286. package/android/jni/lzma/C/Util/SfxSetup/Precomp.c +0 -4
  287. package/android/jni/lzma/C/Util/SfxSetup/Precomp.h +0 -10
  288. package/android/jni/lzma/C/Util/SfxSetup/SfxSetup.c +0 -640
  289. package/android/jni/lzma/C/Util/SfxSetup/SfxSetup.dsp +0 -231
  290. package/android/jni/lzma/C/Util/SfxSetup/SfxSetup.dsw +0 -29
  291. package/android/jni/lzma/C/Util/SfxSetup/makefile +0 -37
  292. package/android/jni/lzma/C/Util/SfxSetup/makefile_con +0 -38
  293. package/android/jni/lzma/C/Util/SfxSetup/resource.rc +0 -5
  294. package/android/jni/lzma/C/Util/SfxSetup/setup.ico +0 -0
  295. package/android/jni/lzma/C/Xz.c +0 -90
  296. package/android/jni/lzma/C/Xz.h +0 -460
  297. package/android/jni/lzma/C/XzCrc64.c +0 -86
  298. package/android/jni/lzma/C/XzCrc64.h +0 -26
  299. package/android/jni/lzma/C/XzCrc64Opt.c +0 -69
  300. package/android/jni/lzma/C/XzDec.c +0 -2766
  301. package/android/jni/lzma/C/XzEnc.c +0 -1329
  302. package/android/jni/lzma/C/XzEnc.h +0 -60
  303. package/android/jni/lzma/C/XzIn.c +0 -319
  304. package/android/jni/lzma/CPP/7zip/7zip.mak +0 -240
  305. package/android/jni/lzma/CPP/7zip/Aes.mak +0 -7
  306. package/android/jni/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +0 -3
  307. package/android/jni/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +0 -76
  308. package/android/jni/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +0 -569
  309. package/android/jni/lzma/CPP/7zip/Archive/7z/7zDecode.h +0 -70
  310. package/android/jni/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +0 -678
  311. package/android/jni/lzma/CPP/7zip/Archive/7z/7zEncode.h +0 -92
  312. package/android/jni/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +0 -423
  313. package/android/jni/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +0 -139
  314. package/android/jni/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +0 -61
  315. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +0 -763
  316. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHandler.h +0 -181
  317. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +0 -942
  318. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +0 -19
  319. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHeader.h +0 -148
  320. package/android/jni/lzma/CPP/7zip/Archive/7z/7zIn.cpp +0 -1666
  321. package/android/jni/lzma/CPP/7zip/Archive/7z/7zIn.h +0 -445
  322. package/android/jni/lzma/CPP/7zip/Archive/7z/7zItem.h +0 -202
  323. package/android/jni/lzma/CPP/7zip/Archive/7z/7zOut.cpp +0 -901
  324. package/android/jni/lzma/CPP/7zip/Archive/7z/7zOut.h +0 -335
  325. package/android/jni/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +0 -174
  326. package/android/jni/lzma/CPP/7zip/Archive/7z/7zProperties.h +0 -22
  327. package/android/jni/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +0 -21
  328. package/android/jni/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +0 -22
  329. package/android/jni/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +0 -35
  330. package/android/jni/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +0 -2500
  331. package/android/jni/lzma/CPP/7zip/Archive/7z/7zUpdate.h +0 -139
  332. package/android/jni/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +0 -3
  333. package/android/jni/lzma/CPP/7zip/Archive/7z/StdAfx.h +0 -8
  334. package/android/jni/lzma/CPP/7zip/Archive/Archive.def +0 -12
  335. package/android/jni/lzma/CPP/7zip/Archive/Archive2.def +0 -19
  336. package/android/jni/lzma/CPP/7zip/Archive/ArchiveExports.cpp +0 -151
  337. package/android/jni/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +0 -1125
  338. package/android/jni/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +0 -447
  339. package/android/jni/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +0 -17
  340. package/android/jni/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +0 -25
  341. package/android/jni/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +0 -232
  342. package/android/jni/lzma/CPP/7zip/Archive/Common/HandlerOut.h +0 -110
  343. package/android/jni/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +0 -46
  344. package/android/jni/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +0 -67
  345. package/android/jni/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +0 -88
  346. package/android/jni/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +0 -28
  347. package/android/jni/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +0 -191
  348. package/android/jni/lzma/CPP/7zip/Archive/Common/MultiStream.h +0 -89
  349. package/android/jni/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +0 -18
  350. package/android/jni/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +0 -37
  351. package/android/jni/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +0 -3
  352. package/android/jni/lzma/CPP/7zip/Archive/Common/ParseProperties.h +0 -6
  353. package/android/jni/lzma/CPP/7zip/Archive/Common/StdAfx.h +0 -8
  354. package/android/jni/lzma/CPP/7zip/Archive/DllExports2.cpp +0 -122
  355. package/android/jni/lzma/CPP/7zip/Archive/IArchive.h +0 -608
  356. package/android/jni/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
  357. package/android/jni/lzma/CPP/7zip/Archive/LzmaHandler.cpp +0 -629
  358. package/android/jni/lzma/CPP/7zip/Archive/SplitHandler.cpp +0 -359
  359. package/android/jni/lzma/CPP/7zip/Archive/StdAfx.h +0 -8
  360. package/android/jni/lzma/CPP/7zip/Archive/XzHandler.cpp +0 -1308
  361. package/android/jni/lzma/CPP/7zip/Archive/XzHandler.h +0 -11
  362. package/android/jni/lzma/CPP/7zip/Asm.mak +0 -9
  363. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +0 -1910
  364. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +0 -29
  365. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +0 -3
  366. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +0 -8
  367. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/makefile +0 -154
  368. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +0 -7
  369. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +0 -3
  370. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +0 -8
  371. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +0 -96
  372. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +0 -5
  373. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +0 -3
  374. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +0 -8
  375. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/makefile +0 -116
  376. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +0 -5
  377. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +0 -799
  378. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +0 -477
  379. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +0 -29
  380. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +0 -3
  381. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +0 -8
  382. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/makefile +0 -59
  383. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +0 -195
  384. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +0 -3
  385. package/android/jni/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +0 -715
  386. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  387. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +0 -912
  388. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +0 -29
  389. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +0 -482
  390. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +0 -3
  391. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +0 -8
  392. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/makefile +0 -134
  393. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +0 -5
  394. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +0 -246
  395. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +0 -86
  396. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +0 -137
  397. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +0 -11
  398. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +0 -803
  399. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +0 -29
  400. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +0 -364
  401. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +0 -3
  402. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +0 -13
  403. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/makefile +0 -117
  404. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +0 -6
  405. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +0 -16
  406. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  407. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  408. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +0 -988
  409. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +0 -29
  410. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +0 -241
  411. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +0 -3
  412. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +0 -14
  413. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/makefile +0 -153
  414. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/resource.h +0 -1
  415. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +0 -50
  416. package/android/jni/lzma/CPP/7zip/Common/CWrappers.cpp +0 -250
  417. package/android/jni/lzma/CPP/7zip/Common/CWrappers.h +0 -120
  418. package/android/jni/lzma/CPP/7zip/Common/CreateCoder.cpp +0 -536
  419. package/android/jni/lzma/CPP/7zip/Common/CreateCoder.h +0 -192
  420. package/android/jni/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +0 -46
  421. package/android/jni/lzma/CPP/7zip/Common/FilePathAutoRename.h +0 -10
  422. package/android/jni/lzma/CPP/7zip/Common/FileStreams.cpp +0 -475
  423. package/android/jni/lzma/CPP/7zip/Common/FileStreams.h +0 -166
  424. package/android/jni/lzma/CPP/7zip/Common/FilterCoder.cpp +0 -435
  425. package/android/jni/lzma/CPP/7zip/Common/FilterCoder.h +0 -205
  426. package/android/jni/lzma/CPP/7zip/Common/InBuffer.cpp +0 -163
  427. package/android/jni/lzma/CPP/7zip/Common/InBuffer.h +0 -92
  428. package/android/jni/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +0 -127
  429. package/android/jni/lzma/CPP/7zip/Common/InOutTempBuffer.h +0 -48
  430. package/android/jni/lzma/CPP/7zip/Common/LimitedStreams.cpp +0 -367
  431. package/android/jni/lzma/CPP/7zip/Common/LimitedStreams.h +0 -252
  432. package/android/jni/lzma/CPP/7zip/Common/LockedStream.cpp +0 -3
  433. package/android/jni/lzma/CPP/7zip/Common/LockedStream.h +0 -6
  434. package/android/jni/lzma/CPP/7zip/Common/MethodId.cpp +0 -3
  435. package/android/jni/lzma/CPP/7zip/Common/MethodId.h +0 -10
  436. package/android/jni/lzma/CPP/7zip/Common/MethodProps.cpp +0 -509
  437. package/android/jni/lzma/CPP/7zip/Common/MethodProps.h +0 -264
  438. package/android/jni/lzma/CPP/7zip/Common/OffsetStream.cpp +0 -39
  439. package/android/jni/lzma/CPP/7zip/Common/OffsetStream.h +0 -26
  440. package/android/jni/lzma/CPP/7zip/Common/OutBuffer.cpp +0 -111
  441. package/android/jni/lzma/CPP/7zip/Common/OutBuffer.h +0 -66
  442. package/android/jni/lzma/CPP/7zip/Common/ProgressUtils.cpp +0 -51
  443. package/android/jni/lzma/CPP/7zip/Common/ProgressUtils.h +0 -35
  444. package/android/jni/lzma/CPP/7zip/Common/PropId.cpp +0 -108
  445. package/android/jni/lzma/CPP/7zip/Common/RegisterArc.h +0 -78
  446. package/android/jni/lzma/CPP/7zip/Common/RegisterCodec.h +0 -106
  447. package/android/jni/lzma/CPP/7zip/Common/StdAfx.h +0 -8
  448. package/android/jni/lzma/CPP/7zip/Common/StreamBinder.cpp +0 -156
  449. package/android/jni/lzma/CPP/7zip/Common/StreamBinder.h +0 -60
  450. package/android/jni/lzma/CPP/7zip/Common/StreamObjects.cpp +0 -285
  451. package/android/jni/lzma/CPP/7zip/Common/StreamObjects.h +0 -157
  452. package/android/jni/lzma/CPP/7zip/Common/StreamUtils.cpp +0 -56
  453. package/android/jni/lzma/CPP/7zip/Common/StreamUtils.h +0 -13
  454. package/android/jni/lzma/CPP/7zip/Common/UniqBlocks.cpp +0 -57
  455. package/android/jni/lzma/CPP/7zip/Common/UniqBlocks.h +0 -26
  456. package/android/jni/lzma/CPP/7zip/Common/VirtThread.cpp +0 -48
  457. package/android/jni/lzma/CPP/7zip/Common/VirtThread.h +0 -24
  458. package/android/jni/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +0 -666
  459. package/android/jni/lzma/CPP/7zip/Compress/Bcj2Coder.h +0 -120
  460. package/android/jni/lzma/CPP/7zip/Compress/Bcj2Register.cpp +0 -24
  461. package/android/jni/lzma/CPP/7zip/Compress/BcjCoder.cpp +0 -24
  462. package/android/jni/lzma/CPP/7zip/Compress/BcjCoder.h +0 -31
  463. package/android/jni/lzma/CPP/7zip/Compress/BcjRegister.cpp +0 -17
  464. package/android/jni/lzma/CPP/7zip/Compress/BranchMisc.cpp +0 -23
  465. package/android/jni/lzma/CPP/7zip/Compress/BranchMisc.h +0 -35
  466. package/android/jni/lzma/CPP/7zip/Compress/BranchRegister.cpp +0 -41
  467. package/android/jni/lzma/CPP/7zip/Compress/ByteSwap.cpp +0 -92
  468. package/android/jni/lzma/CPP/7zip/Compress/CodecExports.cpp +0 -344
  469. package/android/jni/lzma/CPP/7zip/Compress/CopyCoder.cpp +0 -120
  470. package/android/jni/lzma/CPP/7zip/Compress/CopyCoder.h +0 -49
  471. package/android/jni/lzma/CPP/7zip/Compress/CopyRegister.cpp +0 -15
  472. package/android/jni/lzma/CPP/7zip/Compress/DeltaFilter.cpp +0 -128
  473. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +0 -265
  474. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Decoder.h +0 -96
  475. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +0 -122
  476. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Encoder.h +0 -42
  477. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Register.cpp +0 -22
  478. package/android/jni/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +0 -343
  479. package/android/jni/lzma/CPP/7zip/Compress/LzmaDecoder.h +0 -113
  480. package/android/jni/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +0 -182
  481. package/android/jni/lzma/CPP/7zip/Compress/LzmaEncoder.h +0 -46
  482. package/android/jni/lzma/CPP/7zip/Compress/LzmaRegister.cpp +0 -22
  483. package/android/jni/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +0 -170
  484. package/android/jni/lzma/CPP/7zip/Compress/PpmdDecoder.h +0 -86
  485. package/android/jni/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +0 -152
  486. package/android/jni/lzma/CPP/7zip/Compress/PpmdEncoder.h +0 -58
  487. package/android/jni/lzma/CPP/7zip/Compress/PpmdRegister.cpp +0 -22
  488. package/android/jni/lzma/CPP/7zip/Compress/StdAfx.h +0 -8
  489. package/android/jni/lzma/CPP/7zip/Compress/XzDecoder.cpp +0 -150
  490. package/android/jni/lzma/CPP/7zip/Compress/XzDecoder.h +0 -92
  491. package/android/jni/lzma/CPP/7zip/Compress/XzEncoder.cpp +0 -245
  492. package/android/jni/lzma/CPP/7zip/Compress/XzEncoder.h +0 -46
  493. package/android/jni/lzma/CPP/7zip/Crc.mak +0 -8
  494. package/android/jni/lzma/CPP/7zip/Crc64.mak +0 -8
  495. package/android/jni/lzma/CPP/7zip/Crypto/7zAes.cpp +0 -280
  496. package/android/jni/lzma/CPP/7zip/Crypto/7zAes.h +0 -118
  497. package/android/jni/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +0 -17
  498. package/android/jni/lzma/CPP/7zip/Crypto/MyAes.cpp +0 -112
  499. package/android/jni/lzma/CPP/7zip/Crypto/MyAes.h +0 -57
  500. package/android/jni/lzma/CPP/7zip/Crypto/MyAesReg.cpp +0 -16
  501. package/android/jni/lzma/CPP/7zip/Crypto/RandGen.cpp +0 -233
  502. package/android/jni/lzma/CPP/7zip/Crypto/RandGen.h +0 -40
  503. package/android/jni/lzma/CPP/7zip/Crypto/StdAfx.h +0 -8
  504. package/android/jni/lzma/CPP/7zip/GuiCommon.rc +0 -84
  505. package/android/jni/lzma/CPP/7zip/Guid.txt +0 -220
  506. package/android/jni/lzma/CPP/7zip/ICoder.h +0 -399
  507. package/android/jni/lzma/CPP/7zip/IDecl.h +0 -28
  508. package/android/jni/lzma/CPP/7zip/IPassword.h +0 -23
  509. package/android/jni/lzma/CPP/7zip/IProgress.h +0 -19
  510. package/android/jni/lzma/CPP/7zip/IStream.h +0 -127
  511. package/android/jni/lzma/CPP/7zip/LzmaDec.mak +0 -5
  512. package/android/jni/lzma/CPP/7zip/MyVersion.h +0 -2
  513. package/android/jni/lzma/CPP/7zip/MyVersionInfo.rc +0 -2
  514. package/android/jni/lzma/CPP/7zip/PropID.h +0 -127
  515. package/android/jni/lzma/CPP/7zip/SubBuild.mak +0 -3
  516. package/android/jni/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +0 -993
  517. package/android/jni/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +0 -235
  518. package/android/jni/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +0 -29
  519. package/android/jni/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +0 -3
  520. package/android/jni/lzma/CPP/7zip/UI/Client7z/StdAfx.h +0 -8
  521. package/android/jni/lzma/CPP/7zip/UI/Client7z/makefile +0 -28
  522. package/android/jni/lzma/CPP/7zip/UI/Client7z/resource.rc +0 -3
  523. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +0 -1295
  524. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +0 -136
  525. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +0 -1715
  526. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +0 -403
  527. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +0 -155
  528. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveName.h +0 -10
  529. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +0 -161
  530. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +0 -112
  531. package/android/jni/lzma/CPP/7zip/UI/Common/Bench.cpp +0 -3618
  532. package/android/jni/lzma/CPP/7zip/UI/Common/Bench.h +0 -77
  533. package/android/jni/lzma/CPP/7zip/UI/Common/DefaultName.cpp +0 -37
  534. package/android/jni/lzma/CPP/7zip/UI/Common/DefaultName.h +0 -11
  535. package/android/jni/lzma/CPP/7zip/UI/Common/DirItem.h +0 -190
  536. package/android/jni/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +0 -1096
  537. package/android/jni/lzma/CPP/7zip/UI/Common/EnumDirItems.h +0 -42
  538. package/android/jni/lzma/CPP/7zip/UI/Common/ExitCode.h +0 -27
  539. package/android/jni/lzma/CPP/7zip/UI/Common/Extract.cpp +0 -482
  540. package/android/jni/lzma/CPP/7zip/UI/Common/Extract.h +0 -94
  541. package/android/jni/lzma/CPP/7zip/UI/Common/ExtractMode.h +0 -34
  542. package/android/jni/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +0 -280
  543. package/android/jni/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +0 -31
  544. package/android/jni/lzma/CPP/7zip/UI/Common/HashCalc.cpp +0 -347
  545. package/android/jni/lzma/CPP/7zip/UI/Common/HashCalc.h +0 -110
  546. package/android/jni/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +0 -114
  547. package/android/jni/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +0 -1074
  548. package/android/jni/lzma/CPP/7zip/UI/Common/LoadCodecs.h +0 -424
  549. package/android/jni/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +0 -3553
  550. package/android/jni/lzma/CPP/7zip/UI/Common/OpenArchive.h +0 -436
  551. package/android/jni/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +0 -668
  552. package/android/jni/lzma/CPP/7zip/UI/Common/PropIDUtils.h +0 -18
  553. package/android/jni/lzma/CPP/7zip/UI/Common/Property.h +0 -14
  554. package/android/jni/lzma/CPP/7zip/UI/Common/SetProperties.cpp +0 -80
  555. package/android/jni/lzma/CPP/7zip/UI/Common/SetProperties.h +0 -10
  556. package/android/jni/lzma/CPP/7zip/UI/Common/SortUtils.cpp +0 -25
  557. package/android/jni/lzma/CPP/7zip/UI/Common/SortUtils.h +0 -10
  558. package/android/jni/lzma/CPP/7zip/UI/Common/StdAfx.h +0 -8
  559. package/android/jni/lzma/CPP/7zip/UI/Common/TempFiles.cpp +0 -19
  560. package/android/jni/lzma/CPP/7zip/UI/Common/TempFiles.h +0 -16
  561. package/android/jni/lzma/CPP/7zip/UI/Common/Update.cpp +0 -1704
  562. package/android/jni/lzma/CPP/7zip/UI/Common/Update.h +0 -200
  563. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +0 -64
  564. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateAction.h +0 -66
  565. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +0 -771
  566. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateCallback.h +0 -162
  567. package/android/jni/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +0 -233
  568. package/android/jni/lzma/CPP/7zip/UI/Common/UpdatePair.h +0 -27
  569. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +0 -70
  570. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateProduce.h +0 -55
  571. package/android/jni/lzma/CPP/7zip/UI/Common/WorkDir.cpp +0 -94
  572. package/android/jni/lzma/CPP/7zip/UI/Common/WorkDir.h +0 -26
  573. package/android/jni/lzma/CPP/7zip/UI/Common/ZipRegistry.h +0 -130
  574. package/android/jni/lzma/CPP/7zip/UI/Console/BenchCon.cpp +0 -41
  575. package/android/jni/lzma/CPP/7zip/UI/Console/BenchCon.h +0 -14
  576. package/android/jni/lzma/CPP/7zip/UI/Console/Console.mak +0 -43
  577. package/android/jni/lzma/CPP/7zip/UI/Console/Console.manifest +0 -13
  578. package/android/jni/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +0 -69
  579. package/android/jni/lzma/CPP/7zip/UI/Console/ConsoleClose.h +0 -33
  580. package/android/jni/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +0 -825
  581. package/android/jni/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +0 -164
  582. package/android/jni/lzma/CPP/7zip/UI/Console/HashCon.cpp +0 -367
  583. package/android/jni/lzma/CPP/7zip/UI/Console/HashCon.h +0 -48
  584. package/android/jni/lzma/CPP/7zip/UI/Console/List.cpp +0 -1359
  585. package/android/jni/lzma/CPP/7zip/UI/Console/List.h +0 -27
  586. package/android/jni/lzma/CPP/7zip/UI/Console/Main.cpp +0 -1154
  587. package/android/jni/lzma/CPP/7zip/UI/Console/MainAr.cpp +0 -175
  588. package/android/jni/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +0 -115
  589. package/android/jni/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +0 -66
  590. package/android/jni/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +0 -183
  591. package/android/jni/lzma/CPP/7zip/UI/Console/PercentPrinter.h +0 -62
  592. package/android/jni/lzma/CPP/7zip/UI/Console/StdAfx.cpp +0 -3
  593. package/android/jni/lzma/CPP/7zip/UI/Console/StdAfx.h +0 -8
  594. package/android/jni/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +0 -702
  595. package/android/jni/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +0 -124
  596. package/android/jni/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +0 -110
  597. package/android/jni/lzma/CPP/7zip/UI/Console/UserInputUtils.h +0 -27
  598. package/android/jni/lzma/CPP/7zip/UI/Console/makefile +0 -64
  599. package/android/jni/lzma/CPP/7zip/UI/Console/resource.rc +0 -7
  600. package/android/jni/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +0 -37
  601. package/android/jni/lzma/CPP/7zip/UI/Explorer/MyMessages.h +0 -16
  602. package/android/jni/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +0 -1025
  603. package/android/jni/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +0 -21
  604. package/android/jni/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +0 -9
  605. package/android/jni/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +0 -64
  606. package/android/jni/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +0 -28
  607. package/android/jni/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +0 -4
  608. package/android/jni/lzma/CPP/7zip/UI/FileManager/DialogSize.h +0 -16
  609. package/android/jni/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +0 -1037
  610. package/android/jni/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +0 -328
  611. package/android/jni/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +0 -28
  612. package/android/jni/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +0 -14
  613. package/android/jni/lzma/CPP/7zip/UI/FileManager/LangUtils.h +0 -40
  614. package/android/jni/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +0 -76
  615. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +0 -122
  616. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +0 -69
  617. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +0 -91
  618. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +0 -17
  619. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +0 -58
  620. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +0 -28
  621. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +0 -14
  622. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +0 -5
  623. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +0 -196
  624. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +0 -170
  625. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +0 -12
  626. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +0 -1337
  627. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +0 -351
  628. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +0 -40
  629. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +0 -48
  630. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +0 -80
  631. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +0 -3
  632. package/android/jni/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +0 -23
  633. package/android/jni/lzma/CPP/7zip/UI/FileManager/PropertyName.h +0 -10
  634. package/android/jni/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +0 -95
  635. package/android/jni/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +0 -255
  636. package/android/jni/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +0 -62
  637. package/android/jni/lzma/CPP/7zip/UI/FileManager/resource.h +0 -177
  638. package/android/jni/lzma/CPP/7zip/UI/FileManager/resourceGui.h +0 -15
  639. package/android/jni/lzma/CPP/7zip/UI/GUI/Extract.rc +0 -59
  640. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +0 -418
  641. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +0 -113
  642. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +0 -98
  643. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +0 -24
  644. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +0 -280
  645. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +0 -38
  646. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractRes.h +0 -51
  647. package/android/jni/lzma/CPP/7zip/UI/GUI/HashGUI.h +0 -27
  648. package/android/jni/lzma/CPP/7zip/UI/GUI/resource2.h +0 -2
  649. package/android/jni/lzma/CPP/Build.mak +0 -156
  650. package/android/jni/lzma/CPP/Common/AutoPtr.h +0 -35
  651. package/android/jni/lzma/CPP/Common/CRC.cpp +0 -7
  652. package/android/jni/lzma/CPP/Common/C_FileIO.cpp +0 -92
  653. package/android/jni/lzma/CPP/Common/C_FileIO.h +0 -53
  654. package/android/jni/lzma/CPP/Common/ComTry.h +0 -21
  655. package/android/jni/lzma/CPP/Common/CommandLineParser.cpp +0 -197
  656. package/android/jni/lzma/CPP/Common/CommandLineParser.h +0 -63
  657. package/android/jni/lzma/CPP/Common/Common.h +0 -43
  658. package/android/jni/lzma/CPP/Common/CrcReg.cpp +0 -98
  659. package/android/jni/lzma/CPP/Common/Defs.h +0 -15
  660. package/android/jni/lzma/CPP/Common/DynamicBuffer.h +0 -64
  661. package/android/jni/lzma/CPP/Common/IntToString.cpp +0 -193
  662. package/android/jni/lzma/CPP/Common/IntToString.h +0 -28
  663. package/android/jni/lzma/CPP/Common/Lang.h +0 -23
  664. package/android/jni/lzma/CPP/Common/ListFileUtils.cpp +0 -132
  665. package/android/jni/lzma/CPP/Common/ListFileUtils.h +0 -18
  666. package/android/jni/lzma/CPP/Common/MyBuffer.h +0 -259
  667. package/android/jni/lzma/CPP/Common/MyBuffer2.h +0 -100
  668. package/android/jni/lzma/CPP/Common/MyCom.h +0 -277
  669. package/android/jni/lzma/CPP/Common/MyException.h +0 -14
  670. package/android/jni/lzma/CPP/Common/MyGuidDef.h +0 -54
  671. package/android/jni/lzma/CPP/Common/MyInitGuid.h +0 -45
  672. package/android/jni/lzma/CPP/Common/MyLinux.h +0 -42
  673. package/android/jni/lzma/CPP/Common/MyString.cpp +0 -1659
  674. package/android/jni/lzma/CPP/Common/MyString.h +0 -868
  675. package/android/jni/lzma/CPP/Common/MyTypes.h +0 -35
  676. package/android/jni/lzma/CPP/Common/MyUnknown.h +0 -17
  677. package/android/jni/lzma/CPP/Common/MyVector.cpp +0 -3
  678. package/android/jni/lzma/CPP/Common/MyVector.h +0 -634
  679. package/android/jni/lzma/CPP/Common/MyWindows.cpp +0 -145
  680. package/android/jni/lzma/CPP/Common/MyWindows.h +0 -231
  681. package/android/jni/lzma/CPP/Common/NewHandler.cpp +0 -163
  682. package/android/jni/lzma/CPP/Common/NewHandler.h +0 -88
  683. package/android/jni/lzma/CPP/Common/Sha256Reg.cpp +0 -40
  684. package/android/jni/lzma/CPP/Common/StdAfx.h +0 -8
  685. package/android/jni/lzma/CPP/Common/StdInStream.cpp +0 -89
  686. package/android/jni/lzma/CPP/Common/StdInStream.h +0 -38
  687. package/android/jni/lzma/CPP/Common/StdOutStream.cpp +0 -163
  688. package/android/jni/lzma/CPP/Common/StdOutStream.h +0 -71
  689. package/android/jni/lzma/CPP/Common/StringConvert.cpp +0 -319
  690. package/android/jni/lzma/CPP/Common/StringConvert.h +0 -88
  691. package/android/jni/lzma/CPP/Common/StringToInt.cpp +0 -144
  692. package/android/jni/lzma/CPP/Common/StringToInt.h +0 -21
  693. package/android/jni/lzma/CPP/Common/TextConfig.cpp +0 -124
  694. package/android/jni/lzma/CPP/Common/TextConfig.h +0 -19
  695. package/android/jni/lzma/CPP/Common/UTFConvert.cpp +0 -288
  696. package/android/jni/lzma/CPP/Common/UTFConvert.h +0 -12
  697. package/android/jni/lzma/CPP/Common/Wildcard.cpp +0 -676
  698. package/android/jni/lzma/CPP/Common/Wildcard.h +0 -149
  699. package/android/jni/lzma/CPP/Common/XzCrc64Init.cpp +0 -7
  700. package/android/jni/lzma/CPP/Common/XzCrc64Reg.cpp +0 -42
  701. package/android/jni/lzma/CPP/Windows/COM.h +0 -70
  702. package/android/jni/lzma/CPP/Windows/CommonDialog.cpp +0 -185
  703. package/android/jni/lzma/CPP/Windows/CommonDialog.h +0 -23
  704. package/android/jni/lzma/CPP/Windows/Control/ComboBox.cpp +0 -66
  705. package/android/jni/lzma/CPP/Windows/Control/ComboBox.h +0 -65
  706. package/android/jni/lzma/CPP/Windows/Control/CommandBar.h +0 -52
  707. package/android/jni/lzma/CPP/Windows/Control/Dialog.cpp +0 -251
  708. package/android/jni/lzma/CPP/Windows/Control/Dialog.h +0 -170
  709. package/android/jni/lzma/CPP/Windows/Control/Edit.h +0 -19
  710. package/android/jni/lzma/CPP/Windows/Control/ImageList.cpp +0 -10
  711. package/android/jni/lzma/CPP/Windows/Control/ImageList.h +0 -87
  712. package/android/jni/lzma/CPP/Windows/Control/ListView.cpp +0 -155
  713. package/android/jni/lzma/CPP/Windows/Control/ListView.h +0 -146
  714. package/android/jni/lzma/CPP/Windows/Control/ProgressBar.h +0 -35
  715. package/android/jni/lzma/CPP/Windows/Control/PropertyPage.cpp +0 -143
  716. package/android/jni/lzma/CPP/Windows/Control/PropertyPage.h +0 -50
  717. package/android/jni/lzma/CPP/Windows/Control/ReBar.h +0 -34
  718. package/android/jni/lzma/CPP/Windows/Control/Static.h +0 -28
  719. package/android/jni/lzma/CPP/Windows/Control/StatusBar.h +0 -42
  720. package/android/jni/lzma/CPP/Windows/Control/StdAfx.h +0 -8
  721. package/android/jni/lzma/CPP/Windows/Control/ToolBar.h +0 -43
  722. package/android/jni/lzma/CPP/Windows/Control/Trackbar.h +0 -27
  723. package/android/jni/lzma/CPP/Windows/Control/Window2.cpp +0 -200
  724. package/android/jni/lzma/CPP/Windows/Control/Window2.h +0 -51
  725. package/android/jni/lzma/CPP/Windows/DLL.cpp +0 -109
  726. package/android/jni/lzma/CPP/Windows/DLL.h +0 -58
  727. package/android/jni/lzma/CPP/Windows/Defs.h +0 -17
  728. package/android/jni/lzma/CPP/Windows/ErrorMsg.cpp +0 -66
  729. package/android/jni/lzma/CPP/Windows/ErrorMsg.h +0 -15
  730. package/android/jni/lzma/CPP/Windows/FileDir.cpp +0 -714
  731. package/android/jni/lzma/CPP/Windows/FileDir.h +0 -117
  732. package/android/jni/lzma/CPP/Windows/FileFind.cpp +0 -749
  733. package/android/jni/lzma/CPP/Windows/FileFind.h +0 -161
  734. package/android/jni/lzma/CPP/Windows/FileIO.cpp +0 -432
  735. package/android/jni/lzma/CPP/Windows/FileIO.h +0 -212
  736. package/android/jni/lzma/CPP/Windows/FileLink.cpp +0 -440
  737. package/android/jni/lzma/CPP/Windows/FileMapping.cpp +0 -12
  738. package/android/jni/lzma/CPP/Windows/FileMapping.h +0 -66
  739. package/android/jni/lzma/CPP/Windows/FileName.cpp +0 -839
  740. package/android/jni/lzma/CPP/Windows/FileName.h +0 -115
  741. package/android/jni/lzma/CPP/Windows/FileSystem.cpp +0 -131
  742. package/android/jni/lzma/CPP/Windows/FileSystem.h +0 -27
  743. package/android/jni/lzma/CPP/Windows/Handle.h +0 -37
  744. package/android/jni/lzma/CPP/Windows/MemoryLock.cpp +0 -112
  745. package/android/jni/lzma/CPP/Windows/MemoryLock.h +0 -40
  746. package/android/jni/lzma/CPP/Windows/NtCheck.h +0 -46
  747. package/android/jni/lzma/CPP/Windows/PropVariant.cpp +0 -347
  748. package/android/jni/lzma/CPP/Windows/PropVariant.h +0 -114
  749. package/android/jni/lzma/CPP/Windows/PropVariantConv.cpp +0 -138
  750. package/android/jni/lzma/CPP/Windows/PropVariantConv.h +0 -37
  751. package/android/jni/lzma/CPP/Windows/Registry.cpp +0 -390
  752. package/android/jni/lzma/CPP/Windows/Registry.h +0 -84
  753. package/android/jni/lzma/CPP/Windows/ResourceString.cpp +0 -103
  754. package/android/jni/lzma/CPP/Windows/ResourceString.h +0 -16
  755. package/android/jni/lzma/CPP/Windows/SecurityUtils.cpp +0 -181
  756. package/android/jni/lzma/CPP/Windows/SecurityUtils.h +0 -167
  757. package/android/jni/lzma/CPP/Windows/Shell.cpp +0 -358
  758. package/android/jni/lzma/CPP/Windows/Shell.h +0 -94
  759. package/android/jni/lzma/CPP/Windows/StdAfx.h +0 -8
  760. package/android/jni/lzma/CPP/Windows/Synchronization.cpp +0 -10
  761. package/android/jni/lzma/CPP/Windows/Synchronization.h +0 -164
  762. package/android/jni/lzma/CPP/Windows/System.cpp +0 -142
  763. package/android/jni/lzma/CPP/Windows/System.h +0 -40
  764. package/android/jni/lzma/CPP/Windows/Thread.h +0 -38
  765. package/android/jni/lzma/CPP/Windows/TimeUtils.cpp +0 -213
  766. package/android/jni/lzma/CPP/Windows/TimeUtils.h +0 -32
  767. package/android/jni/lzma/CPP/Windows/Window.cpp +0 -179
  768. package/android/jni/lzma/CPP/Windows/Window.h +0 -284
  769. package/android/jni/lzma/CS/7zip/Common/CRC.cs +0 -55
  770. package/android/jni/lzma/CS/7zip/Common/CommandLineParser.cs +0 -274
  771. package/android/jni/lzma/CS/7zip/Common/InBuffer.cs +0 -72
  772. package/android/jni/lzma/CS/7zip/Common/OutBuffer.cs +0 -47
  773. package/android/jni/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +0 -24
  774. package/android/jni/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +0 -367
  775. package/android/jni/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +0 -132
  776. package/android/jni/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +0 -110
  777. package/android/jni/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +0 -76
  778. package/android/jni/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +0 -398
  779. package/android/jni/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +0 -1480
  780. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +0 -364
  781. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj +0 -90
  782. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +0 -20
  783. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +0 -340
  784. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +0 -29
  785. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +0 -70
  786. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +0 -42
  787. package/android/jni/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +0 -234
  788. package/android/jni/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +0 -117
  789. package/android/jni/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +0 -157
  790. package/android/jni/lzma/CS/7zip/ICoder.cs +0 -157
  791. package/android/jni/lzma/DOC/7zC.txt +0 -187
  792. package/android/jni/lzma/DOC/7zFormat.txt +0 -469
  793. package/android/jni/lzma/DOC/Methods.txt +0 -173
  794. package/android/jni/lzma/DOC/installer.txt +0 -166
  795. package/android/jni/lzma/DOC/lzma-history.txt +0 -446
  796. package/android/jni/lzma/DOC/lzma-specification.txt +0 -1176
  797. package/android/jni/lzma/DOC/lzma.txt +0 -328
  798. package/android/jni/lzma/Java/SevenZip/CRC.java +0 -52
  799. package/android/jni/lzma/Java/SevenZip/Compression/LZ/BinTree.java +0 -382
  800. package/android/jni/lzma/Java/SevenZip/Compression/LZ/InWindow.java +0 -131
  801. package/android/jni/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +0 -85
  802. package/android/jni/lzma/Java/SevenZip/Compression/LZMA/Base.java +0 -88
  803. package/android/jni/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +0 -329
  804. package/android/jni/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +0 -1416
  805. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +0 -55
  806. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +0 -99
  807. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +0 -88
  808. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +0 -151
  809. package/android/jni/lzma/Java/SevenZip/ICodeProgress.java +0 -6
  810. package/android/jni/lzma/Java/SevenZip/LzmaAlone.java +0 -253
  811. package/android/jni/lzma/Java/SevenZip/LzmaBench.java +0 -392
  812. package/android/jni/lzma/bin/7zS2.sfx +0 -0
  813. package/android/jni/lzma/bin/7zS2con.sfx +0 -0
  814. package/android/jni/lzma/bin/7zSD.sfx +0 -0
  815. package/android/jni/lzma/bin/7zdec.exe +0 -0
  816. package/android/jni/lzma/bin/7zr.exe +0 -0
  817. package/android/jni/lzma/bin/installer/config.txt +0 -5
  818. package/android/jni/lzma/bin/installer/cr.bat +0 -5
  819. package/android/jni/lzma/bin/lzma.exe +0 -0
  820. package/android/jni/lzma/bin/x64/7zr.exe +0 -0
@@ -1,1570 +0,0 @@
1
- //hdiffz.cpp
2
- // diff tool
3
- //
4
- /*
5
- The MIT License (MIT)
6
- Copyright (c) 2012-2019 HouSisong
7
-
8
- Permission is hereby granted, free of charge, to any person
9
- obtaining a copy of this software and associated documentation
10
- files (the "Software"), to deal in the Software without
11
- restriction, including without limitation the rights to use,
12
- copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the
14
- Software is furnished to do so, subject to the following
15
- conditions:
16
-
17
- The above copyright notice and this permission notice shall be
18
- included in all copies of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
- OTHER DEALINGS IN THE SOFTWARE.
28
- */
29
-
30
- #include <iostream>
31
- #include <fstream>
32
- #include <string>
33
- #include <vector>
34
- #include <string.h>
35
- #include <stdlib.h>
36
- #include <stdio.h>
37
- #include <algorithm> //find search
38
- #include "libHDiffPatch/HDiff/diff.h"
39
- #include "libHDiffPatch/HPatch/patch.h"
40
- #include "_clock_for_demo.h"
41
- #include "_atosize.h"
42
- #include "file_for_patch.h"
43
- #include "libHDiffPatch/HDiff/private_diff/mem_buf.h"
44
-
45
- #include "_dir_ignore.h"
46
- #if (_IS_NEED_DIR_DIFF_PATCH)
47
- #include "dirDiffPatch/dir_diff/dir_diff.h"
48
- #endif
49
-
50
- #ifndef _IS_NEED_MAIN
51
- # define _IS_NEED_MAIN 1
52
- #endif
53
-
54
- #ifndef _IS_NEED_DEFAULT_CompressPlugin
55
- # define _IS_NEED_DEFAULT_CompressPlugin 1
56
- #endif
57
- #if (_IS_NEED_ALL_CompressPlugin)
58
- # undef _IS_NEED_DEFAULT_CompressPlugin
59
- # define _IS_NEED_DEFAULT_CompressPlugin 1
60
- #endif
61
- #if (_IS_NEED_DEFAULT_CompressPlugin)
62
- //===== select needs decompress plugins or change to your plugin=====
63
- # define _CompressPlugin_zlib // memroy requires less
64
- # define _CompressPlugin_bz2
65
- # define _CompressPlugin_lzma // better compresser
66
- # define _CompressPlugin_lzma2 // better compresser
67
- #endif
68
- #if (_IS_NEED_ALL_CompressPlugin)
69
- //===== select needs decompress plugins or change to your plugin=====
70
- # define _CompressPlugin_lz4 // faster compresser / faster decompresser
71
- # define _CompressPlugin_lz4hc // faster decompresser
72
- # define _CompressPlugin_zstd // better compresser / faster decompresser
73
- # define _CompressPlugin_brotli// better compresser / faster decompresser
74
- # define _CompressPlugin_lzham // better compresser / decompress faster than lzma2
75
- #endif
76
-
77
- #include "compress_plugin_demo.h"
78
- #include "decompress_plugin_demo.h"
79
-
80
-
81
- #if (_IS_NEED_DIR_DIFF_PATCH)
82
-
83
- #ifndef _IS_NEED_DEFAULT_ChecksumPlugin
84
- # define _IS_NEED_DEFAULT_ChecksumPlugin 1
85
- #endif
86
- #if (_IS_NEED_ALL_ChecksumPlugin)
87
- # undef _IS_NEED_DEFAULT_ChecksumPlugin
88
- # define _IS_NEED_DEFAULT_ChecksumPlugin 1
89
- #endif
90
- #if (_IS_NEED_DEFAULT_ChecksumPlugin)
91
- //===== select needs checksum plugins or change to your plugin=====
92
- # define _ChecksumPlugin_crc32 // = 32 bit effective //need zlib
93
- # define _ChecksumPlugin_fadler64 // ? 63 bit effective
94
- #endif
95
- #if (_IS_NEED_ALL_ChecksumPlugin)
96
- //===== select needs checksum plugins or change to your plugin=====
97
- # define _ChecksumPlugin_adler32 // ? 29 bit effective
98
- # define _ChecksumPlugin_adler64 // ? 30 bit effective
99
- # define _ChecksumPlugin_fadler32 // ~ 32 bit effective
100
- # define _ChecksumPlugin_fadler128// ? 81 bit effective
101
- # define _ChecksumPlugin_md5 // ? 128 bit effective
102
- #endif
103
-
104
-
105
- #include "checksum_plugin_demo.h"
106
- #endif
107
-
108
- static void printVersion(){
109
- printf("HDiffPatch::hdiffz v" HDIFFPATCH_VERSION_STRING "\n\n");
110
- }
111
-
112
- static void printUsage(){
113
- printVersion();
114
- printf("diff usage: hdiffz [options] oldPath newPath outDiffFile\n"
115
- "test usage: hdiffz -t oldPath newPath testDiffFile\n"
116
- "resave usage: hdiffz [-c-...] diffFile outDiffFile\n"
117
- #if (_IS_NEED_DIR_DIFF_PATCH)
118
- "get manifest: hdiffz [-g#...] [-C-checksumType] inputPath -M#outManifestTxtFile\n"
119
- "manifest diff: hdiffz [options] -M-old#oldManifestFile -M-new#newManifestFile\n"
120
- " oldPath newPath outDiffFile\n"
121
- " oldPath newPath inputPath can be file or directory(folder),\n"
122
- #endif
123
- " oldPath can empty, and input parameter \"\"\n"
124
- "memory options:\n"
125
- " -m[-matchScore]\n"
126
- " DEFAULT; all file load into Memory; best diffFileSize;\n"
127
- " requires (newFileSize+ oldFileSize*5(or *9 when oldFileSize>=2GB))+O(1)\n"
128
- " bytes of memory;\n"
129
- " matchScore>=0, DEFAULT -m-6, recommended bin: 0--4 text: 4--9 etc...\n"
130
- " -s[-matchBlockSize]\n"
131
- " all file load as Stream; fast;\n"
132
- " requires O(oldFileSize*16/matchBlockSize+matchBlockSize*5)bytes of memory;\n"
133
- " matchBlockSize>=4, DEFAULT -s-64, recommended 16,32,48,1k,64k,1m etc...\n"
134
- "special options:\n"
135
- #if (_IS_NEED_SINGLE_STREAM_DIFF)
136
- " -SD[-stepSize]\n"
137
- " create single compressed stream diffData! \n"
138
- " now only for test, must run with -m, and not supprot directory(folder).\n"
139
- " stepSize>=" _HDIFFPATCH_EXPAND_AND_QUOTE(hpatch_kStreamCacheSize) ", DEFAULT -SD-256k, recommended 64k,2m etc...\n"
140
- #endif
141
- #if (_IS_USED_MULTITHREAD)
142
- " -p-parallelThreadNumber\n"
143
- " if parallelThreadNumber>1 then open multi-thread Parallel mode;\n"
144
- " DEFAULT -p-4; requires more memory!\n"
145
- #endif
146
- " -c-compressType[-compressLevel]\n"
147
- " set outDiffFile Compress type & level, DEFAULT uncompress;\n"
148
- " for resave diffFile,recompress diffFile to outDiffFile by new set;\n"
149
- " support compress type & level:\n"
150
- " (re. https://github.com/sisong/lzbench/blob/master/lzbench171_sorted.md )\n"
151
- #ifdef _CompressPlugin_zlib
152
- " -c-zlib[-{1..9}] DEFAULT level 9\n"
153
- # if (_IS_USED_MULTITHREAD)
154
- " -c-pzlib[-{1..9}] DEFAULT level 6\n"
155
- " support run by multi-thread parallel, fast!\n"
156
- " WARNING: code not compatible with it compressed by -c-zlib!\n"
157
- " and code size may be larger than if it compressed by -c-zlib. \n"
158
- # endif
159
- #endif
160
- #ifdef _CompressPlugin_bz2
161
- " -c-bzip2[-{1..9}] (or -bz2) DEFAULT level 9\n"
162
- # if (_IS_USED_MULTITHREAD)
163
- " -c-pbzip2[-{1..9}] (or -pbz2) DEFAULT level 8\n"
164
- " support run by multi-thread parallel, fast!\n"
165
- " WARNING: code not compatible with it compressed by -c-bzip2!\n"
166
- " and code size may be larger than if it compressed by -c-bzip2.\n"
167
- # endif
168
- #endif
169
- #ifdef _CompressPlugin_lzma
170
- " -c-lzma[-{0..9}[-dictSize]] DEFAULT level 7\n"
171
- " dictSize can like 4096 or 4k or 4m or 128m etc..., DEFAULT 8m\n"
172
- # if (_IS_USED_MULTITHREAD)
173
- " support run by 2-thread parallel.\n"
174
- # endif
175
- #endif
176
- #ifdef _CompressPlugin_lzma2
177
- " -c-lzma2[-{0..9}[-dictSize]] DEFAULT level 7\n"
178
- " dictSize can like 4096 or 4k or 4m or 128m etc..., DEFAULT 8m\n"
179
- # if (_IS_USED_MULTITHREAD)
180
- " support run by multi-thread parallel, fast!\n"
181
- # endif
182
- " WARNING: code not compatible with it compressed by -c-lzma!\n"
183
- #endif
184
- #ifdef _CompressPlugin_lz4
185
- " -c-lz4[-{1..50}] DEFAULT level 50 (as lz4 acceleration 1)\n"
186
- #endif
187
- #ifdef _CompressPlugin_lz4hc
188
- " -c-lz4hc[-{3..12}] DEFAULT level 11\n"
189
- #endif
190
- #ifdef _CompressPlugin_zstd
191
- " -c-zstd[-{0..22}[-dictBits]] DEFAULT level 20\n"
192
- " dictBits can 10--31, DEFAULT 24.\n"
193
- # if (_IS_USED_MULTITHREAD)
194
- " support run by multi-thread parallel, fast!\n"
195
- # endif
196
- #endif
197
- #ifdef _CompressPlugin_brotli
198
- " -c-brotli[-{0..11}[-dictBits]] DEFAULT level 9\n"
199
- " dictBits can 10--30, DEFAULT 24.\n"
200
- #endif
201
- #ifdef _CompressPlugin_lzham
202
- " -c-lzham[-{0..5}[-dictBits]] DEFAULT level 4\n"
203
- " dictBits can 15--29, DEFAULT 24.\n"
204
- # if (_IS_USED_MULTITHREAD)
205
- " support run by multi-thread parallel, fast!\n"
206
- # endif
207
- #endif
208
- #if (_IS_NEED_DIR_DIFF_PATCH)
209
- " -C-checksumType\n"
210
- " set outDiffFile Checksum type for directory diff, DEFAULT "
211
- #ifdef _ChecksumPlugin_fadler64
212
- "-C-fadler64;\n"
213
- #else
214
- # ifdef _ChecksumPlugin_crc32
215
- "-C-crc32;\n"
216
- # else
217
- "no checksum;\n"
218
- # endif
219
- " (if need checksum for diff between two files, add -D)\n"
220
- #endif
221
- " support checksum type:\n"
222
- " -C-no no checksum\n"
223
- #ifdef _ChecksumPlugin_crc32
224
- # ifdef _ChecksumPlugin_fadler64
225
- " -C-crc32\n"
226
- # else
227
- " -C-crc32 DEFAULT\n"
228
- # endif
229
- #endif
230
- #ifdef _ChecksumPlugin_adler32
231
- " -C-adler32\n"
232
- #endif
233
- #ifdef _ChecksumPlugin_adler64
234
- " -C-adler64\n"
235
- #endif
236
- #ifdef _ChecksumPlugin_fadler32
237
- " -C-fadler32\n"
238
- #endif
239
- #ifdef _ChecksumPlugin_fadler64
240
- " -C-fadler64 DEFAULT\n"
241
- #endif
242
- #ifdef _ChecksumPlugin_fadler128
243
- " -C-fadler128\n"
244
- #endif
245
- #ifdef _ChecksumPlugin_md5
246
- " -C-md5\n"
247
- #endif
248
- " -n-maxOpenFileNumber\n"
249
- " limit Number of open files at same time when stream directory diff;\n"
250
- " maxOpenFileNumber>=8, DEFAULT -n-48, the best limit value by different\n"
251
- " operating system.\n"
252
- " -g#ignorePath[#ignorePath#...]\n"
253
- " set iGnore path list when Directory Diff; ignore path list such as:\n"
254
- " #.DS_Store#desktop.ini#*thumbs*.db#.git*#.svn/#cache_*/00*11/*.tmp\n"
255
- " # means separator between names; (if char # in name, need write #: )\n"
256
- " * means can match any chars in name; (if char * in name, need write *: );\n"
257
- " / at the end of name means must match directory;\n"
258
- " -g-old#ignorePath[#ignorePath#...]\n"
259
- " set iGnore path list in oldPath when Directory Diff;\n"
260
- " if oldFile can be changed, need add it in old ignore list;\n"
261
- " -g-new#ignorePath[#ignorePath#...]\n"
262
- " set iGnore path list in newPath when Directory Diff;\n"
263
- " in general, new ignore list should is empty;\n"
264
- " -M#outManifestTxtFile\n"
265
- " create a Manifest file for inputPath; it is a text file, saved infos of\n"
266
- " all files and directoriy list in inputPath; this file while be used in \n"
267
- " manifest diff, support re-checksum data by manifest diff;\n"
268
- " can be used to protect historical versions be modified!\n"
269
- " -M-old#oldManifestFile\n"
270
- " oldManifestFile is created from oldPath; if no oldPath not need -M-old;\n"
271
- " -M-new#newManifestFile\n"
272
- " newManifestFile is created from newPath;\n"
273
- " -D force run Directory diff between two files; DEFAULT (no -D) run \n"
274
- " directory diff need oldPath or newPath is directory.\n"
275
- #endif //_IS_NEED_DIR_DIFF_PATCH
276
- " -d Diff only, do't run patch check, DEFAULT run patch check.\n"
277
- " -t Test only, run patch check, patch(oldPath,testDiffFile)==newPath ? \n"
278
- " -f Force overwrite, ignore write path already exists;\n"
279
- " DEFAULT (no -f) not overwrite and then return error;\n"
280
- " if used -f and write path is exist directory, will always return error.\n"
281
- " -h or -?\n"
282
- " output Help info (this usage).\n"
283
- " -v output Version info.\n\n"
284
- );
285
- }
286
-
287
- typedef enum THDiffResult {
288
- HDIFF_SUCCESS=0,
289
- HDIFF_OPTIONS_ERROR,
290
- HDIFF_OPENREAD_ERROR,
291
- HDIFF_OPENWRITE_ERROR,
292
- HDIFF_FILECLOSE_ERROR,
293
- HDIFF_MEM_ERROR,
294
- HDIFF_DIFF_ERROR,
295
- HDIFF_PATCH_ERROR,
296
- HDIFF_RESAVE_FILEREAD_ERROR,
297
- HDIFF_RESAVE_DIFFINFO_ERROR,
298
- HDIFF_RESAVE_COMPRESSTYPE_ERROR,
299
- HDIFF_RESAVE_ERROR,
300
- HDIFF_RESAVE_CHECKSUMTYPE_ERROR,
301
-
302
- HDIFF_PATHTYPE_ERROR, //adding begin v3.0
303
- HDIFF_TEMPPATH_ERROR,
304
- HDIFF_DELETEPATH_ERROR,
305
- HDIFF_RENAMEPATH_ERROR,
306
-
307
- DIRDIFF_DIFF_ERROR=101,
308
- DIRDIFF_PATCH_ERROR,
309
- MANIFEST_CREATE_ERROR,
310
- MANIFEST_TEST_ERROR,
311
- } THDiffResult;
312
-
313
- int hdiff_cmd_line(int argc,const char * argv[]);
314
-
315
- #if (_IS_NEED_DIR_DIFF_PATCH)
316
- int hdiff_dir(const char* oldPath,const char* newPath,const char* outDiffFileName,
317
- hpatch_BOOL oldIsDir, hpatch_BOOL newIsDir,
318
- hpatch_BOOL isDiff,hpatch_BOOL isLoadAll,size_t matchValue,hpatch_BOOL isPatchCheck,
319
- const hdiff_TCompress* compressPlugin,hpatch_TDecompress* decompressPlugin,
320
- hpatch_TChecksum* checksumPlugin,size_t kMaxOpenFileNumber,
321
- const std::vector<std::string>& ignorePathListBase,const std::vector<std::string>& ignoreOldPathList,
322
- const std::vector<std::string>& ignoreNewPathList,
323
- const std::string& oldManifestFileName,const std::string& newManifestFileName);
324
- int create_manifest(const char* inputPath,const char* outManifestFileName,
325
- hpatch_TChecksum* checksumPlugin,const std::vector<std::string>& ignorePathList);
326
- #endif
327
- int hdiff(const char* oldFileName,const char* newFileName,const char* outDiffFileName,hpatch_BOOL isDiff,
328
- hpatch_BOOL isLoadAll,size_t matchValue,hpatch_BOOL isPatchCheck,
329
- const hdiff_TCompress* compressPlugin,hpatch_TDecompress* decompressPlugin,
330
- hpatch_BOOL isSingleStreamDiff,size_t singleStreamStepSize);
331
- int hdiff_resave(const char* diffFileName,const char* outDiffFileName,
332
- const hdiff_TCompress* compressPlugin);
333
-
334
-
335
- #if (_IS_NEED_MAIN)
336
- # if (_IS_USED_WIN32_UTF8_WAPI)
337
- int wmain(int argc,wchar_t* argv_w[]){
338
- hdiff_private::TAutoMem _mem(hpatch_kPathMaxSize*4);
339
- char** argv_utf8=(char**)_mem.data();
340
- if (!_wFileNames_to_utf8((const wchar_t**)argv_w,argc,argv_utf8,_mem.size()))
341
- return HDIFF_OPTIONS_ERROR;
342
- SetDefaultStringLocale();
343
- return hdiff_cmd_line(argc,(const char**)argv_utf8);
344
- }
345
- # else
346
- int main(int argc,char* argv[]){
347
- return hdiff_cmd_line(argc,(const char**)argv);
348
- }
349
- # endif
350
- #endif
351
-
352
-
353
- static hpatch_BOOL _getIsCompressedDiffFile(const char* diffFileName){
354
- hpatch_TFileStreamInput diffData;
355
- hpatch_TFileStreamInput_init(&diffData);
356
- if (!hpatch_TFileStreamInput_open(&diffData,diffFileName)) return hpatch_FALSE;
357
- hpatch_compressedDiffInfo diffInfo;
358
- hpatch_BOOL result=getCompressedDiffInfo(&diffInfo,&diffData.base);
359
- if (!hpatch_TFileStreamInput_close(&diffData)) return hpatch_FALSE;
360
- return result;
361
- }
362
-
363
- static void _trySetDecompress(hpatch_TDecompress** out_decompressPlugin,const char* compressType,
364
- hpatch_TDecompress* testDecompressPlugin){
365
- if ((*out_decompressPlugin)!=0) return;
366
- if (testDecompressPlugin->is_can_open(compressType))
367
- *out_decompressPlugin=testDecompressPlugin;
368
- }
369
- static hpatch_BOOL findDecompress(hpatch_TDecompress** out_decompressPlugin,const char* compressType){
370
- *out_decompressPlugin=0;
371
- if (strlen(compressType)==0) return hpatch_TRUE;
372
- #ifdef _CompressPlugin_zlib
373
- _trySetDecompress(out_decompressPlugin,compressType,&zlibDecompressPlugin);
374
- #endif
375
- #ifdef _CompressPlugin_bz2
376
- _trySetDecompress(out_decompressPlugin,compressType,&bz2DecompressPlugin);
377
- #endif
378
- #ifdef _CompressPlugin_lzma
379
- _trySetDecompress(out_decompressPlugin,compressType,&lzmaDecompressPlugin);
380
- #endif
381
- #ifdef _CompressPlugin_lzma2
382
- _trySetDecompress(out_decompressPlugin,compressType,&lzma2DecompressPlugin);
383
- #endif
384
- #if (defined(_CompressPlugin_lz4) || (defined(_CompressPlugin_lz4hc)))
385
- _trySetDecompress(out_decompressPlugin,compressType,&lz4DecompressPlugin);
386
- #endif
387
- #ifdef _CompressPlugin_zstd
388
- _trySetDecompress(out_decompressPlugin,compressType,&zstdDecompressPlugin);
389
- #endif
390
- #ifdef _CompressPlugin_brotli
391
- _trySetDecompress(out_decompressPlugin,compressType,&brotliDecompressPlugin);
392
- #endif
393
- #ifdef _CompressPlugin_lzham
394
- _trySetDecompress(out_decompressPlugin,compressType,&lzhamDecompressPlugin);
395
- #endif
396
- return 0!=*out_decompressPlugin;
397
- }
398
-
399
- #if (_IS_NEED_DIR_DIFF_PATCH)
400
- static void _trySetChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType,
401
- hpatch_TChecksum* testChecksumPlugin){
402
- if ((*out_checksumPlugin)!=0) return;
403
- if (0==strcmp(checksumType,testChecksumPlugin->checksumType()))
404
- *out_checksumPlugin=testChecksumPlugin;
405
- }
406
- static hpatch_BOOL findChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType){
407
- *out_checksumPlugin=0;
408
- if (strlen(checksumType)==0) return hpatch_TRUE;
409
- #ifdef _ChecksumPlugin_crc32
410
- _trySetChecksum(out_checksumPlugin,checksumType,&crc32ChecksumPlugin);
411
- #endif
412
- #ifdef _ChecksumPlugin_adler32
413
- _trySetChecksum(out_checksumPlugin,checksumType,&adler32ChecksumPlugin);
414
- #endif
415
- #ifdef _ChecksumPlugin_adler64
416
- _trySetChecksum(out_checksumPlugin,checksumType,&adler64ChecksumPlugin);
417
- #endif
418
- #ifdef _ChecksumPlugin_fadler32
419
- _trySetChecksum(out_checksumPlugin,checksumType,&fadler32ChecksumPlugin);
420
- #endif
421
- #ifdef _ChecksumPlugin_fadler64
422
- _trySetChecksum(out_checksumPlugin,checksumType,&fadler64ChecksumPlugin);
423
- #endif
424
- #ifdef _ChecksumPlugin_fadler128
425
- _trySetChecksum(out_checksumPlugin,checksumType,&fadler128ChecksumPlugin);
426
- #endif
427
- #ifdef _ChecksumPlugin_md5
428
- _trySetChecksum(out_checksumPlugin,checksumType,&md5ChecksumPlugin);
429
- #endif
430
- return (0!=*out_checksumPlugin);
431
- }
432
-
433
- static hpatch_BOOL _getOptChecksum(hpatch_TChecksum** out_checksumPlugin,
434
- const char* checksumType,const char* kNoChecksum){
435
- assert(0==*out_checksumPlugin);
436
- if (0==strcmp(checksumType,kNoChecksum))
437
- return hpatch_TRUE;
438
- else if (strlen(checksumType)==0)
439
- return hpatch_FALSE;
440
- else
441
- return findChecksum(out_checksumPlugin,checksumType);
442
- }
443
-
444
- #endif //_IS_NEED_DIR_DIFF_PATCH
445
-
446
-
447
- static bool _tryGetCompressSet(const char** isMatchedType,const char* ptype,const char* ptypeEnd,
448
- const char* cmpType,const char* cmpType2=0,
449
- size_t* compressLevel=0,size_t levelMin=0,size_t levelMax=0,size_t levelDefault=0,
450
- size_t* dictSize=0,size_t dictSizeMin=0,size_t dictSizeMax=0,size_t dictSizeDefault=0){
451
- if (*isMatchedType) return true; //ok
452
- const size_t ctypeLen=strlen(cmpType);
453
- const size_t ctype2Len=(cmpType2!=0)?strlen(cmpType2):0;
454
- if ( ((ctypeLen==(size_t)(ptypeEnd-ptype))&&(0==strncmp(ptype,cmpType,ctypeLen)))
455
- || ((cmpType2!=0)&&(ctype2Len==(size_t)(ptypeEnd-ptype))&&(0==strncmp(ptype,cmpType2,ctype2Len))) )
456
- *isMatchedType=cmpType; //ok
457
- else
458
- return true;//type mismatch
459
-
460
- if ((compressLevel)&&(ptypeEnd[0]=='-')){
461
- const char* plevel=ptypeEnd+1;
462
- const char* plevelEnd=findUntilEnd(plevel,'-');
463
- if (!a_to_size(plevel,plevelEnd-plevel,compressLevel)) return false; //error
464
- if (*compressLevel<levelMin) *compressLevel=levelMin;
465
- else if (*compressLevel>levelMax) *compressLevel=levelMax;
466
- if ((dictSize)&&(plevelEnd[0]=='-')){
467
- const char* pdictSize=plevelEnd+1;
468
- const char* pdictSizeEnd=findUntilEnd(pdictSize,'-');
469
- if (!kmg_to_size(pdictSize,pdictSizeEnd-pdictSize,dictSize)) return false; //error
470
- if (*dictSize<dictSizeMin) *dictSize=dictSizeMin;
471
- else if (*dictSize>dictSizeMax) *dictSize=dictSizeMax;
472
- }else{
473
- if (plevelEnd[0]!='\0') return false; //error
474
- if (dictSize) *dictSize=dictSizeDefault;
475
- }
476
- }else{
477
- if (ptypeEnd[0]!='\0') return false; //error
478
- if (compressLevel) *compressLevel=levelDefault;
479
- if (dictSize) *dictSize=dictSizeDefault;
480
- }
481
- return true;
482
- }
483
-
484
- #define _options_check(value,errorInfo){ \
485
- if (!(value)) { fprintf(stderr,"options " errorInfo " ERROR!\n\n"); printUsage(); return HDIFF_OPTIONS_ERROR; } }
486
-
487
- static int _checkSetCompress(hdiff_TCompress** out_compressPlugin,
488
- hpatch_TDecompress** out_decompressPlugin,
489
- const char* ptype,const char* ptypeEnd){
490
- const char* isMatchedType=0;
491
- size_t compressLevel=0;
492
- #if (defined _CompressPlugin_lzma)||(defined _CompressPlugin_lzma2)
493
- size_t dictSize=0;
494
- const size_t defaultDictSize=(1<<20)*8;
495
- #endif
496
- #if (defined _CompressPlugin_zstd)||(defined _CompressPlugin_brotli)||(defined _CompressPlugin_lzham)
497
- size_t dictBits=0;
498
- const size_t defaultDictBits=20+4;
499
- #endif
500
- #ifdef _CompressPlugin_zlib
501
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"zlib",0,
502
- &compressLevel,1,9,9),"-c-zlib-?");
503
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"zlib"))){
504
- static TCompressPlugin_zlib _zlibCompressPlugin=zlibCompressPlugin;
505
- _zlibCompressPlugin.compress_level=(int)compressLevel;
506
- *out_compressPlugin=&_zlibCompressPlugin.base;
507
- *out_decompressPlugin=&zlibDecompressPlugin; }
508
- # if (_IS_USED_MULTITHREAD)
509
- //pzlib
510
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"pzlib",0,
511
- &compressLevel,1,9,6),"-c-pzlib-?");
512
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"pzlib"))){
513
- static TCompressPlugin_pzlib _pzlibCompressPlugin=pzlibCompressPlugin;
514
- _pzlibCompressPlugin.base.compress_level=(int)compressLevel;
515
- *out_compressPlugin=&_pzlibCompressPlugin.base.base;
516
- *out_decompressPlugin=&zlibDecompressPlugin; }
517
- # endif // _IS_USED_MULTITHREAD
518
- #endif
519
- #ifdef _CompressPlugin_bz2
520
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"bzip2","bz2",
521
- &compressLevel,1,9,9),"-c-bzip2-?");
522
- if ((isMatchedType)&&((0==strcmp(isMatchedType,"bzip2"))||(0==strcmp(isMatchedType,"bz2")))){
523
- static TCompressPlugin_bz2 _bz2CompressPlugin=bz2CompressPlugin;
524
- _bz2CompressPlugin.compress_level=(int)compressLevel;
525
- *out_compressPlugin=&_bz2CompressPlugin.base;
526
- *out_decompressPlugin=&bz2DecompressPlugin; }
527
- # if (_IS_USED_MULTITHREAD)
528
- //pbzip2
529
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"pbzip2","pbz2",
530
- &compressLevel,1,9,8),"-c-pbzip2-?");
531
- if ((isMatchedType)&&((0==strcmp(isMatchedType,"pbzip2"))||(0==strcmp(isMatchedType,"pbz2")))){
532
- static TCompressPlugin_pbz2 _pbz2CompressPlugin=pbz2CompressPlugin;
533
- _pbz2CompressPlugin.base.compress_level=(int)compressLevel;
534
- *out_compressPlugin=&_pbz2CompressPlugin.base.base;
535
- *out_decompressPlugin=&bz2DecompressPlugin; }
536
- # endif // _IS_USED_MULTITHREAD
537
- #endif
538
- #ifdef _CompressPlugin_lzma
539
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lzma",0,
540
- &compressLevel,0,9,7, &dictSize,1<<12,
541
- (sizeof(size_t)<=4)?(1<<27):((size_t)3<<29),defaultDictSize),"-c-lzma-?");
542
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"lzma"))){
543
- static TCompressPlugin_lzma _lzmaCompressPlugin=lzmaCompressPlugin;
544
- _lzmaCompressPlugin.compress_level=(int)compressLevel;
545
- _lzmaCompressPlugin.dict_size=(int)dictSize;
546
- *out_compressPlugin=&_lzmaCompressPlugin.base;
547
- *out_decompressPlugin=&lzmaDecompressPlugin; }
548
- #endif
549
- #ifdef _CompressPlugin_lzma2
550
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lzma2",0,
551
- &compressLevel,0,9,7, &dictSize,1<<12,
552
- (sizeof(size_t)<=4)?(1<<27):((size_t)3<<29),defaultDictSize),"-c-lzma2-?");
553
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"lzma2"))){
554
- static TCompressPlugin_lzma2 _lzma2CompressPlugin=lzma2CompressPlugin;
555
- _lzma2CompressPlugin.compress_level=(int)compressLevel;
556
- _lzma2CompressPlugin.dict_size=(int)dictSize;
557
- *out_compressPlugin=&_lzma2CompressPlugin.base;
558
- *out_decompressPlugin=&lzma2DecompressPlugin; }
559
- #endif
560
- #ifdef _CompressPlugin_lz4
561
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lz4",0,
562
- &compressLevel,1,50,50),"-c-lz4-?");
563
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"lz4"))){
564
- static TCompressPlugin_lz4 _lz4CompressPlugin=lz4CompressPlugin;
565
- _lz4CompressPlugin.compress_level=(int)compressLevel;
566
- *out_compressPlugin=&_lz4CompressPlugin.base;
567
- *out_decompressPlugin=&lz4DecompressPlugin; }
568
- #endif
569
- #ifdef _CompressPlugin_lz4hc
570
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lz4hc",0,
571
- &compressLevel,3,12,11),"-c-lz4hc-?");
572
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"lz4hc"))){
573
- static TCompressPlugin_lz4hc _lz4hcCompressPlugin=lz4hcCompressPlugin;
574
- _lz4hcCompressPlugin.compress_level=(int)compressLevel;
575
- *out_compressPlugin=&_lz4hcCompressPlugin.base;
576
- *out_decompressPlugin=&lz4DecompressPlugin; }
577
- #endif
578
- #ifdef _CompressPlugin_zstd
579
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"zstd",0,
580
- &compressLevel,0,22,20, &dictBits,10,
581
- (sizeof(size_t)<=4)?30:31,defaultDictBits),"-c-zstd-?");
582
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"zstd"))){
583
- static TCompressPlugin_zstd _zstdCompressPlugin=zstdCompressPlugin;
584
- _zstdCompressPlugin.compress_level=(int)compressLevel;
585
- _zstdCompressPlugin.dict_bits = (int)dictBits;
586
- *out_compressPlugin=&_zstdCompressPlugin.base;
587
- *out_decompressPlugin=&zstdDecompressPlugin; }
588
- #endif
589
- #ifdef _CompressPlugin_brotli
590
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"brotli",0,
591
- &compressLevel,0,11,9, &dictBits,10,
592
- 30,defaultDictBits),"-c-brotli-?");
593
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"brotli"))){
594
- static TCompressPlugin_brotli _brotliCompressPlugin=brotliCompressPlugin;
595
- _brotliCompressPlugin.compress_level=(int)compressLevel;
596
- _brotliCompressPlugin.dict_bits = (int)dictBits;
597
- *out_compressPlugin=&_brotliCompressPlugin.base;
598
- *out_decompressPlugin=&brotliDecompressPlugin; }
599
- #endif
600
- #ifdef _CompressPlugin_lzham
601
- _options_check(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lzham",0,
602
- &compressLevel,0,5,4, &dictBits,15,
603
- (sizeof(size_t)<=4)?26:29,defaultDictBits),"-c-lzham-?");
604
- if ((isMatchedType)&&(0==strcmp(isMatchedType,"lzham"))){
605
- static TCompressPlugin_lzham _lzhamCompressPlugin=lzhamCompressPlugin;
606
- _lzhamCompressPlugin.compress_level=(int)compressLevel;
607
- _lzhamCompressPlugin.dict_bits = (int)dictBits;
608
- *out_compressPlugin=&_lzhamCompressPlugin.base;
609
- *out_decompressPlugin=&lzhamDecompressPlugin; }
610
- #endif
611
- _options_check((*out_compressPlugin!=0)&&(*out_decompressPlugin!=0),"-c-?");
612
- return HDIFF_SUCCESS;
613
- }
614
-
615
- #define _return_check(value,exitCode,errorInfo){ \
616
- if (!(value)) { fprintf(stderr,errorInfo " ERROR!\n"); return exitCode; } }
617
-
618
- #define _kNULL_VALUE ((hpatch_BOOL)(-1))
619
- #define _kNULL_SIZE (~(size_t)0)
620
-
621
- #define _THREAD_NUMBER_NULL 0
622
- #define _THREAD_NUMBER_MIN 1
623
- #define _THREAD_NUMBER_DEFUALT kDefaultCompressThreadNumber
624
- #define _THREAD_NUMBER_MAX (1<<8)
625
-
626
- int hdiff_cmd_line(int argc, const char * argv[]){
627
- hpatch_BOOL isLoadAll=_kNULL_VALUE;
628
- hpatch_BOOL isPatchCheck=_kNULL_VALUE;
629
- hpatch_BOOL isDiff=_kNULL_VALUE;
630
- hpatch_BOOL isForceOverwrite=_kNULL_VALUE;
631
- hpatch_BOOL isOutputHelp=_kNULL_VALUE;
632
- hpatch_BOOL isOutputVersion=_kNULL_VALUE;
633
- hpatch_BOOL isOldPathInputEmpty=_kNULL_VALUE;
634
- size_t matchValue=0;
635
- size_t threadNum = _THREAD_NUMBER_NULL;
636
- hdiff_TCompress* compressPlugin=0;
637
- hpatch_TDecompress* decompressPlugin=0;
638
- hpatch_BOOL isSingleStreamDiff=_kNULL_VALUE;
639
- size_t singleStreamStepSize=_kNULL_SIZE;
640
- #if (_IS_NEED_DIR_DIFF_PATCH)
641
- hpatch_BOOL isForceRunDirDiff=_kNULL_VALUE;
642
- size_t kMaxOpenFileNumber=_kNULL_SIZE; //only used in stream dir diff
643
- hpatch_BOOL isSetChecksum=_kNULL_VALUE;
644
- hpatch_TChecksum* checksumPlugin=0;
645
- std::string manifestOut;
646
- std::string manifestOld;
647
- std::string manifestNew;
648
- std::vector<std::string> ignorePathList;
649
- std::vector<std::string> ignoreOldPathList;
650
- std::vector<std::string> ignoreNewPathList;
651
- #endif
652
- std::vector<const char *> arg_values;
653
- for (int i=1; i<argc; ++i) {
654
- const char* op=argv[i];
655
- _options_check(op!=0,"?");
656
- if (op[0]!='-'){
657
- hpatch_BOOL isEmpty=(strlen(op)==0);
658
- if (isEmpty){
659
- if (isOldPathInputEmpty==_kNULL_VALUE)
660
- isOldPathInputEmpty=hpatch_TRUE;
661
- else
662
- _options_check(!isEmpty,"?"); //error return
663
- }else{
664
- if (isOldPathInputEmpty==_kNULL_VALUE)
665
- isOldPathInputEmpty=hpatch_FALSE;
666
- }
667
- arg_values.push_back(op); //path:file or directory
668
- continue;
669
- }
670
- switch (op[1]) {
671
- case 'm':{ //diff in memory
672
- _options_check((isLoadAll==_kNULL_VALUE)&&((op[2]=='-')||(op[2]=='\0')),"-m");
673
- isLoadAll=hpatch_TRUE;
674
- if (op[2]=='-'){
675
- const char* pnum=op+3;
676
- _options_check(kmg_to_size(pnum,strlen(pnum),&matchValue),"-m-?");
677
- _options_check((0<=(int)matchValue)&&(matchValue==(size_t)(int)matchValue),"-m-?");
678
- }else{
679
- matchValue=kMinSingleMatchScore_default;
680
- }
681
- } break;
682
- case 's':{
683
- #if (_IS_NEED_SINGLE_STREAM_DIFF)
684
- _options_check((isSingleStreamDiff!=hpatch_TRUE),"-SD");
685
- #endif
686
- isLoadAll=hpatch_FALSE; //diff by stream
687
- if (op[2]=='-'){
688
- const char* pnum=op+3;
689
- _options_check(kmg_to_size(pnum,strlen(pnum),&matchValue),"-s-?");
690
- }else{
691
- matchValue=kMatchBlockSize_default;
692
- }
693
- } break;
694
- #if (_IS_NEED_SINGLE_STREAM_DIFF)
695
- case 'S':{
696
- _options_check((isSingleStreamDiff==_kNULL_VALUE)&&(isLoadAll!=hpatch_FALSE)
697
- &&(op[2]=='D')&&((op[3]=='\0')||(op[3]=='-')),"-SD");
698
- isSingleStreamDiff=hpatch_TRUE;
699
- if (op[3]=='-'){
700
- const char* pnum=op+4;
701
- _options_check(kmg_to_size(pnum,strlen(pnum),&singleStreamStepSize),"-SD-?");
702
- _options_check((singleStreamStepSize>=hpatch_kStreamCacheSize),"-SD-?");
703
- }else{
704
- singleStreamStepSize=kDefaultStepMemSize;
705
- }
706
- } break;
707
- #endif
708
- case '?':
709
- case 'h':{
710
- _options_check((isOutputHelp==_kNULL_VALUE)&&(op[2]=='\0'),"-h");
711
- isOutputHelp=hpatch_TRUE;
712
- } break;
713
- case 'v':{
714
- _options_check((isOutputVersion==_kNULL_VALUE)&&(op[2]=='\0'),"-v");
715
- isOutputVersion=hpatch_TRUE;
716
- } break;
717
- case 't':{
718
- _options_check((isPatchCheck==_kNULL_VALUE)&&(op[2]=='\0'),"-t");
719
- isPatchCheck=hpatch_TRUE; //test diffFile
720
- } break;
721
- case 'f':{
722
- _options_check((isForceOverwrite==_kNULL_VALUE)&&(op[2]=='\0'),"-f");
723
- isForceOverwrite=hpatch_TRUE;
724
- } break;
725
- case 'd':{
726
- _options_check((isDiff==_kNULL_VALUE)&&(op[2]=='\0'),"-d");
727
- isDiff=hpatch_TRUE; //diff only
728
- } break;
729
- #if (_IS_USED_MULTITHREAD)
730
- case 'p':{
731
- _options_check((threadNum==_THREAD_NUMBER_NULL)&&(op[2]=='-'),"-p-?");
732
- const char* pnum=op+3;
733
- _options_check(a_to_size(pnum,strlen(pnum),&threadNum),"-p-?");
734
- _options_check(threadNum>=_THREAD_NUMBER_MIN,"-p-?");
735
- } break;
736
- #endif
737
- case 'c':{
738
- _options_check((compressPlugin==0)&&(op[2]=='-'),"-c");
739
- const char* ptype=op+3;
740
- const char* ptypeEnd=findUntilEnd(ptype,'-');
741
- int result=_checkSetCompress(&compressPlugin,&decompressPlugin,ptype,ptypeEnd);
742
- if (HDIFF_SUCCESS!=result)
743
- return result;
744
- } break;
745
- #if (_IS_NEED_DIR_DIFF_PATCH)
746
- case 'C':{
747
- _options_check((isSetChecksum==_kNULL_VALUE)&&(checksumPlugin==0)&&(op[2]=='-'),"-C");
748
- const char* ptype=op+3;
749
- isSetChecksum=hpatch_TRUE;
750
- _options_check(_getOptChecksum(&checksumPlugin,ptype,"no"),"-C-?");
751
- } break;
752
- case 'n':{
753
- _options_check((kMaxOpenFileNumber==_kNULL_SIZE)&&(op[2]=='-'),"-n-?")
754
- const char* pnum=op+3;
755
- _options_check(kmg_to_size(pnum,strlen(pnum),&kMaxOpenFileNumber),"-n-?");
756
- } break;
757
- case 'g':{
758
- if (op[2]=='#'){ //-g#
759
- const char* plist=op+3;
760
- _options_check(_getIgnorePathSetList(ignorePathList,plist),"-g#?");
761
- }else if (op[2]=='-'){
762
- const char* plist=op+7;
763
- if ((op[3]=='o')&&(op[4]=='l')&&(op[5]=='d')&&(op[6]=='#')){
764
- _options_check(_getIgnorePathSetList(ignoreOldPathList,plist),"-g-old#?");
765
- }else if ((op[3]=='n')&&(op[4]=='e')&&(op[5]=='w')&&(op[6]=='#')){
766
- _options_check(_getIgnorePathSetList(ignoreNewPathList,plist),"-g-new#?");
767
- }else{
768
- _options_check(hpatch_FALSE,"-g-?");
769
- }
770
- }else{
771
- _options_check(hpatch_FALSE,"-g?");
772
- }
773
- } break;
774
- case 'M':{
775
- if (op[2]=='#'){ //-M#
776
- const char* plist=op+3;
777
- _options_check(manifestOut.empty()&&manifestOld.empty()&&manifestNew.empty(),"-M#");
778
- manifestOut=plist;
779
- }else if (op[2]=='-'){
780
- const char* plist=op+7;
781
- if ((op[3]=='o')&&(op[4]=='l')&&(op[5]=='d')&&(op[6]=='#')){
782
- _options_check(manifestOut.empty()&&manifestOld.empty(),"-M-old#");
783
- manifestOld=plist;
784
- }else if ((op[3]=='n')&&(op[4]=='e')&&(op[5]=='w')&&(op[6]=='#')){
785
- _options_check(manifestOut.empty()&&manifestNew.empty(),"-M-new#");
786
- manifestNew=plist;
787
- }else{
788
- _options_check(hpatch_FALSE,"-M-?");
789
- }
790
- }else{
791
- _options_check(hpatch_FALSE,"-M?");
792
- }
793
- } break;
794
- case 'D':{
795
- _options_check((isForceRunDirDiff==_kNULL_VALUE)&&(op[2]=='\0'),"-D");
796
- isForceRunDirDiff=hpatch_TRUE; //force run DirDiff
797
- } break;
798
- #endif
799
- default: {
800
- _options_check(hpatch_FALSE,"-?");
801
- } break;
802
- }//switch
803
- }
804
-
805
- if (isOutputHelp==_kNULL_VALUE)
806
- isOutputHelp=hpatch_FALSE;
807
- if (isOutputVersion==_kNULL_VALUE)
808
- isOutputVersion=hpatch_FALSE;
809
- if (isForceOverwrite==_kNULL_VALUE)
810
- isForceOverwrite=hpatch_FALSE;
811
- if (isOutputHelp||isOutputVersion){
812
- if (isOutputHelp)
813
- printUsage();//with version
814
- else
815
- printVersion();
816
- if (arg_values.empty())
817
- return 0; //ok
818
- }
819
- if (isSingleStreamDiff==_kNULL_VALUE)
820
- isSingleStreamDiff=hpatch_FALSE;
821
- #if (_IS_NEED_DIR_DIFF_PATCH)
822
- if (kMaxOpenFileNumber==_kNULL_SIZE)
823
- kMaxOpenFileNumber=kMaxOpenFileNumber_default_diff;
824
- if (kMaxOpenFileNumber<kMaxOpenFileNumber_default_min)
825
- kMaxOpenFileNumber=kMaxOpenFileNumber_default_min;
826
- #endif
827
- if (threadNum==_THREAD_NUMBER_NULL)
828
- threadNum=_THREAD_NUMBER_DEFUALT;
829
- else if (threadNum>_THREAD_NUMBER_MAX)
830
- threadNum=_THREAD_NUMBER_MAX;
831
- if (compressPlugin!=0){
832
- compressPlugin->setParallelThreadNumber(compressPlugin,(int)threadNum);
833
- }
834
-
835
- if (isOldPathInputEmpty==_kNULL_VALUE)
836
- isOldPathInputEmpty=hpatch_FALSE;
837
- _options_check((arg_values.size()==1)||(arg_values.size()==2)||(arg_values.size()==3),"input count");
838
- if (arg_values.size()==3){ //diff
839
- if (isLoadAll==_kNULL_VALUE){
840
- isLoadAll=hpatch_TRUE;
841
- matchValue=kMinSingleMatchScore_default;
842
- }
843
- if ((isDiff==hpatch_TRUE)&&(isPatchCheck==_kNULL_VALUE))
844
- isPatchCheck=hpatch_FALSE;
845
- if ((isDiff==_kNULL_VALUE)&&(isPatchCheck==hpatch_TRUE))
846
- isDiff=hpatch_FALSE;
847
- if (isDiff==_kNULL_VALUE)
848
- isDiff=hpatch_TRUE;
849
- if (isPatchCheck==_kNULL_VALUE){
850
- #if (defined(_IS_NEED_PATCH_CHECK) && (_IS_NEED_PATCH_CHECK==0))
851
- isPatchCheck=hpatch_FALSE;
852
- #else
853
- isPatchCheck=hpatch_TRUE;
854
- #endif
855
- }
856
- assert(isPatchCheck||isDiff);
857
-
858
- #if (_IS_NEED_DIR_DIFF_PATCH)
859
- if (isForceRunDirDiff==_kNULL_VALUE)
860
- isForceRunDirDiff=hpatch_FALSE;
861
- if (isSetChecksum==_kNULL_VALUE)
862
- isSetChecksum=hpatch_FALSE;
863
-
864
- if ((!manifestOld.empty())||(!manifestNew.empty())){
865
- isForceRunDirDiff=hpatch_TRUE;
866
- _options_check(manifestOut.empty()&&(!manifestNew.empty()),"-M?");
867
- if (isOldPathInputEmpty){
868
- _options_check(manifestOld.empty(),"-M?");
869
- }else{
870
- _options_check(!manifestOld.empty(),"-M?");
871
- }
872
- _options_check(ignorePathList.empty()&&ignoreOldPathList.empty()
873
- &&ignoreNewPathList.empty(),"-M can't run with -g");
874
- }
875
- #endif
876
-
877
- const char* oldPath =arg_values[0];
878
- const char* newPath =arg_values[1];
879
- const char* outDiffFileName=arg_values[2];
880
-
881
- _return_check(!hpatch_getIsSamePath(oldPath,outDiffFileName),
882
- HDIFF_PATHTYPE_ERROR,"oldPath outDiffFile same path");
883
- _return_check(!hpatch_getIsSamePath(newPath,outDiffFileName),
884
- HDIFF_PATHTYPE_ERROR,"newPath outDiffFile same path");
885
- if (!isForceOverwrite){
886
- hpatch_TPathType outDiffFileType;
887
- _return_check(hpatch_getPathStat(outDiffFileName,&outDiffFileType,0),
888
- HDIFF_PATHTYPE_ERROR,"get outDiffFile type");
889
- _return_check((outDiffFileType==kPathType_notExist)||(!isDiff),
890
- HDIFF_PATHTYPE_ERROR,"diff outDiffFile already exists, overwrite");
891
- }
892
- hpatch_TPathType oldType;
893
- hpatch_TPathType newType;
894
- if (isOldPathInputEmpty){
895
- oldType=kPathType_file; //as empty file
896
- isLoadAll=hpatch_FALSE; //not need -m, set as -s
897
- matchValue=hpatch_kStreamCacheSize; //not used
898
- }else{
899
- _return_check(hpatch_getPathStat(oldPath,&oldType,0),HDIFF_PATHTYPE_ERROR,"get oldPath type");
900
- _return_check((oldType!=kPathType_notExist),HDIFF_PATHTYPE_ERROR,"oldPath not exist");
901
- }
902
- _return_check(hpatch_getPathStat(newPath,&newType,0),HDIFF_PATHTYPE_ERROR,"get newPath type");
903
- _return_check((newType!=kPathType_notExist),HDIFF_PATHTYPE_ERROR,"newPath not exist");
904
- #if (_IS_NEED_DIR_DIFF_PATCH)
905
- hpatch_BOOL isUseDirDiff=isForceRunDirDiff||(kPathType_dir==oldType)||(kPathType_dir==newType);
906
- if (isUseDirDiff){
907
- #ifdef _ChecksumPlugin_fadler64
908
- if (isSetChecksum==hpatch_FALSE){
909
- checksumPlugin=&fadler64ChecksumPlugin; //DEFAULT
910
- isSetChecksum=hpatch_TRUE;
911
- }
912
- #else
913
- # ifdef _ChecksumPlugin_crc32
914
- if (isSetChecksum==hpatch_FALSE){
915
- checksumPlugin=&crc32ChecksumPlugin; //DEFAULT
916
- isSetChecksum=hpatch_TRUE;
917
- }
918
- # endif
919
- #endif
920
- }else
921
- {
922
- _options_check(checksumPlugin==0,"-C now only support dir diff, unsupport diff");
923
- }
924
- #endif //_IS_NEED_DIR_DIFF_PATCH
925
-
926
- #if (_IS_NEED_DIR_DIFF_PATCH)
927
- if (isUseDirDiff){
928
- return hdiff_dir(oldPath,newPath,outDiffFileName, (kPathType_dir==oldType),
929
- (kPathType_dir==newType), isDiff,isLoadAll,matchValue,isPatchCheck,
930
- compressPlugin,decompressPlugin,checksumPlugin,kMaxOpenFileNumber,
931
- ignorePathList,ignoreOldPathList,ignoreNewPathList,
932
- manifestOld,manifestNew);
933
- }else
934
- #endif
935
- {
936
- return hdiff(oldPath,newPath,outDiffFileName,isDiff,isLoadAll,matchValue,isPatchCheck,
937
- compressPlugin,decompressPlugin,isSingleStreamDiff,singleStreamStepSize);
938
- }
939
- #if (_IS_NEED_DIR_DIFF_PATCH)
940
- }else if (!manifestOut.empty()){ //() //create manifest
941
- _options_check(arg_values.size()==1,"create manifest file used one inputPath");
942
- _options_check(ignoreOldPathList.empty(),"-g-old unsupport run with create manifest file mode");
943
- _options_check(ignoreNewPathList.empty(),"-g-new unsupport run with create manifest file mode");
944
- if (isSetChecksum==_kNULL_VALUE)
945
- isSetChecksum=hpatch_FALSE;
946
- #ifdef _ChecksumPlugin_fadler64
947
- if (isSetChecksum==hpatch_FALSE){
948
- checksumPlugin=&fadler64ChecksumPlugin; //DEFAULT
949
- isSetChecksum=hpatch_TRUE;
950
- }
951
- #else
952
- # ifdef _ChecksumPlugin_crc32
953
- if (isSetChecksum==hpatch_FALSE){
954
- checksumPlugin=&crc32ChecksumPlugin; //DEFAULT
955
- isSetChecksum=hpatch_TRUE;
956
- }
957
- # endif
958
- #endif
959
-
960
- if (checksumPlugin==0) { printf("WARNING: create manifest file not set chercksum!\n\n"); }
961
- const char* inputPath =arg_values[0];
962
- if (!isForceOverwrite){
963
- hpatch_TPathType outFileType;
964
- _return_check(hpatch_getPathStat(manifestOut.c_str(),&outFileType,0),
965
- HDIFF_PATHTYPE_ERROR,"get outManifestFile type");
966
- _return_check(outFileType==kPathType_notExist,
967
- HDIFF_PATHTYPE_ERROR,"create outManifestFile already exists, overwrite");
968
- }
969
- return create_manifest(inputPath,manifestOut.c_str(),checksumPlugin,ignorePathList);
970
- #endif
971
- }else{// (arg_values.size()==2) //resave
972
- _options_check(!isOldPathInputEmpty,"can't resave, must input a diffFile");
973
- _options_check((isLoadAll==_kNULL_VALUE),"-m or -s unsupport run with resave mode");
974
- _options_check((isDiff==_kNULL_VALUE),"-d unsupport run with resave mode");
975
- _options_check((isPatchCheck==_kNULL_VALUE),"-t unsupport run with resave mode");
976
-
977
- #if (_IS_NEED_DIR_DIFF_PATCH)
978
- _options_check((isForceRunDirDiff==_kNULL_VALUE),"-D unsupport run with resave mode");
979
- _options_check((checksumPlugin==0),"-C unsupport run with resave mode");
980
- #endif
981
- const char* diffFileName =arg_values[0];
982
- const char* outDiffFileName=arg_values[1];
983
- hpatch_BOOL isDiffFile=_getIsCompressedDiffFile(diffFileName);
984
- #if (_IS_NEED_DIR_DIFF_PATCH)
985
- isDiffFile=isDiffFile || getIsDirDiffFile(diffFileName);
986
- #endif
987
- _return_check(isDiffFile,HDIFF_RESAVE_DIFFINFO_ERROR,"can't resave, input file is not diffFile");
988
- if (!isForceOverwrite){
989
- hpatch_TPathType outDiffFileType;
990
- _return_check(hpatch_getPathStat(outDiffFileName,&outDiffFileType,0),
991
- HDIFF_PATHTYPE_ERROR,"get outDiffFile type");
992
- _return_check(outDiffFileType==kPathType_notExist,
993
- HDIFF_PATHTYPE_ERROR,"resave outDiffFile already exists, overwrite");
994
- }
995
- hpatch_BOOL isSamePath=hpatch_getIsSamePath(diffFileName,outDiffFileName);
996
- if (isSamePath)
997
- _return_check(isForceOverwrite,HDIFF_PATHTYPE_ERROR,"diffFile outDiffFile same name");
998
-
999
- if (!isSamePath){
1000
- return hdiff_resave(diffFileName,outDiffFileName,compressPlugin);
1001
- }else{
1002
- // 1. resave to newDiffTempName
1003
- // 2. if resave ok then { delelte oldDiffFile; rename newDiffTempName to oldDiffName; }
1004
- // if resave error then { delelte newDiffTempName; }
1005
- char newDiffTempName[hpatch_kPathMaxSize];
1006
- _return_check(hpatch_getTempPathName(outDiffFileName,newDiffTempName,newDiffTempName+hpatch_kPathMaxSize),
1007
- HDIFF_TEMPPATH_ERROR,"getTempPathName(diffFile)");
1008
- printf("NOTE: out_diff temp file will be rename to in_diff name after resave!\n");
1009
- int result=hdiff_resave(diffFileName,newDiffTempName,compressPlugin);
1010
- if (result==0){//resave ok
1011
- _return_check(hpatch_removeFile(diffFileName),
1012
- HDIFF_DELETEPATH_ERROR,"removeFile(diffFile)");
1013
- _return_check(hpatch_renamePath(newDiffTempName,diffFileName),
1014
- HDIFF_RENAMEPATH_ERROR,"renamePath(temp,diffFile)");
1015
- printf("out_diff temp file renamed to in_diff name!\n");
1016
- }else{//resave error
1017
- if (!hpatch_removeFile(newDiffTempName)){
1018
- printf("WARNING: can't remove temp file \"");
1019
- hpatch_printPath_utf8(newDiffTempName); printf("\"\n");
1020
- }
1021
- }
1022
- return result;
1023
- }
1024
- }
1025
- }
1026
-
1027
- #define _check_readFile(value) { if (!(value)) { hpatch_TFileStreamInput_close(&file); return hpatch_FALSE; } }
1028
- static hpatch_BOOL readFileAll(hdiff_private::TAutoMem& out_mem,const char* fileName){
1029
- size_t dataSize;
1030
- hpatch_TFileStreamInput file;
1031
- hpatch_TFileStreamInput_init(&file);
1032
- _check_readFile(hpatch_TFileStreamInput_open(&file,fileName));
1033
- dataSize=(size_t)file.base.streamSize;
1034
- _check_readFile(dataSize==file.base.streamSize);
1035
- try {
1036
- out_mem.realloc(dataSize);
1037
- } catch (...) {
1038
- _check_readFile(false);
1039
- }
1040
- _check_readFile(file.base.read(&file.base,0,out_mem.data(),out_mem.data_end()));
1041
- return hpatch_TFileStreamInput_close(&file);
1042
- }
1043
-
1044
- #define _check_writeFile(value) { if (!(value)) { hpatch_TFileStreamOutput_close(&file); return hpatch_FALSE; } }
1045
- static hpatch_BOOL writeFileAll(const TByte* pdata,size_t dataSize,const char* outFileName){
1046
- hpatch_TFileStreamOutput file;
1047
- hpatch_TFileStreamOutput_init(&file);
1048
- _check_writeFile(hpatch_TFileStreamOutput_open(&file,outFileName,dataSize));
1049
- _check_writeFile(file.base.write(&file.base,0,pdata,pdata+dataSize));
1050
- return hpatch_TFileStreamOutput_close(&file);
1051
- }
1052
-
1053
- #define _check_on_error(errorType) { \
1054
- if (result==HDIFF_SUCCESS) result=errorType; if (!_isInClear){ goto clear; } }
1055
- #define check(value,errorType,errorInfo) { \
1056
- std::string erri=std::string()+errorInfo+" ERROR!\n"; \
1057
- if (!(value)){ hpatch_printStdErrPath_utf8(erri.c_str()); _check_on_error(errorType); } }
1058
-
1059
- static int hdiff_mem(const char* oldFileName,const char* newFileName,const char* outDiffFileName,
1060
- hpatch_BOOL isDiff,size_t matchScore,hpatch_BOOL isPatchCheck,
1061
- const hdiff_TCompress* compressPlugin,hpatch_TDecompress* decompressPlugin,
1062
- hpatch_BOOL isSingleStreamDiff,size_t singleStreamStepSize){
1063
- double diff_time0=clock_s();
1064
- int result=HDIFF_SUCCESS;
1065
- int _isInClear=hpatch_FALSE;
1066
- hdiff_private::TAutoMem oldMem(0);
1067
- hdiff_private::TAutoMem newMem(0);
1068
- check(readFileAll(oldMem,oldFileName),HDIFF_OPENREAD_ERROR,"open oldFile");
1069
- check(readFileAll(newMem,newFileName),HDIFF_OPENREAD_ERROR,"open newFile");
1070
- printf("oldDataSize : %" PRIu64 "\nnewDataSize : %" PRIu64 "\n",
1071
- (hpatch_StreamPos_t)oldMem.size(),(hpatch_StreamPos_t)newMem.size());
1072
- if (isDiff){
1073
- std::vector<TByte> outDiffData;
1074
- try {
1075
- #if (_IS_NEED_SINGLE_STREAM_DIFF)
1076
- if (isSingleStreamDiff){
1077
- printf("create single compressed stream diffData!\n");
1078
- create_single_compressed_diff(newMem.data(),newMem.data_end(),oldMem.data(),oldMem.data_end(),
1079
- outDiffData,0,compressPlugin,(int)matchScore,singleStreamStepSize);
1080
- }else
1081
- #endif
1082
- create_compressed_diff(newMem.data(),newMem.data_end(),oldMem.data(),oldMem.data_end(),
1083
- outDiffData,compressPlugin,(int)matchScore);
1084
- }catch(const std::exception& e){
1085
- check(false,HDIFF_DIFF_ERROR,"diff run an error: "+e.what());
1086
- }
1087
- printf("diffDataSize: %" PRIu64 "\n",(hpatch_StreamPos_t)outDiffData.size());
1088
- check(writeFileAll(outDiffData.data(),outDiffData.size(),outDiffFileName),
1089
- HDIFF_OPENWRITE_ERROR,"open write diffFile");
1090
- printf("diff time: %.3f s\n",(clock_s()-diff_time0));
1091
- printf(" out diff file ok!\n");
1092
- outDiffData.clear();
1093
- }
1094
- if (isPatchCheck){
1095
- isSingleStreamDiff=hpatch_FALSE;
1096
- hdiff_private::TAutoMem diffMem(0);
1097
- double patch_time0=clock_s();
1098
- printf("\nload diffFile for test by patch:\n");
1099
- check(readFileAll(diffMem,outDiffFileName),
1100
- HDIFF_OPENREAD_ERROR,"open diffFile for test");
1101
- printf("diffDataSize: %" PRIu64 "\n",(hpatch_StreamPos_t)diffMem.size());
1102
-
1103
- bool diffrt;
1104
- {
1105
- hpatch_TDecompress* saved_decompressPlugin=0;
1106
- {
1107
- hpatch_compressedDiffInfo diffinfo;
1108
- if (!getCompressedDiffInfo_mem(&diffinfo,diffMem.data(),diffMem.data_end())){
1109
- #if (_IS_NEED_SINGLE_STREAM_DIFF)
1110
- hpatch_singleCompressedDiffInfo sdiffInfo;
1111
- if (getSingleCompressedDiffInfo_mem(&sdiffInfo,diffMem.data(),diffMem.data_end())){
1112
- memcpy(diffinfo.compressType,sdiffInfo.compressType,strlen(sdiffInfo.compressType)+1);
1113
- isSingleStreamDiff=hpatch_TRUE;
1114
- if (!isDiff)
1115
- printf("test single compressed stream diffData!\n");
1116
- }else
1117
- #endif
1118
- check(hpatch_FALSE,HDIFF_PATCH_ERROR,"get diff info");
1119
- }
1120
- check(findDecompress(&saved_decompressPlugin,diffinfo.compressType),
1121
- HDIFF_PATCH_ERROR,"diff data saved compress type");
1122
- }
1123
- #if (_IS_NEED_SINGLE_STREAM_DIFF)
1124
- if (isSingleStreamDiff){
1125
- diffrt=check_single_compressed_diff(newMem.data(),newMem.data_end(),oldMem.data(),oldMem.data_end(),
1126
- diffMem.data(),diffMem.data_end(),saved_decompressPlugin);
1127
- }else
1128
- #endif
1129
- diffrt=check_compressed_diff(newMem.data(),newMem.data_end(),oldMem.data(),oldMem.data_end(),
1130
- diffMem.data(),diffMem.data_end(),saved_decompressPlugin);
1131
- }
1132
- check(diffrt,HDIFF_PATCH_ERROR,"patch check diff data");
1133
- printf("patch time: %.3f s\n",(clock_s()-patch_time0));
1134
- printf(" patch check diff data ok!\n");
1135
- }
1136
- clear:
1137
- _isInClear=hpatch_TRUE;
1138
- return result;
1139
- }
1140
-
1141
- static int hdiff_stream(const char* oldFileName,const char* newFileName,const char* outDiffFileName,
1142
- hpatch_BOOL isDiff,size_t matchBlockSize,hpatch_BOOL isPatchCheck,
1143
- const hdiff_TCompress* compressPlugin,hpatch_TDecompress* decompressPlugin){
1144
- double diff_time0=clock_s();
1145
- int result=HDIFF_SUCCESS;
1146
- int _isInClear=hpatch_FALSE;
1147
- hpatch_TFileStreamInput oldData;
1148
- hpatch_TFileStreamInput newData;
1149
- hpatch_TFileStreamOutput diffData_out;
1150
- hpatch_TFileStreamInput diffData_in;
1151
- hpatch_TFileStreamInput_init(&oldData);
1152
- hpatch_TFileStreamInput_init(&newData);
1153
- hpatch_TFileStreamOutput_init(&diffData_out);
1154
- hpatch_TFileStreamInput_init(&diffData_in);
1155
-
1156
- if (0==strcmp(oldFileName,"")){ // isOldPathInputEmpty
1157
- mem_as_hStreamInput(&oldData.base,0,0);
1158
- }else{
1159
- check(hpatch_TFileStreamInput_open(&oldData,oldFileName),HDIFF_OPENREAD_ERROR,"open oldFile");
1160
- }
1161
- check(hpatch_TFileStreamInput_open(&newData,newFileName),HDIFF_OPENREAD_ERROR,"open newFile");
1162
- printf("oldDataSize : %" PRIu64 "\nnewDataSize : %" PRIu64 "\n",
1163
- oldData.base.streamSize,newData.base.streamSize);
1164
- if (isDiff){
1165
- check(hpatch_TFileStreamOutput_open(&diffData_out,outDiffFileName,~(hpatch_StreamPos_t)0),
1166
- HDIFF_OPENWRITE_ERROR,"open out diffFile");
1167
- hpatch_TFileStreamOutput_setRandomOut(&diffData_out,hpatch_TRUE);
1168
- try{
1169
- create_compressed_diff_stream(&newData.base,&oldData.base, &diffData_out.base,
1170
- compressPlugin,matchBlockSize);
1171
- diffData_out.base.streamSize=diffData_out.out_length;
1172
- }catch(const std::exception& e){
1173
- check(false,HDIFF_DIFF_ERROR,"stream diff run an error: "+e.what());
1174
- }
1175
- check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
1176
- printf("diffDataSize: %" PRIu64 "\n",diffData_out.base.streamSize);
1177
- printf("diff time: %.3f s\n",(clock_s()-diff_time0));
1178
- printf(" out diff file ok!\n");
1179
- }
1180
- if (isPatchCheck){
1181
- double patch_time0=clock_s();
1182
- printf("\nload diffFile for test by patch check:\n");
1183
- check(hpatch_TFileStreamInput_open(&diffData_in,outDiffFileName),HDIFF_OPENREAD_ERROR,"open check diffFile");
1184
- printf("diffDataSize: %" PRIu64 "\n",diffData_in.base.streamSize);
1185
-
1186
- hpatch_TDecompress* saved_decompressPlugin=0;
1187
- {
1188
- hpatch_compressedDiffInfo diffinfo;
1189
- check(getCompressedDiffInfo(&diffinfo,&diffData_in.base),HDIFF_PATCH_ERROR,"get diff info");
1190
- check(findDecompress(&saved_decompressPlugin,diffinfo.compressType),
1191
- HDIFF_PATCH_ERROR,"diff data saved compress type");
1192
- }
1193
- check(check_compressed_diff_stream(&newData.base,&oldData.base,
1194
- &diffData_in.base,saved_decompressPlugin),
1195
- HDIFF_PATCH_ERROR,"patch check diff data");
1196
- printf("patch time: %.3f s\n",(clock_s()-patch_time0));
1197
- printf(" patch check diff data ok!\n");
1198
- }
1199
- clear:
1200
- _isInClear=hpatch_TRUE;
1201
- check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
1202
- check(hpatch_TFileStreamInput_close(&diffData_in),HDIFF_FILECLOSE_ERROR,"in diffFile close");
1203
- check(hpatch_TFileStreamInput_close(&newData),HDIFF_FILECLOSE_ERROR,"newFile close");
1204
- check(hpatch_TFileStreamInput_close(&oldData),HDIFF_FILECLOSE_ERROR,"oldFile close");
1205
- return result;
1206
- }
1207
-
1208
- int hdiff(const char* oldFileName,const char* newFileName,const char* outDiffFileName,hpatch_BOOL isDiff,
1209
- hpatch_BOOL isLoadAll,size_t matchValue,hpatch_BOOL isPatchCheck,
1210
- const hdiff_TCompress* compressPlugin,hpatch_TDecompress* decompressPlugin,
1211
- hpatch_BOOL isSingleStreamDiff,size_t singleStreamStepSize){
1212
- double time0=clock_s();
1213
- std::string fnameInfo=std::string("old : \"")+oldFileName+"\"\n"
1214
- +"new : \""+newFileName+"\"\n"
1215
- +(isDiff?"out : \"":"test: \"")+outDiffFileName+"\"\n";
1216
- hpatch_printPath_utf8(fnameInfo.c_str());
1217
-
1218
- if (isDiff) {
1219
- const char* compressType="";
1220
- if (compressPlugin) compressType=compressPlugin->compressType();
1221
- printf("hdiffz run with compress plugin: \"%s\"\n",compressType);
1222
- }
1223
-
1224
- int exitCode;
1225
- if (isLoadAll){
1226
- exitCode=hdiff_mem(oldFileName,newFileName,outDiffFileName,isDiff,matchValue,isPatchCheck,
1227
- compressPlugin,decompressPlugin,isSingleStreamDiff,singleStreamStepSize);
1228
- }else{
1229
- assert(!isSingleStreamDiff); //now not support
1230
- exitCode=hdiff_stream(oldFileName,newFileName,outDiffFileName,
1231
- isDiff,matchValue,isPatchCheck,compressPlugin,decompressPlugin);
1232
- }
1233
- if (isDiff && isPatchCheck)
1234
- printf("\nall time: %.3f s\n",(clock_s()-time0));
1235
- return exitCode;
1236
- }
1237
-
1238
- int hdiff_resave(const char* diffFileName,const char* outDiffFileName,
1239
- const hdiff_TCompress* compressPlugin){
1240
- double time0=clock_s();
1241
- std::string fnameInfo=std::string("in_diff : \"")+diffFileName+"\"\n"
1242
- +"out_diff: \""+outDiffFileName+"\"\n";
1243
- hpatch_printPath_utf8(fnameInfo.c_str());
1244
-
1245
- int result=HDIFF_SUCCESS;
1246
- hpatch_BOOL _isInClear=hpatch_FALSE;
1247
- hpatch_BOOL isDirDiff=false;
1248
- #if (_IS_NEED_DIR_DIFF_PATCH)
1249
- std::string dirCompressType;
1250
- TDirDiffInfo dirDiffInfo;
1251
- hpatch_TChecksum* checksumPlugin=0;
1252
- #endif
1253
- hpatch_TFileStreamInput diffData_in;
1254
- hpatch_TFileStreamOutput diffData_out;
1255
- hpatch_TFileStreamInput_init(&diffData_in);
1256
- hpatch_TFileStreamOutput_init(&diffData_out);
1257
-
1258
- hpatch_TDecompress* decompressPlugin=0;
1259
- check(hpatch_TFileStreamInput_open(&diffData_in,diffFileName),HDIFF_OPENREAD_ERROR,"open diffFile");
1260
- #if (_IS_NEED_DIR_DIFF_PATCH)
1261
- check(getDirDiffInfo(&diffData_in.base,&dirDiffInfo),HDIFF_OPENREAD_ERROR,"read diffFile");
1262
- isDirDiff=dirDiffInfo.isDirDiff;
1263
- #endif
1264
- { //decompressPlugin
1265
- hpatch_compressedDiffInfo diffInfo;
1266
- #if (_IS_NEED_DIR_DIFF_PATCH)
1267
- if (isDirDiff){
1268
- diffInfo=dirDiffInfo.hdiffInfo;
1269
- diffInfo.compressedCount+=dirDiffInfo.dirDataIsCompressed?1:0;
1270
- }else
1271
- #endif
1272
- if (!getCompressedDiffInfo(&diffInfo,&diffData_in.base)){
1273
- check(!diffData_in.fileError,HDIFF_RESAVE_FILEREAD_ERROR,"read diffFile");
1274
- check(hpatch_FALSE,HDIFF_RESAVE_DIFFINFO_ERROR,"is hdiff file? get diff info");
1275
- }
1276
- findDecompress(&decompressPlugin,diffInfo.compressType);
1277
- if (decompressPlugin==0){
1278
- if (diffInfo.compressedCount>0){
1279
- check(false,HDIFF_RESAVE_COMPRESSTYPE_ERROR,
1280
- "can no decompress \""+diffInfo.compressType+" data");
1281
- }else{
1282
- if (strlen(diffInfo.compressType)>0)
1283
- printf(" diffFile added useless compress tag \"%s\"\n",diffInfo.compressType);
1284
- decompressPlugin=0;
1285
- }
1286
- }else{
1287
- printf("resave %s with decompress plugin: \"%s\" (need decompress %d)\n",(isDirDiff?"dirDiffFile":"diffFile"),diffInfo.compressType,diffInfo.compressedCount);
1288
- }
1289
- }
1290
- {
1291
- const char* compressType="";
1292
- if (compressPlugin) compressType=compressPlugin->compressType();
1293
- printf("resave %s with compress plugin: \"%s\"\n",
1294
- (isDirDiff?"dirDiffFile":"diffFile"),compressType);
1295
- }
1296
- #if (_IS_NEED_DIR_DIFF_PATCH)
1297
- if (isDirDiff){ //checksumPlugin
1298
- if (strlen(dirDiffInfo.checksumType)>0){
1299
- check(findChecksum(&checksumPlugin,dirDiffInfo.checksumType), HDIFF_RESAVE_CHECKSUMTYPE_ERROR,
1300
- "not found checksum plugin dirDiffFile used: \""+dirDiffInfo.checksumType+"\"\n");
1301
- check(checksumPlugin->checksumByteSize()==dirDiffInfo.checksumByteSize,HDIFF_RESAVE_CHECKSUMTYPE_ERROR,
1302
- "found checksum plugin not same as dirDiffFile used: \""+dirDiffInfo.checksumType+"\"\n");
1303
- }
1304
- printf("resave dirDiffFile with checksum plugin: \"%s\"\n",dirDiffInfo.checksumType);
1305
- }
1306
- #endif
1307
-
1308
- check(hpatch_TFileStreamOutput_open(&diffData_out,outDiffFileName,~(hpatch_StreamPos_t)0),HDIFF_OPENWRITE_ERROR,
1309
- "open out diffFile");
1310
- hpatch_TFileStreamOutput_setRandomOut(&diffData_out,hpatch_TRUE);
1311
- printf("inDiffSize : %" PRIu64 "\n",diffData_in.base.streamSize);
1312
- try{
1313
- #if (_IS_NEED_DIR_DIFF_PATCH)
1314
- if (isDirDiff){
1315
- resave_dirdiff(&diffData_in.base,decompressPlugin,
1316
- &diffData_out.base,compressPlugin,checksumPlugin);
1317
- }else
1318
- #endif
1319
- {
1320
- #if (_IS_NEED_DIR_DIFF_PATCH)
1321
- _options_check(checksumPlugin==0,"-C now only support dir diff, unsupport diff");
1322
- #endif
1323
- resave_compressed_diff(&diffData_in.base,decompressPlugin,
1324
- &diffData_out.base,compressPlugin);
1325
- }
1326
- diffData_out.base.streamSize=diffData_out.out_length;
1327
- }catch(const std::exception& e){
1328
- check(false,HDIFF_RESAVE_ERROR,"resave diff run an error: "+e.what());
1329
- }
1330
- printf("outDiffSize: %" PRIu64 "\n",diffData_out.base.streamSize);
1331
- check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
1332
- printf(" out diff file ok!\n");
1333
-
1334
- printf("\nhdiffz resave diffFile time: %.3f s\n",(clock_s()-time0));
1335
- clear:
1336
- _isInClear=hpatch_TRUE;
1337
- check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
1338
- check(hpatch_TFileStreamInput_close(&diffData_in),HDIFF_FILECLOSE_ERROR,"in diffFile close");
1339
- return result;
1340
- }
1341
-
1342
-
1343
- #if (_IS_NEED_DIR_DIFF_PATCH)
1344
-
1345
- struct DirPathIgnoreListener:public CDirPathIgnore,IDirPathIgnore{
1346
- DirPathIgnoreListener(const std::vector<std::string>& ignorePathListBase,
1347
- const std::vector<std::string>& ignorePathList,bool isPrintIgnore=true)
1348
- :CDirPathIgnore(ignorePathListBase,ignorePathList,isPrintIgnore){}
1349
- //IDirPathIgnore
1350
- virtual bool isNeedIgnore(const std::string& path,size_t rootPathNameLen){
1351
- return CDirPathIgnore::isNeedIgnore(path,rootPathNameLen);
1352
- }
1353
- };
1354
-
1355
- struct DirDiffListener:public IDirDiffListener{
1356
- virtual bool isExecuteFile(const std::string& fileName) {
1357
- bool result= 0!=hpatch_getIsExecuteFile(fileName.c_str());
1358
- if (result){
1359
- std::string info=" got new file Execute tag:\""+fileName+"\"\n";
1360
- hpatch_printPath_utf8(info.c_str());
1361
- }
1362
- return result;
1363
- }
1364
- virtual void diffRefInfo(size_t oldPathCount,size_t newPathCount,size_t sameFilePairCount,
1365
- hpatch_StreamPos_t sameFileSize,size_t refOldFileCount,size_t refNewFileCount,
1366
- hpatch_StreamPos_t refOldFileSize,hpatch_StreamPos_t refNewFileSize){
1367
- printf("\n");
1368
- printf("DirDiff old path count: %" PRIu64 "\n",(hpatch_StreamPos_t)oldPathCount);
1369
- printf(" new path count: %" PRIu64 " (fileCount:%" PRIu64 ")\n",
1370
- (hpatch_StreamPos_t)newPathCount,(hpatch_StreamPos_t)(sameFilePairCount+refNewFileCount));
1371
- printf(" same file count: %" PRIu64 " (dataSize: %" PRIu64 ")\n",
1372
- (hpatch_StreamPos_t)sameFilePairCount,sameFileSize);
1373
- printf(" ref old file count: %" PRIu64 "\n",(hpatch_StreamPos_t)refOldFileCount);
1374
- printf(" diff new file count: %" PRIu64 "\n",(hpatch_StreamPos_t)refNewFileCount);
1375
- printf("\nrun hdiffz:\n");
1376
- printf(" oldRefSize : %" PRIu64 "\n",refOldFileSize);
1377
- printf(" newRefSize : %" PRIu64 " (all newSize: %" PRIu64 ")\n",refNewFileSize,refNewFileSize+sameFileSize);
1378
- }
1379
-
1380
- double _runHDiffBegin_time0;
1381
- virtual void runHDiffBegin(){ _runHDiffBegin_time0=clock_s(); }
1382
- virtual void runHDiffEnd(hpatch_StreamPos_t diffDataSize){
1383
- printf(" diffDataSize: %" PRIu64 "\n",diffDataSize);
1384
- printf(" diff time: %.3f s\n",clock_s()-_runHDiffBegin_time0);
1385
- }
1386
- };
1387
-
1388
- static void check_manifest(TManifest& out_manifest,const std::string& rootPath,const std::string& manifestFileName){
1389
- TManifestSaved manifest;
1390
- load_manifestFile(manifest,rootPath,manifestFileName);
1391
- hpatch_TChecksum* checksumPlugin=0;
1392
- findChecksum(&checksumPlugin,manifest.checksumType.c_str());
1393
- checksum_manifest(manifest,checksumPlugin);
1394
- out_manifest.rootPath.swap(manifest.rootPath);
1395
- out_manifest.pathList.swap(manifest.pathList);
1396
- }
1397
-
1398
- int hdiff_dir(const char* _oldPath,const char* _newPath,const char* outDiffFileName,
1399
- hpatch_BOOL oldIsDir, hpatch_BOOL newIsDir,
1400
- hpatch_BOOL isDiff,hpatch_BOOL isLoadAll,size_t matchValue,hpatch_BOOL isPatchCheck,
1401
- const hdiff_TCompress* compressPlugin,hpatch_TDecompress* decompressPlugin,
1402
- hpatch_TChecksum* checksumPlugin,size_t kMaxOpenFileNumber,
1403
- const std::vector<std::string>& ignorePathListBase,const std::vector<std::string>& ignoreOldPathList,
1404
- const std::vector<std::string>& ignoreNewPathList,
1405
- const std::string& oldManifestFileName,const std::string& newManifestFileName){
1406
- double time0=clock_s();
1407
- std::string oldPath(_oldPath);
1408
- std::string newPath(_newPath);
1409
- if (oldIsDir) assignDirTag(oldPath); else assert(!hpatch_getIsDirName(oldPath.c_str()));
1410
- if (newIsDir) assignDirTag(newPath); else assert(!hpatch_getIsDirName(newPath.c_str()));
1411
- std::string fnameInfo=std::string("")
1412
- +(oldIsDir?"oldDir : \"":"oldFile: \"")+oldPath+"\"\n"
1413
- +(newIsDir?"newDir : \"":"newFile: \"")+newPath+"\"\n"
1414
- +(isDiff? "outDiff: \"":" test : \"")+outDiffFileName+"\"\n";
1415
- hpatch_printPath_utf8(fnameInfo.c_str());
1416
-
1417
- bool isManifest= (!newManifestFileName.empty());
1418
- if (isDiff) {
1419
- const char* checksumType="";
1420
- const char* compressType="";
1421
- if (checksumPlugin)
1422
- checksumType=checksumPlugin->checksumType();
1423
- if (compressPlugin) compressType=compressPlugin->compressType();
1424
- printf("hdiffz run %sdir diff with compress plugin: \"%s\"\n",isManifest?"manifest ":"",compressType);
1425
- printf("hdiffz run %sdir diff with checksum plugin: \"%s\"\n",isManifest?"manifest ":"",checksumType);
1426
- }
1427
- printf("\n");
1428
-
1429
- int result=HDIFF_SUCCESS;
1430
- bool _isInClear=false;
1431
- hpatch_TFileStreamOutput diffData_out;
1432
- hpatch_TFileStreamInput diffData_in;
1433
- hpatch_TFileStreamOutput_init(&diffData_out);
1434
- hpatch_TFileStreamInput_init(&diffData_in);
1435
-
1436
- TManifest oldManifest;
1437
- TManifest newManifest;
1438
- if (isManifest){
1439
- double check_time0=clock_s();
1440
- try {
1441
- if (!oldPath.empty())// isOldPathInputEmpty
1442
- check_manifest(oldManifest,oldPath,oldManifestFileName);
1443
- check_manifest(newManifest,newPath,newManifestFileName);
1444
- }catch(const std::exception& e){
1445
- check(false,MANIFEST_TEST_ERROR,"check by manifest found an error: "+e.what());
1446
- }
1447
- printf("check manifest time: %.3f s\n",(clock_s()-check_time0));
1448
- printf(" check path datas by manifest ok!\n\n");
1449
- }else{
1450
- DirPathIgnoreListener oldDirPathIgnore(ignorePathListBase,ignoreOldPathList);
1451
- DirPathIgnoreListener newDirPathIgnore(ignorePathListBase,ignoreNewPathList);
1452
- get_manifest(&oldDirPathIgnore,oldPath,oldManifest);
1453
- get_manifest(&newDirPathIgnore,newPath,newManifest);
1454
- }
1455
-
1456
- if (isDiff){
1457
- double diff_time0=clock_s();
1458
- try {
1459
- check(hpatch_TFileStreamOutput_open(&diffData_out,outDiffFileName,~(hpatch_StreamPos_t)0),
1460
- HDIFF_OPENWRITE_ERROR,"open out diffFile");
1461
- hpatch_TFileStreamOutput_setRandomOut(&diffData_out,hpatch_TRUE);
1462
- DirDiffListener listener;
1463
- dir_diff(&listener,oldManifest,newManifest,&diffData_out.base,isLoadAll!=0,matchValue,
1464
- compressPlugin,checksumPlugin,kMaxOpenFileNumber);
1465
- diffData_out.base.streamSize=diffData_out.out_length;
1466
- }catch(const std::exception& e){
1467
- check(false,DIRDIFF_DIFF_ERROR,"dir diff run an error: "+e.what());
1468
- }
1469
- printf("\ndiffDataSize : %" PRIu64 "\n",diffData_out.base.streamSize);
1470
- printf("dir diff time: %.3f s\n",(clock_s()-diff_time0));
1471
- check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
1472
- printf(" out dirDiffFile ok!\n");
1473
- }
1474
- if (isPatchCheck){
1475
- double patch_time0=clock_s();
1476
- printf("\nload %sdirDiffFile for test by patch check:\n",isManifest?"manifest ":"");
1477
- check(hpatch_TFileStreamInput_open(&diffData_in,outDiffFileName),
1478
- HDIFF_OPENREAD_ERROR,"open check diffFile");
1479
- printf("diffDataSize : %" PRIu64 "\n",diffData_in.base.streamSize);
1480
- hpatch_TDecompress* saved_decompressPlugin=0;
1481
- hpatch_TChecksum* saved_checksumPlugin=0;
1482
- {
1483
- TDirDiffInfo dirinfo;
1484
- check(getDirDiffInfo(&diffData_in.base,&dirinfo),DIRDIFF_PATCH_ERROR,"get dir diff info");
1485
- check(dirinfo.isDirDiff,DIRDIFF_PATCH_ERROR,"dir diffFile data");
1486
- findDecompress(&saved_decompressPlugin,dirinfo.hdiffInfo.compressType);
1487
- findChecksum(&saved_checksumPlugin,dirinfo.checksumType);
1488
- }
1489
- //check(check_dirOldDataChecksum(oldPath.c_str(),&diffData_in.base,
1490
- // saved_decompressPlugin,saved_checksumPlugin),
1491
- // DIRDIFF_PATCH_ERROR,"part diff data check_dirOldDataChecksum");
1492
- DirDiffListener listener;
1493
- check(check_dirdiff(&listener,oldManifest,newManifest,&diffData_in.base,
1494
- saved_decompressPlugin,saved_checksumPlugin,kMaxOpenFileNumber),
1495
- DIRDIFF_PATCH_ERROR,"dir patch check diff data");
1496
-
1497
- printf("dir patch time: %.3f s\n",(clock_s()-patch_time0));
1498
- printf(" patch check diff data ok!\n");
1499
- }
1500
-
1501
- printf("\nall time: %.3f s\n",(clock_s()-time0));
1502
- clear:
1503
- _isInClear=true;
1504
- check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
1505
- check(hpatch_TFileStreamInput_close(&diffData_in),HDIFF_FILECLOSE_ERROR,"in diffFile close");
1506
- return result;
1507
- }
1508
-
1509
- int create_manifest(const char* _inputPath,const char* outManifestFileName,
1510
- hpatch_TChecksum* checksumPlugin,const std::vector<std::string>& ignorePathList){
1511
- double time0=clock_s();
1512
- int result=HDIFF_SUCCESS;
1513
- bool _isInClear=false;
1514
- std::string inputPath(_inputPath);
1515
- {
1516
- hpatch_TPathType inputType;
1517
- check(hpatch_getPathStat(_inputPath,&inputType,0),HDIFF_PATHTYPE_ERROR,"get inputPath type");
1518
- check((inputType!=kPathType_notExist),HDIFF_PATHTYPE_ERROR,"inputPath not exist");
1519
- hpatch_BOOL inputIsDir=(inputType==kPathType_dir);
1520
- if (inputIsDir) assignDirTag(inputPath);
1521
- std::string fnameInfo=std::string("")
1522
- +(inputIsDir? "inputDir : \"":"inputFile: \"")+inputPath+"\"\n"
1523
- + "outManifest: \""+outManifestFileName+"\"\n";
1524
- hpatch_printPath_utf8(fnameInfo.c_str());
1525
- }
1526
- {
1527
- const char* checksumType="";
1528
- if (checksumPlugin) checksumType=checksumPlugin->checksumType();
1529
- printf("hdiffz run create Manifest with checksum plugin: \"%s\"\n",checksumType);
1530
- printf("\n");
1531
- }
1532
-
1533
- hpatch_TFileStreamOutput manifestData_out;
1534
- hpatch_TFileStreamOutput_init(&manifestData_out);
1535
- {//create
1536
- try {
1537
- std::vector<std::string> emptyPathList;
1538
- check(hpatch_TFileStreamOutput_open(&manifestData_out,outManifestFileName,~(hpatch_StreamPos_t)0),
1539
- HDIFF_OPENWRITE_ERROR,"open out manifestFile");
1540
- //hpatch_TFileStreamOutput_setRandomOut(&manifestData_out,hpatch_TRUE);
1541
- DirPathIgnoreListener dirPathIgnore(ignorePathList,emptyPathList);
1542
- save_manifest(&dirPathIgnore,inputPath,&manifestData_out.base,checksumPlugin);
1543
- manifestData_out.base.streamSize=manifestData_out.out_length;
1544
- }catch(const std::exception& e){
1545
- check(false,MANIFEST_CREATE_ERROR,"create manifest run an error: "+e.what());
1546
- }
1547
- printf("\nManifestFile size: %" PRIu64 "\n",manifestData_out.base.streamSize);
1548
- check(hpatch_TFileStreamOutput_close(&manifestData_out),HDIFF_FILECLOSE_ERROR,"check manifestFile close");
1549
- printf(" out manifestFile ok!\n");
1550
- printf("create manifest time: %.3f s\n",(clock_s()-time0));
1551
- }
1552
- {//test
1553
- double time1=clock_s();
1554
- TManifest manifest;
1555
- try {
1556
- check_manifest(manifest,inputPath,outManifestFileName);
1557
- }catch(const std::exception& e){
1558
- check(false,MANIFEST_TEST_ERROR,"test manifestFile found an error: "+e.what());
1559
- }
1560
- printf(" test manifestFile ok!\n");
1561
- printf("test manifest time: %.3f s\n",(clock_s()-time1));
1562
- }
1563
-
1564
- printf("\nall time: %.3f s\n",(clock_s()-time0));
1565
- clear:
1566
- _isInClear=true;
1567
- check(hpatch_TFileStreamOutput_close(&manifestData_out),HDIFF_FILECLOSE_ERROR,"check manifestFile close");
1568
- return result;
1569
- }
1570
- #endif //_IS_NEED_DIR_DIFF_PATCH