react-native-update 10.34.2 → 10.34.3

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 (908) hide show
  1. package/.gitmodules +4 -4
  2. package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +291 -0
  3. package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +48 -0
  4. package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +473 -0
  5. package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +552 -0
  6. package/harmony/pushy/src/main/cpp/HDiffPatch/README_cn.md +547 -0
  7. package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +127 -0
  8. package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +59 -0
  9. package/harmony/pushy/src/main/cpp/HDiffPatch/_dir_ignore.h +191 -0
  10. package/harmony/pushy/src/main/cpp/HDiffPatch/_hextobytes.h +112 -0
  11. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +389 -0
  12. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +73 -0
  13. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +266 -0
  14. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +58 -0
  15. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +190 -0
  16. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +8 -0
  17. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +1 -0
  18. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +1 -0
  19. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +1 -0
  20. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +1 -0
  21. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +49 -0
  22. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +31 -0
  23. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +38 -0
  24. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +26 -0
  25. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +155 -0
  26. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +364 -0
  27. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +348 -0
  28. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/bzip2.vcxproj +228 -0
  29. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/hpatchz_test.vcxproj +215 -0
  30. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/libdeflate.vcxproj +256 -0
  31. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/longPathAware.exe.manifest +7 -0
  32. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/lzma.vcxproj +271 -0
  33. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/testHashClash.vcxproj +228 -0
  34. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +296 -0
  35. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zlib.vcxproj +242 -0
  36. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zstd.vcxproj +287 -0
  37. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +39 -0
  38. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  39. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  40. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +447 -0
  41. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +703 -0
  42. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +463 -0
  43. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +286 -0
  44. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +268 -0
  45. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +585 -0
  46. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +301 -0
  47. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +591 -0
  48. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +308 -0
  49. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +524 -0
  50. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +33 -0
  51. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +33 -0
  52. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +774 -0
  53. package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +799 -0
  54. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +201 -0
  55. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +59 -0
  56. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +1526 -0
  57. package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +1637 -0
  58. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +846 -0
  59. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +79 -0
  60. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +339 -0
  61. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +190 -0
  62. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +339 -0
  63. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +87 -0
  64. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +43 -0
  65. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +836 -0
  66. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +246 -0
  67. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +47 -0
  68. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +112 -0
  69. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +69 -0
  70. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +65 -0
  71. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +346 -0
  72. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +149 -0
  73. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +176 -0
  74. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +84 -0
  75. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +146 -0
  76. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +61 -0
  77. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +152 -0
  78. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +76 -0
  79. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +735 -0
  80. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +240 -0
  81. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +1971 -0
  82. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.c +31 -0
  83. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.h +42 -0
  84. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +307 -0
  85. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +1786 -0
  86. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +1746 -0
  87. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +201 -0
  88. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +74 -0
  89. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +187 -0
  90. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +478 -0
  91. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.h +222 -0
  92. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +383 -0
  93. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +73 -0
  94. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +184 -0
  95. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +88 -0
  96. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +89 -0
  97. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +325 -0
  98. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.cpp +10 -0
  99. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +97 -0
  100. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +14 -0
  101. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +108 -0
  102. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +186 -0
  103. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +780 -0
  104. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +579 -0
  105. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +415 -0
  106. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +144 -0
  107. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +164 -0
  108. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +148 -0
  109. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +769 -0
  110. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +97 -0
  111. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +954 -0
  112. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +299 -0
  113. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.cpp +168 -0
  114. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.h +44 -0
  115. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +72 -0
  116. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +130 -0
  117. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +125 -0
  118. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +428 -0
  119. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +133 -0
  120. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +52 -0
  121. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.c +243 -0
  122. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.h +51 -0
  123. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.c +153 -0
  124. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.h +54 -0
  125. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.c +158 -0
  126. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.h +49 -0
  127. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.c +294 -0
  128. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.h +59 -0
  129. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_patch_private_mt.h +217 -0
  130. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.c +349 -0
  131. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.h +110 -0
  132. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +2643 -0
  133. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +253 -0
  134. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +245 -0
  135. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +361 -0
  136. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +366 -0
  137. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +91 -0
  138. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +31 -0
  139. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +106 -0
  140. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +170 -0
  141. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +250 -0
  142. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +67 -0
  143. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.c +497 -0
  144. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.h +106 -0
  145. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.cpp +254 -0
  146. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.h +39 -0
  147. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_sign_diff_type.h +37 -0
  148. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.cpp +62 -0
  149. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.h +44 -0
  150. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +156 -0
  151. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +440 -0
  152. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.h +88 -0
  153. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.cpp +332 -0
  154. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.h +48 -0
  155. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_types.h +198 -0
  156. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.cpp +697 -0
  157. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.h +74 -0
  158. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_private.h +262 -0
  159. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type.h +174 -0
  160. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +174 -0
  161. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +252 -0
  162. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.h +67 -0
  163. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +680 -0
  164. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.h +137 -0
  165. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +83 -0
  166. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +125 -0
  167. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.h +56 -0
  168. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +55 -0
  169. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.cpp +147 -0
  170. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.h +38 -0
  171. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +354 -0
  172. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.h +76 -0
  173. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.cpp +521 -0
  174. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.h +69 -0
  175. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +122 -0
  176. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_private.h +66 -0
  177. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type.h +36 -0
  178. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type_private.h +81 -0
  179. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.cpp +247 -0
  180. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.h +71 -0
  181. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.cpp +351 -0
  182. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.h +42 -0
  183. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.cpp +124 -0
  184. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.h +38 -0
  185. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.cpp +203 -0
  186. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.h +55 -0
  187. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.cpp +79 -0
  188. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.h +66 -0
  189. package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +301 -0
  190. package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +291 -0
  191. package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +630 -0
  192. package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +889 -0
  193. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +628 -0
  194. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +95 -0
  195. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +78 -0
  196. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +950 -0
  197. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +72 -0
  198. package/harmony/pushy/src/main/cpp/lzma/Asm/arm/7zCrcOpt.asm +100 -0
  199. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/7zAsm.S +181 -0
  200. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/LzmaDecOpt.S +1487 -0
  201. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +341 -0
  202. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +258 -0
  203. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +742 -0
  204. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzFindOpt.asm +540 -0
  205. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +1339 -0
  206. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sha256Opt.asm +275 -0
  207. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sort.asm +860 -0
  208. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +523 -0
  209. package/harmony/pushy/src/main/cpp/lzma/C/7z.h +204 -0
  210. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +89 -0
  211. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +19 -0
  212. package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +1786 -0
  213. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.c +36 -0
  214. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +35 -0
  215. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf2.c +52 -0
  216. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +464 -0
  217. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +28 -0
  218. package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +199 -0
  219. package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +673 -0
  220. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +443 -0
  221. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +92 -0
  222. package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +199 -0
  223. package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +597 -0
  224. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +27 -0
  225. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.rc +55 -0
  226. package/harmony/pushy/src/main/cpp/lzma/C/7zWindows.h +101 -0
  227. package/harmony/pushy/src/main/cpp/lzma/C/7zip_gcc_c.mak +360 -0
  228. package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +429 -0
  229. package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +60 -0
  230. package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +1002 -0
  231. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +605 -0
  232. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +76 -0
  233. package/harmony/pushy/src/main/cpp/lzma/C/Asm_c.mak +12 -0
  234. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +290 -0
  235. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +332 -0
  236. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +506 -0
  237. package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +709 -0
  238. package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +105 -0
  239. package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +187 -0
  240. package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +14 -0
  241. package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +246 -0
  242. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +970 -0
  243. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +686 -0
  244. package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +169 -0
  245. package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +19 -0
  246. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +99 -0
  247. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +20 -0
  248. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +1746 -0
  249. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +160 -0
  250. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +1422 -0
  251. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +114 -0
  252. package/harmony/pushy/src/main/cpp/lzma/C/LzFindOpt.c +578 -0
  253. package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +34 -0
  254. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +493 -0
  255. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +121 -0
  256. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +1095 -0
  257. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +81 -0
  258. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +807 -0
  259. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +58 -0
  260. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +111 -0
  261. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +53 -0
  262. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +103 -0
  263. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +1363 -0
  264. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +237 -0
  265. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +3150 -0
  266. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +85 -0
  267. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +42 -0
  268. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +138 -0
  269. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +604 -0
  270. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +144 -0
  271. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +1124 -0
  272. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +202 -0
  273. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +169 -0
  274. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +1131 -0
  275. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +181 -0
  276. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +312 -0
  277. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +337 -0
  278. package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +127 -0
  279. package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +50 -0
  280. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +492 -0
  281. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +86 -0
  282. package/harmony/pushy/src/main/cpp/lzma/C/Sha256Opt.c +451 -0
  283. package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +268 -0
  284. package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +15 -0
  285. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.c +835 -0
  286. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.h +17 -0
  287. package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +812 -0
  288. package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +260 -0
  289. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +249 -0
  290. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsw +29 -0
  291. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +889 -0
  292. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.c +4 -0
  293. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +13 -0
  294. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +44 -0
  295. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +32 -0
  296. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +313 -0
  297. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +192 -0
  298. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsw +29 -0
  299. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/Precomp.h +13 -0
  300. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +30 -0
  301. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +21 -0
  302. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.def +4 -0
  303. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +206 -0
  304. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsw +29 -0
  305. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +15 -0
  306. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.c +4 -0
  307. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.h +13 -0
  308. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +59 -0
  309. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/resource.rc +3 -0
  310. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.c +4 -0
  311. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +13 -0
  312. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +657 -0
  313. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsp +231 -0
  314. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsw +29 -0
  315. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +44 -0
  316. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +40 -0
  317. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/resource.rc +5 -0
  318. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/setup.ico +0 -0
  319. package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +92 -0
  320. package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +542 -0
  321. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +140 -0
  322. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +26 -0
  323. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +261 -0
  324. package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +2876 -0
  325. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +1384 -0
  326. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +64 -0
  327. package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +385 -0
  328. package/harmony/pushy/src/main/cpp/lzma/C/var_clang.mak +11 -0
  329. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_arm64.mak +12 -0
  330. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x64.mak +11 -0
  331. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x86.mak +11 -0
  332. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc.mak +12 -0
  333. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_arm64.mak +12 -0
  334. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x64.mak +10 -0
  335. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x86.mak +10 -0
  336. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_arm64.mak +11 -0
  337. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_x64.mak +11 -0
  338. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang.mak +1 -0
  339. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang_mac.mak +1 -0
  340. package/harmony/pushy/src/main/cpp/lzma/C/warn_gcc.mak +51 -0
  341. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +240 -0
  342. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip_gcc.mak +1370 -0
  343. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +10 -0
  344. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
  345. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +92 -0
  346. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
  347. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +73 -0
  348. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +721 -0
  349. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +95 -0
  350. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
  351. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
  352. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
  353. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +795 -0
  354. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +178 -0
  355. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1162 -0
  356. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
  357. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +156 -0
  358. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +1764 -0
  359. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +454 -0
  360. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +207 -0
  361. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
  362. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +346 -0
  363. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
  364. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +26 -0
  365. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
  366. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
  367. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
  368. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +3088 -0
  369. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
  370. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
  371. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +11 -0
  372. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +14 -0
  373. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +21 -0
  374. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
  375. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
  376. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
  377. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
  378. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
  379. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +315 -0
  380. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +169 -0
  381. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
  382. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
  383. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +140 -0
  384. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +33 -0
  385. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
  386. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +86 -0
  387. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
  388. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
  389. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
  390. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
  391. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +11 -0
  392. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +175 -0
  393. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +754 -0
  394. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
  395. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +608 -0
  396. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +353 -0
  397. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +11 -0
  398. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +1452 -0
  399. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +11 -0
  400. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +12 -0
  401. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
  402. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
  403. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
  404. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
  405. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +168 -0
  406. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +279 -0
  407. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
  408. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
  409. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
  410. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
  411. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
  412. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
  413. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
  414. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +121 -0
  415. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
  416. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +817 -0
  417. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
  418. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
  419. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
  420. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
  421. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
  422. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
  423. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
  424. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +715 -0
  425. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  426. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
  427. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
  428. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
  429. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
  430. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
  431. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +137 -0
  432. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
  433. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
  434. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
  435. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
  436. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
  437. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
  438. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
  439. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
  440. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +371 -0
  441. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
  442. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
  443. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
  444. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
  445. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
  446. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  447. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  448. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
  449. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
  450. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
  451. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
  452. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
  453. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +159 -0
  454. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
  455. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
  456. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +358 -0
  457. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +182 -0
  458. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +548 -0
  459. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +200 -0
  460. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
  461. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +10 -0
  462. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +923 -0
  463. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +205 -0
  464. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +577 -0
  465. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +201 -0
  466. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +182 -0
  467. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +121 -0
  468. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
  469. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +45 -0
  470. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +393 -0
  471. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +221 -0
  472. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.cpp +3 -0
  473. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +6 -0
  474. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.cpp +3 -0
  475. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +10 -0
  476. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +765 -0
  477. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +349 -0
  478. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.cpp +855 -0
  479. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.h +160 -0
  480. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +37 -0
  481. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +22 -0
  482. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +111 -0
  483. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +133 -0
  484. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +51 -0
  485. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +33 -0
  486. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +117 -0
  487. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +80 -0
  488. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +106 -0
  489. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +11 -0
  490. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +151 -0
  491. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +78 -0
  492. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +290 -0
  493. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +146 -0
  494. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +101 -0
  495. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +31 -0
  496. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +57 -0
  497. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +41 -0
  498. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +47 -0
  499. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +24 -0
  500. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
  501. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +127 -0
  502. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
  503. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +24 -0
  504. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +37 -0
  505. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +17 -0
  506. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +106 -0
  507. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +59 -0
  508. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +58 -0
  509. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +91 -0
  510. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +378 -0
  511. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +153 -0
  512. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +34 -0
  513. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyRegister.cpp +15 -0
  514. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
  515. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
  516. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
  517. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +134 -0
  518. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
  519. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
  520. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
  521. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +113 -0
  522. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +374 -0
  523. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +45 -0
  524. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
  525. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
  526. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +87 -0
  527. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
  528. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +49 -0
  529. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
  530. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +11 -0
  531. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +151 -0
  532. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +86 -0
  533. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +243 -0
  534. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +35 -0
  535. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +8 -0
  536. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +8 -0
  537. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +315 -0
  538. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +130 -0
  539. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
  540. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +277 -0
  541. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +122 -0
  542. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
  543. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +241 -0
  544. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +41 -0
  545. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +11 -0
  546. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +119 -0
  547. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +243 -0
  548. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +480 -0
  549. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +76 -0
  550. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +54 -0
  551. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +20 -0
  552. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +210 -0
  553. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzFindOpt.mak +7 -0
  554. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +7 -0
  555. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec_gcc.mak +14 -0
  556. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersion.h +2 -0
  557. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +2 -0
  558. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +178 -0
  559. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sha256.mak +13 -0
  560. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sort.mak +6 -0
  561. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/SubBuild.mak +3 -0
  562. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
  563. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
  564. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
  565. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
  566. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
  567. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +29 -0
  568. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
  569. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/resource.rc +3 -0
  570. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1799 -0
  571. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
  572. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +3077 -0
  573. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +641 -0
  574. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
  575. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +16 -0
  576. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +398 -0
  577. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
  578. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +5026 -0
  579. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +121 -0
  580. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
  581. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +11 -0
  582. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +407 -0
  583. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +1637 -0
  584. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
  585. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +27 -0
  586. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +575 -0
  587. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +107 -0
  588. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +44 -0
  589. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +296 -0
  590. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
  591. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +2273 -0
  592. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +322 -0
  593. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
  594. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +1337 -0
  595. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
  596. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +3702 -0
  597. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +469 -0
  598. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +745 -0
  599. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
  600. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +14 -0
  601. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
  602. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +10 -0
  603. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
  604. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +10 -0
  605. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +11 -0
  606. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
  607. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +19 -0
  608. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +1931 -0
  609. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +221 -0
  610. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
  611. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +66 -0
  612. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +1069 -0
  613. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
  614. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +302 -0
  615. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +27 -0
  616. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +74 -0
  617. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
  618. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
  619. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +30 -0
  620. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
  621. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
  622. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +14 -0
  623. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +46 -0
  624. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +16 -0
  625. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
  626. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
  627. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +946 -0
  628. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
  629. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +426 -0
  630. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +58 -0
  631. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +1417 -0
  632. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +42 -0
  633. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +1635 -0
  634. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +235 -0
  635. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
  636. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
  637. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
  638. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
  639. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
  640. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +11 -0
  641. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +998 -0
  642. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
  643. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
  644. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
  645. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +68 -0
  646. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile.gcc +187 -0
  647. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/resource.rc +7 -0
  648. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
  649. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
  650. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
  651. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
  652. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
  653. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
  654. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
  655. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
  656. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
  657. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1272 -0
  658. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
  659. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
  660. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
  661. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
  662. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
  663. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
  664. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
  665. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
  666. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
  667. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
  668. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
  669. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
  670. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
  671. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
  672. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
  673. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
  674. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
  675. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
  676. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
  677. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1483 -0
  678. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
  679. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
  680. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
  681. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
  682. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
  683. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
  684. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
  685. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
  686. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
  687. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +351 -0
  688. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
  689. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +199 -0
  690. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
  691. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
  692. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +59 -0
  693. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +421 -0
  694. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
  695. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
  696. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
  697. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
  698. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
  699. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
  700. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +27 -0
  701. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/resource2.h +2 -0
  702. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang.mak +3 -0
  703. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_arm64.mak +3 -0
  704. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x64.mak +3 -0
  705. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x86.mak +3 -0
  706. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc.mak +3 -0
  707. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
  708. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x64.mak +3 -0
  709. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x86.mak +3 -0
  710. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_arm64.mak +3 -0
  711. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_x64.mak +3 -0
  712. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang.mak +11 -0
  713. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_arm64.mak +19 -0
  714. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x64.mak +11 -0
  715. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x86.mak +11 -0
  716. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc.mak +12 -0
  717. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_arm64.mak +12 -0
  718. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x64.mak +11 -0
  719. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x86.mak +10 -0
  720. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_arm64.mak +13 -0
  721. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_x64.mak +11 -0
  722. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang.mak +3 -0
  723. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang_mac.mak +9 -0
  724. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_gcc.mak +55 -0
  725. package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +252 -0
  726. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +46 -0
  727. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +7 -0
  728. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +3 -0
  729. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +6 -0
  730. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +21 -0
  731. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +231 -0
  732. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +63 -0
  733. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +28 -0
  734. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common0.h +330 -0
  735. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +77 -0
  736. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +16 -0
  737. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.cpp +93 -0
  738. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.h +41 -0
  739. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +76 -0
  740. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +215 -0
  741. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +54 -0
  742. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +30 -0
  743. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +150 -0
  744. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +18 -0
  745. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/LzFindPrepare.cpp +7 -0
  746. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +297 -0
  747. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +185 -0
  748. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +693 -0
  749. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +14 -0
  750. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +63 -0
  751. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +57 -0
  752. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +75 -0
  753. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +1842 -0
  754. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +1079 -0
  755. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +38 -0
  756. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +8 -0
  757. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.cpp +3 -0
  758. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +724 -0
  759. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +292 -0
  760. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +325 -0
  761. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +340 -0
  762. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +121 -0
  763. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Prepare.cpp +7 -0
  764. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +67 -0
  765. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +8 -0
  766. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +98 -0
  767. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +46 -0
  768. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +248 -0
  769. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +87 -0
  770. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +762 -0
  771. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +110 -0
  772. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +154 -0
  773. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +38 -0
  774. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +123 -0
  775. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +19 -0
  776. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +863 -0
  777. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +384 -0
  778. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +789 -0
  779. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +231 -0
  780. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Init.cpp +7 -0
  781. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +39 -0
  782. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +86 -0
  783. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.cpp +130 -0
  784. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.h +28 -0
  785. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +269 -0
  786. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +43 -0
  787. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +66 -0
  788. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +77 -0
  789. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +52 -0
  790. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +446 -0
  791. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +213 -0
  792. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +19 -0
  793. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.cpp +10 -0
  794. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +87 -0
  795. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +162 -0
  796. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +156 -0
  797. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +35 -0
  798. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +165 -0
  799. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +50 -0
  800. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +34 -0
  801. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +28 -0
  802. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +42 -0
  803. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +11 -0
  804. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +43 -0
  805. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +27 -0
  806. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +202 -0
  807. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +53 -0
  808. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +178 -0
  809. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +103 -0
  810. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +17 -0
  811. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +133 -0
  812. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +16 -0
  813. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +1362 -0
  814. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +172 -0
  815. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +1449 -0
  816. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +347 -0
  817. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +954 -0
  818. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +467 -0
  819. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +697 -0
  820. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.cpp +12 -0
  821. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +66 -0
  822. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +911 -0
  823. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +142 -0
  824. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +187 -0
  825. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +31 -0
  826. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +39 -0
  827. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.cpp +36 -0
  828. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.h +55 -0
  829. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +127 -0
  830. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +40 -0
  831. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +58 -0
  832. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +393 -0
  833. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +173 -0
  834. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +274 -0
  835. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +47 -0
  836. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +474 -0
  837. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +96 -0
  838. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +103 -0
  839. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +17 -0
  840. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +186 -0
  841. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +150 -0
  842. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +839 -0
  843. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +129 -0
  844. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +11 -0
  845. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +87 -0
  846. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +386 -0
  847. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +421 -0
  848. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +189 -0
  849. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.cpp +1251 -0
  850. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.h +19 -0
  851. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +46 -0
  852. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +467 -0
  853. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +146 -0
  854. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +179 -0
  855. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +363 -0
  856. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CRC.cs +55 -0
  857. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CommandLineParser.cs +274 -0
  858. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/InBuffer.cs +72 -0
  859. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/OutBuffer.cs +47 -0
  860. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +24 -0
  861. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +367 -0
  862. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +132 -0
  863. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +110 -0
  864. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +76 -0
  865. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +398 -0
  866. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +1480 -0
  867. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +364 -0
  868. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +20 -0
  869. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +340 -0
  870. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +29 -0
  871. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +70 -0
  872. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +42 -0
  873. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +234 -0
  874. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +117 -0
  875. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +157 -0
  876. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/ICoder.cs +157 -0
  877. package/harmony/pushy/src/main/cpp/lzma/DOC/7zC.txt +187 -0
  878. package/harmony/pushy/src/main/cpp/lzma/DOC/7zFormat.txt +469 -0
  879. package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +177 -0
  880. package/harmony/pushy/src/main/cpp/lzma/DOC/installer.txt +166 -0
  881. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +651 -0
  882. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +437 -0
  883. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-specification.txt +1176 -0
  884. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +345 -0
  885. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/CRC.java +52 -0
  886. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/BinTree.java +382 -0
  887. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/InWindow.java +131 -0
  888. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +85 -0
  889. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Base.java +88 -0
  890. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +329 -0
  891. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +1416 -0
  892. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +55 -0
  893. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +99 -0
  894. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +88 -0
  895. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +151 -0
  896. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/ICodeProgress.java +6 -0
  897. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaAlone.java +253 -0
  898. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaBench.java +392 -0
  899. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2.sfx +0 -0
  900. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2con.sfx +0 -0
  901. package/harmony/pushy/src/main/cpp/lzma/bin/7zSD.sfx +0 -0
  902. package/harmony/pushy/src/main/cpp/lzma/bin/7zdec.exe +0 -0
  903. package/harmony/pushy/src/main/cpp/lzma/bin/7zr.exe +0 -0
  904. package/harmony/pushy/src/main/cpp/lzma/bin/installer/config.txt +5 -0
  905. package/harmony/pushy/src/main/cpp/lzma/bin/installer/cr.bat +5 -0
  906. package/harmony/pushy/src/main/cpp/lzma/bin/lzma.exe +0 -0
  907. package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
  908. package/package.json +1 -1
@@ -0,0 +1,2273 @@
1
+ // HashCalc.cpp
2
+
3
+ #include "StdAfx.h"
4
+
5
+ #include "../../../../C/Alloc.h"
6
+ #include "../../../../C/CpuArch.h"
7
+
8
+ #include "../../../Common/DynLimBuf.h"
9
+ #include "../../../Common/IntToString.h"
10
+ #include "../../../Common/StringToInt.h"
11
+
12
+ #include "../../Common/FileStreams.h"
13
+ #include "../../Common/ProgressUtils.h"
14
+ #include "../../Common/StreamObjects.h"
15
+ #include "../../Common/StreamUtils.h"
16
+
17
+ #include "../../Archive/Common/ItemNameUtils.h"
18
+ #include "../../Archive/IArchive.h"
19
+
20
+ #include "EnumDirItems.h"
21
+ #include "HashCalc.h"
22
+
23
+ using namespace NWindows;
24
+
25
+ #ifdef Z7_EXTERNAL_CODECS
26
+ extern const CExternalCodecs *g_ExternalCodecs_Ptr;
27
+ #endif
28
+
29
+ class CHashMidBuf
30
+ {
31
+ void *_data;
32
+ public:
33
+ CHashMidBuf(): _data(NULL) {}
34
+ operator void *() { return _data; }
35
+ bool Alloc(size_t size)
36
+ {
37
+ if (_data)
38
+ return false;
39
+ _data = ::MidAlloc(size);
40
+ return _data != NULL;
41
+ }
42
+ ~CHashMidBuf() { ::MidFree(_data); }
43
+ };
44
+
45
+ static const char * const k_DefaultHashMethod = "CRC32";
46
+
47
+ HRESULT CHashBundle::SetMethods(DECL_EXTERNAL_CODECS_LOC_VARS const UStringVector &hashMethods)
48
+ {
49
+ UStringVector names = hashMethods;
50
+ if (names.IsEmpty())
51
+ names.Add(UString(k_DefaultHashMethod));
52
+
53
+ CRecordVector<CMethodId> ids;
54
+ CObjectVector<COneMethodInfo> methods;
55
+
56
+ unsigned i;
57
+ for (i = 0; i < names.Size(); i++)
58
+ {
59
+ COneMethodInfo m;
60
+ RINOK(m.ParseMethodFromString(names[i]))
61
+
62
+ if (m.MethodName.IsEmpty())
63
+ m.MethodName = k_DefaultHashMethod;
64
+
65
+ if (m.MethodName.IsEqualTo("*"))
66
+ {
67
+ CRecordVector<CMethodId> tempMethods;
68
+ GetHashMethods(EXTERNAL_CODECS_LOC_VARS tempMethods);
69
+ methods.Clear();
70
+ ids.Clear();
71
+ FOR_VECTOR (t, tempMethods)
72
+ {
73
+ unsigned index = ids.AddToUniqueSorted(tempMethods[t]);
74
+ if (ids.Size() != methods.Size())
75
+ methods.Insert(index, m);
76
+ }
77
+ break;
78
+ }
79
+ else
80
+ {
81
+ // m.MethodName.RemoveChar(L'-');
82
+ CMethodId id;
83
+ if (!FindHashMethod(EXTERNAL_CODECS_LOC_VARS m.MethodName, id))
84
+ return E_NOTIMPL;
85
+ unsigned index = ids.AddToUniqueSorted(id);
86
+ if (ids.Size() != methods.Size())
87
+ methods.Insert(index, m);
88
+ }
89
+ }
90
+
91
+ for (i = 0; i < ids.Size(); i++)
92
+ {
93
+ CMyComPtr<IHasher> hasher;
94
+ AString name;
95
+ RINOK(CreateHasher(EXTERNAL_CODECS_LOC_VARS ids[i], name, hasher))
96
+ if (!hasher)
97
+ throw "Can't create hasher";
98
+ const COneMethodInfo &m = methods[i];
99
+ {
100
+ CMyComPtr<ICompressSetCoderProperties> scp;
101
+ hasher.QueryInterface(IID_ICompressSetCoderProperties, &scp);
102
+ if (scp)
103
+ RINOK(m.SetCoderProps(scp, NULL))
104
+ }
105
+ const UInt32 digestSize = hasher->GetDigestSize();
106
+ if (digestSize > k_HashCalc_DigestSize_Max)
107
+ return E_NOTIMPL;
108
+ CHasherState &h = Hashers.AddNew();
109
+ h.DigestSize = digestSize;
110
+ h.Hasher = hasher;
111
+ h.Name = name;
112
+ for (unsigned k = 0; k < k_HashCalc_NumGroups; k++)
113
+ h.InitDigestGroup(k);
114
+ }
115
+
116
+ return S_OK;
117
+ }
118
+
119
+ void CHashBundle::InitForNewFile()
120
+ {
121
+ CurSize = 0;
122
+ FOR_VECTOR (i, Hashers)
123
+ {
124
+ CHasherState &h = Hashers[i];
125
+ h.Hasher->Init();
126
+ h.InitDigestGroup(k_HashCalc_Index_Current);
127
+ }
128
+ }
129
+
130
+ void CHashBundle::Update(const void *data, UInt32 size)
131
+ {
132
+ CurSize += size;
133
+ FOR_VECTOR (i, Hashers)
134
+ Hashers[i].Hasher->Update(data, size);
135
+ }
136
+
137
+ void CHashBundle::SetSize(UInt64 size)
138
+ {
139
+ CurSize = size;
140
+ }
141
+
142
+ static void AddDigests(Byte *dest, const Byte *src, UInt32 size)
143
+ {
144
+ unsigned next = 0;
145
+ /*
146
+ // we could use big-endian addition for sha-1 and sha-256
147
+ // but another hashers are little-endian
148
+ if (size > 8)
149
+ {
150
+ for (unsigned i = size; i != 0;)
151
+ {
152
+ i--;
153
+ next += (unsigned)dest[i] + (unsigned)src[i];
154
+ dest[i] = (Byte)next;
155
+ next >>= 8;
156
+ }
157
+ }
158
+ else
159
+ */
160
+ {
161
+ for (unsigned i = 0; i < size; i++)
162
+ {
163
+ next += (unsigned)dest[i] + (unsigned)src[i];
164
+ dest[i] = (Byte)next;
165
+ next >>= 8;
166
+ }
167
+ }
168
+
169
+ // we use little-endian to store extra bytes
170
+ dest += k_HashCalc_DigestSize_Max;
171
+ for (unsigned i = 0; i < k_HashCalc_ExtraSize; i++)
172
+ {
173
+ next += (unsigned)dest[i];
174
+ dest[i] = (Byte)next;
175
+ next >>= 8;
176
+ }
177
+ }
178
+
179
+ void CHasherState::AddDigest(unsigned groupIndex, const Byte *data)
180
+ {
181
+ NumSums[groupIndex]++;
182
+ AddDigests(Digests[groupIndex], data, DigestSize);
183
+ }
184
+
185
+ void CHashBundle::Final(bool isDir, bool isAltStream, const UString &path)
186
+ {
187
+ if (isDir)
188
+ NumDirs++;
189
+ else if (isAltStream)
190
+ {
191
+ NumAltStreams++;
192
+ AltStreamsSize += CurSize;
193
+ }
194
+ else
195
+ {
196
+ NumFiles++;
197
+ FilesSize += CurSize;
198
+ }
199
+
200
+ Byte pre[16];
201
+ memset(pre, 0, sizeof(pre));
202
+ if (isDir)
203
+ pre[0] = 1;
204
+
205
+ FOR_VECTOR (i, Hashers)
206
+ {
207
+ CHasherState &h = Hashers[i];
208
+ if (!isDir)
209
+ {
210
+ h.Hasher->Final(h.Digests[0]); // k_HashCalc_Index_Current
211
+ if (!isAltStream)
212
+ h.AddDigest(k_HashCalc_Index_DataSum, h.Digests[0]);
213
+ }
214
+
215
+ h.Hasher->Init();
216
+ h.Hasher->Update(pre, sizeof(pre));
217
+ h.Hasher->Update(h.Digests[0], h.DigestSize);
218
+
219
+ for (unsigned k = 0; k < path.Len(); k++)
220
+ {
221
+ wchar_t c = path[k];
222
+
223
+ // 21.04: we want same hash for linux and windows paths
224
+ #if CHAR_PATH_SEPARATOR != '/'
225
+ if (c == CHAR_PATH_SEPARATOR)
226
+ c = '/';
227
+ // if (c == (wchar_t)('\\' + 0xf000)) c = '\\'; // to debug WSL
228
+ // if (c > 0xf000 && c < 0xf080) c -= 0xf000; // to debug WSL
229
+ #endif
230
+
231
+ Byte temp[2] = { (Byte)(c & 0xFF), (Byte)((c >> 8) & 0xFF) };
232
+ h.Hasher->Update(temp, 2);
233
+ }
234
+
235
+ Byte tempDigest[k_HashCalc_DigestSize_Max];
236
+ h.Hasher->Final(tempDigest);
237
+ if (!isAltStream)
238
+ h.AddDigest(k_HashCalc_Index_NamesSum, tempDigest);
239
+ h.AddDigest(k_HashCalc_Index_StreamsSum, tempDigest);
240
+ }
241
+ }
242
+
243
+
244
+ static void CSum_Name_OriginalToEscape(const AString &src, AString &dest)
245
+ {
246
+ dest.Empty();
247
+ for (unsigned i = 0; i < src.Len();)
248
+ {
249
+ char c = src[i++];
250
+ if (c == '\n')
251
+ {
252
+ dest.Add_Char('\\');
253
+ c = 'n';
254
+ }
255
+ else if (c == '\\')
256
+ dest.Add_Char('\\');
257
+ dest.Add_Char(c);
258
+ }
259
+ }
260
+
261
+
262
+ static bool CSum_Name_EscapeToOriginal(const char *s, AString &dest)
263
+ {
264
+ bool isOK = true;
265
+ dest.Empty();
266
+ for (;;)
267
+ {
268
+ char c = *s++;
269
+ if (c == 0)
270
+ break;
271
+ if (c == '\\')
272
+ {
273
+ const char c1 = *s;
274
+ if (c1 == 'n')
275
+ {
276
+ c = '\n';
277
+ s++;
278
+ }
279
+ else if (c1 == '\\')
280
+ {
281
+ c = c1;
282
+ s++;
283
+ }
284
+ else
285
+ {
286
+ // original md5sum returns NULL for such bad strings
287
+ isOK = false;
288
+ }
289
+ }
290
+ dest.Add_Char(c);
291
+ }
292
+ return isOK;
293
+ }
294
+
295
+
296
+
297
+ static void SetSpacesAndNul(char *s, unsigned num)
298
+ {
299
+ for (unsigned i = 0; i < num; i++)
300
+ s[i] = ' ';
301
+ s[num] = 0;
302
+ }
303
+
304
+ static const unsigned kHashColumnWidth_Min = 4 * 2;
305
+
306
+ static unsigned GetColumnWidth(unsigned digestSize)
307
+ {
308
+ const unsigned width = digestSize * 2;
309
+ return width < kHashColumnWidth_Min ? kHashColumnWidth_Min: width;
310
+ }
311
+
312
+
313
+ static void AddHashResultLine(
314
+ AString &_s,
315
+ // bool showHash,
316
+ // UInt64 fileSize, bool showSize,
317
+ const CObjectVector<CHasherState> &hashers
318
+ // unsigned digestIndex, = k_HashCalc_Index_Current
319
+ )
320
+ {
321
+ FOR_VECTOR (i, hashers)
322
+ {
323
+ const CHasherState &h = hashers[i];
324
+ char s[k_HashCalc_DigestSize_Max * 2 + 64];
325
+ s[0] = 0;
326
+ // if (showHash)
327
+ HashHexToString(s, h.Digests[k_HashCalc_Index_Current], h.DigestSize);
328
+ const unsigned pos = (unsigned)strlen(s);
329
+ const int numSpaces = (int)GetColumnWidth(h.DigestSize) - (int)pos;
330
+ if (numSpaces > 0)
331
+ SetSpacesAndNul(s + pos, (unsigned)numSpaces);
332
+ if (i != 0)
333
+ _s.Add_Space();
334
+ _s += s;
335
+ }
336
+
337
+ /*
338
+ if (showSize)
339
+ {
340
+ _s.Add_Space();
341
+ static const unsigned kSizeField_Len = 13; // same as in HashCon.cpp
342
+ char s[kSizeField_Len + 32];
343
+ char *p = s;
344
+ SetSpacesAndNul(s, kSizeField_Len);
345
+ p = s + kSizeField_Len;
346
+ ConvertUInt64ToString(fileSize, p);
347
+ int numSpaces = (int)kSizeField_Len - (int)strlen(p);
348
+ if (numSpaces > 0)
349
+ p -= (unsigned)numSpaces;
350
+ _s += p;
351
+ }
352
+ */
353
+ }
354
+
355
+
356
+ static void Add_LF(CDynLimBuf &hashFileString, const CHashOptionsLocal &options)
357
+ {
358
+ hashFileString += (char)(options.HashMode_Zero.Val ? 0 : '\n');
359
+ }
360
+
361
+
362
+
363
+
364
+ static void WriteLine(CDynLimBuf &hashFileString,
365
+ const CHashOptionsLocal &options,
366
+ const UString &path2,
367
+ bool isDir,
368
+ const AString &methodName,
369
+ const AString &hashesString)
370
+ {
371
+ if (options.HashMode_OnlyHash.Val)
372
+ {
373
+ hashFileString += hashesString;
374
+ Add_LF(hashFileString, options);
375
+ return;
376
+ }
377
+
378
+ UString path = path2;
379
+
380
+ bool isBin = false;
381
+ const bool zeroMode = options.HashMode_Zero.Val;
382
+ const bool tagMode = options.HashMode_Tag.Val;
383
+
384
+ #if CHAR_PATH_SEPARATOR != '/'
385
+ path.Replace(WCHAR_PATH_SEPARATOR, L'/');
386
+ // path.Replace((wchar_t)('\\' + 0xf000), L'\\'); // to debug WSL
387
+ #endif
388
+
389
+ AString utf8;
390
+ ConvertUnicodeToUTF8(path, utf8);
391
+
392
+ AString esc;
393
+ CSum_Name_OriginalToEscape(utf8, esc);
394
+
395
+ if (!zeroMode)
396
+ {
397
+ if (esc != utf8)
398
+ {
399
+ /* Original md5sum writes escape in that case.
400
+ We do same for compatibility with original md5sum. */
401
+ hashFileString += '\\';
402
+ }
403
+ }
404
+
405
+ if (isDir && !esc.IsEmpty() && esc.Back() != '/')
406
+ esc.Add_Slash();
407
+
408
+ if (tagMode)
409
+ {
410
+ if (!methodName.IsEmpty())
411
+ {
412
+ hashFileString += methodName;
413
+ hashFileString += ' ';
414
+ }
415
+ hashFileString += '(';
416
+ hashFileString += esc;
417
+ hashFileString += ')';
418
+ hashFileString += " = ";
419
+ }
420
+
421
+ hashFileString += hashesString;
422
+
423
+ if (!tagMode)
424
+ {
425
+ hashFileString += ' ';
426
+ hashFileString += (char)(isBin ? '*' : ' ');
427
+ hashFileString += esc;
428
+ }
429
+
430
+ Add_LF(hashFileString, options);
431
+ }
432
+
433
+
434
+ static void Convert_TagName_to_MethodName(AString &method)
435
+ {
436
+ // we need to convert at least SHA512/256 to SHA512-256, and SHA512/224 to SHA512-224
437
+ // but we convert any '/' to '-'.
438
+ method.Replace('/', '-');
439
+ }
440
+
441
+ static void Convert_MethodName_to_TagName(AString &method)
442
+ {
443
+ if (method.IsPrefixedBy_Ascii_NoCase("SHA512-2"))
444
+ method.ReplaceOneCharAtPos(6, '/');
445
+ }
446
+
447
+
448
+ static void WriteLine(CDynLimBuf &hashFileString,
449
+ const CHashOptionsLocal &options,
450
+ const UString &path,
451
+ bool isDir,
452
+ const CHashBundle &hb)
453
+ {
454
+ AString methodName;
455
+ if (!hb.Hashers.IsEmpty())
456
+ {
457
+ methodName = hb.Hashers[0].Name;
458
+ Convert_MethodName_to_TagName(methodName);
459
+ }
460
+ AString hashesString;
461
+ AddHashResultLine(hashesString, hb.Hashers);
462
+ WriteLine(hashFileString, options, path, isDir, methodName, hashesString);
463
+ }
464
+
465
+
466
+ HRESULT HashCalc(
467
+ DECL_EXTERNAL_CODECS_LOC_VARS
468
+ const NWildcard::CCensor &censor,
469
+ const CHashOptions &options,
470
+ AString &errorInfo,
471
+ IHashCallbackUI *callback)
472
+ {
473
+ CDirItems dirItems;
474
+ dirItems.Callback = callback;
475
+
476
+ if (options.StdInMode)
477
+ {
478
+ CDirItem di;
479
+ if (!di.SetAs_StdInFile())
480
+ return GetLastError_noZero_HRESULT();
481
+ dirItems.Items.Add(di);
482
+ }
483
+ else
484
+ {
485
+ RINOK(callback->StartScanning())
486
+
487
+ dirItems.SymLinks = options.SymLinks.Val;
488
+ dirItems.ScanAltStreams = options.AltStreamsMode;
489
+ dirItems.ExcludeDirItems = censor.ExcludeDirItems;
490
+ dirItems.ExcludeFileItems = censor.ExcludeFileItems;
491
+
492
+ dirItems.ShareForWrite = options.OpenShareForWrite;
493
+
494
+ HRESULT res = EnumerateItems(censor,
495
+ options.PathMode,
496
+ UString(),
497
+ dirItems);
498
+
499
+ if (res != S_OK)
500
+ {
501
+ if (res != E_ABORT)
502
+ errorInfo = "Scanning error";
503
+ return res;
504
+ }
505
+ RINOK(callback->FinishScanning(dirItems.Stat))
506
+ }
507
+
508
+ unsigned i;
509
+ CHashBundle hb;
510
+ RINOK(hb.SetMethods(EXTERNAL_CODECS_LOC_VARS options.Methods))
511
+ // hb.Init();
512
+
513
+ hb.NumErrors = dirItems.Stat.NumErrors;
514
+
515
+ UInt64 totalSize = 0;
516
+ if (options.StdInMode)
517
+ {
518
+ RINOK(callback->SetNumFiles(1))
519
+ }
520
+ else
521
+ {
522
+ totalSize = dirItems.Stat.GetTotalBytes();
523
+ RINOK(callback->SetTotal(totalSize))
524
+ }
525
+
526
+ const UInt32 kBufSize = 1 << 15;
527
+ CHashMidBuf buf;
528
+ if (!buf.Alloc(kBufSize))
529
+ return E_OUTOFMEMORY;
530
+
531
+ UInt64 completeValue = 0;
532
+
533
+ RINOK(callback->BeforeFirstFile(hb))
534
+
535
+ /*
536
+ CDynLimBuf hashFileString((size_t)1 << 31);
537
+ const bool needGenerate = !options.HashFilePath.IsEmpty();
538
+ */
539
+
540
+ for (i = 0; i < dirItems.Items.Size(); i++)
541
+ {
542
+ CMyComPtr<ISequentialInStream> inStream;
543
+ UString path;
544
+ bool isDir = false;
545
+ bool isAltStream = false;
546
+
547
+ if (options.StdInMode)
548
+ {
549
+ #if 1
550
+ inStream = new CStdInFileStream;
551
+ #else
552
+ if (!CreateStdInStream(inStream))
553
+ {
554
+ const DWORD lastError = ::GetLastError();
555
+ const HRESULT res = callback->OpenFileError(FString("stdin"), lastError);
556
+ hb.NumErrors++;
557
+ if (res != S_FALSE && res != S_OK)
558
+ return res;
559
+ continue;
560
+ }
561
+ #endif
562
+ }
563
+ else
564
+ {
565
+ path = dirItems.GetLogPath(i);
566
+ const CDirItem &di = dirItems.Items[i];
567
+ #ifdef _WIN32
568
+ isAltStream = di.IsAltStream;
569
+ #endif
570
+
571
+ #ifndef UNDER_CE
572
+ // if (di.AreReparseData())
573
+ if (di.ReparseData.Size() != 0)
574
+ {
575
+ CBufInStream *inStreamSpec = new CBufInStream();
576
+ inStream = inStreamSpec;
577
+ inStreamSpec->Init(di.ReparseData, di.ReparseData.Size());
578
+ }
579
+ else
580
+ #endif
581
+ {
582
+ CInFileStream *inStreamSpec = new CInFileStream;
583
+ inStreamSpec->Set_PreserveATime(options.PreserveATime);
584
+ inStream = inStreamSpec;
585
+ isDir = di.IsDir();
586
+ if (!isDir)
587
+ {
588
+ const FString phyPath = dirItems.GetPhyPath(i);
589
+ if (!inStreamSpec->OpenShared(phyPath, options.OpenShareForWrite))
590
+ {
591
+ const HRESULT res = callback->OpenFileError(phyPath, ::GetLastError());
592
+ hb.NumErrors++;
593
+ if (res != S_FALSE)
594
+ return res;
595
+ continue;
596
+ }
597
+ if (!options.StdInMode)
598
+ {
599
+ UInt64 curSize = 0;
600
+ if (inStreamSpec->GetSize(&curSize) == S_OK)
601
+ {
602
+ if (curSize > di.Size)
603
+ {
604
+ totalSize += curSize - di.Size;
605
+ RINOK(callback->SetTotal(totalSize))
606
+ // printf("\ntotal = %d MiB\n", (unsigned)(totalSize >> 20));
607
+ }
608
+ }
609
+ }
610
+ // inStreamSpec->ReloadProps();
611
+ }
612
+ }
613
+ }
614
+
615
+ RINOK(callback->GetStream(path, isDir))
616
+ UInt64 fileSize = 0;
617
+
618
+ hb.InitForNewFile();
619
+
620
+ if (!isDir)
621
+ {
622
+ for (UInt32 step = 0;; step++)
623
+ {
624
+ if ((step & 0xFF) == 0)
625
+ {
626
+ // printf("\ncompl = %d\n", (unsigned)(completeValue >> 20));
627
+ RINOK(callback->SetCompleted(&completeValue))
628
+ }
629
+ UInt32 size;
630
+ RINOK(inStream->Read(buf, kBufSize, &size))
631
+ if (size == 0)
632
+ break;
633
+ hb.Update(buf, size);
634
+ fileSize += size;
635
+ completeValue += size;
636
+ }
637
+ }
638
+
639
+ hb.Final(isDir, isAltStream, path);
640
+
641
+ /*
642
+ if (needGenerate
643
+ && (options.HashMode_Dirs.Val || !isDir))
644
+ {
645
+ WriteLine(hashFileString,
646
+ options,
647
+ path, // change it
648
+ isDir,
649
+ hb);
650
+
651
+ if (hashFileString.IsError())
652
+ return E_OUTOFMEMORY;
653
+ }
654
+ */
655
+
656
+ RINOK(callback->SetOperationResult(fileSize, hb, !isDir))
657
+ RINOK(callback->SetCompleted(&completeValue))
658
+ }
659
+
660
+ /*
661
+ if (needGenerate)
662
+ {
663
+ NFile::NIO::COutFile file;
664
+ if (!file.Create(us2fs(options.HashFilePath), true)) // createAlways
665
+ return GetLastError_noZero_HRESULT();
666
+ if (!file.WriteFull(hashFileString, hashFileString.Len()))
667
+ return GetLastError_noZero_HRESULT();
668
+ }
669
+ */
670
+
671
+ return callback->AfterLastFile(hb);
672
+ }
673
+
674
+
675
+ void HashHexToString(char *dest, const Byte *data, size_t size)
676
+ {
677
+ if (!data)
678
+ {
679
+ for (size_t i = 0; i < size; i++)
680
+ {
681
+ dest[0] = ' ';
682
+ dest[1] = ' ';
683
+ dest += 2;
684
+ }
685
+ *dest = 0;
686
+ return;
687
+ }
688
+
689
+ if (size > 8)
690
+ ConvertDataToHex_Lower(dest, data, size);
691
+ else if (size == 0)
692
+ {
693
+ *dest = 0;
694
+ return;
695
+ }
696
+ else
697
+ {
698
+ const char *dest_start = dest;
699
+ dest += size * 2;
700
+ *dest = 0;
701
+ do
702
+ {
703
+ const size_t b = *data++;
704
+ dest -= 2;
705
+ dest[0] = GET_HEX_CHAR_UPPER(b >> 4);
706
+ dest[1] = GET_HEX_CHAR_UPPER(b & 15);
707
+ }
708
+ while (dest != dest_start);
709
+ }
710
+ }
711
+
712
+ void CHasherState::WriteToString(unsigned digestIndex, char *s) const
713
+ {
714
+ HashHexToString(s, Digests[digestIndex], DigestSize);
715
+
716
+ if (digestIndex != 0 && NumSums[digestIndex] != 1)
717
+ {
718
+ unsigned numExtraBytes = GetNumExtraBytes_for_Group(digestIndex);
719
+ if (numExtraBytes > 4)
720
+ numExtraBytes = 8;
721
+ else // if (numExtraBytes >= 0)
722
+ numExtraBytes = 4;
723
+ // if (numExtraBytes != 0)
724
+ {
725
+ s += strlen(s);
726
+ *s++ = '-';
727
+ // *s = 0;
728
+ HashHexToString(s, GetExtraData_for_Group(digestIndex), numExtraBytes);
729
+ }
730
+ }
731
+ }
732
+
733
+
734
+
735
+ // ---------- Hash Handler ----------
736
+
737
+ namespace NHash {
738
+
739
+ #define IsWhite(c) ((c) == ' ' || (c) == '\t')
740
+
741
+ bool CHashPair::IsDir() const
742
+ {
743
+ if (Name.IsEmpty() || Name.Back() != '/')
744
+ return false;
745
+ // here we expect that Dir items contain only zeros or no Hash
746
+ for (size_t i = 0; i < Hash.Size(); i++)
747
+ if (Hash.ConstData()[i] != 0)
748
+ return false;
749
+ return true;
750
+ }
751
+
752
+
753
+ bool CHashPair::ParseCksum(const char *s)
754
+ {
755
+ const char *end;
756
+
757
+ const UInt32 crc = ConvertStringToUInt32(s, &end);
758
+ if (*end != ' ')
759
+ return false;
760
+ end++;
761
+
762
+ const UInt64 size = ConvertStringToUInt64(end, &end);
763
+ if (*end != ' ')
764
+ return false;
765
+ end++;
766
+
767
+ Name = end;
768
+
769
+ Hash.Alloc(4);
770
+ SetBe32a(Hash, crc)
771
+
772
+ Size_from_Arc = size;
773
+ Size_from_Arc_Defined = true;
774
+
775
+ return true;
776
+ }
777
+
778
+
779
+
780
+ static const char *SkipWhite(const char *s)
781
+ {
782
+ while (IsWhite(*s))
783
+ s++;
784
+ return s;
785
+ }
786
+
787
+ static const char * const k_CsumMethodNames[] =
788
+ {
789
+ "sha256"
790
+ , "sha224"
791
+ , "sha512-224"
792
+ , "sha512-256"
793
+ , "sha384"
794
+ , "sha512"
795
+ , "sha3-224"
796
+ , "sha3-256"
797
+ , "sha3-384"
798
+ , "sha3-512"
799
+ // , "shake128"
800
+ // , "shake256"
801
+ , "sha1"
802
+ , "sha2"
803
+ , "sha3"
804
+ , "sha"
805
+ , "md5"
806
+ , "blake2s"
807
+ , "blake2b"
808
+ , "blake2sp"
809
+ , "xxh64"
810
+ , "crc32"
811
+ , "crc64"
812
+ , "cksum"
813
+ };
814
+
815
+
816
+ // returns true, if (method) is known hash method or hash method group name.
817
+ static bool GetMethod_from_FileName(const UString &name, AString &method)
818
+ {
819
+ method.Empty();
820
+ AString s;
821
+ ConvertUnicodeToUTF8(name, s);
822
+ const int dotPos = s.ReverseFind_Dot();
823
+ if (dotPos >= 0)
824
+ {
825
+ method = s.Ptr(dotPos + 1);
826
+ if (method.IsEqualTo_Ascii_NoCase("txt") ||
827
+ method.IsEqualTo_Ascii_NoCase("asc"))
828
+ {
829
+ method.Empty();
830
+ const int dotPos2 = s.Find('.');
831
+ if (dotPos2 >= 0)
832
+ s.DeleteFrom(dotPos2);
833
+ }
834
+ }
835
+ if (method.IsEmpty())
836
+ {
837
+ // we support file names with "sum" and "sums" postfixes: "sha256sum", "sha256sums"
838
+ unsigned size;
839
+ if (s.Len() > 4 && StringsAreEqualNoCase_Ascii(s.RightPtr(4), "sums"))
840
+ size = 4;
841
+ else if (s.Len() > 3 && StringsAreEqualNoCase_Ascii(s.RightPtr(3), "sum"))
842
+ size = 3;
843
+ else
844
+ return false;
845
+ method = s;
846
+ method.DeleteFrom(s.Len() - size);
847
+ }
848
+
849
+ unsigned i;
850
+ for (i = 0; i < Z7_ARRAY_SIZE(k_CsumMethodNames); i++)
851
+ {
852
+ const char *m = k_CsumMethodNames[i];
853
+ if (method.IsEqualTo_Ascii_NoCase(m))
854
+ {
855
+ // method = m; // we can get lowcase
856
+ return true;
857
+ }
858
+ }
859
+
860
+ /*
861
+ for (i = 0; i < Z7_ARRAY_SIZE(k_CsumMethodNames); i++)
862
+ {
863
+ const char *m = k_CsumMethodNames[i];
864
+ if (method.IsPrefixedBy_Ascii_NoCase(m))
865
+ {
866
+ method = m; // we get lowcase
867
+ return true;
868
+ }
869
+ }
870
+ */
871
+ return false;
872
+ }
873
+
874
+
875
+ bool CHashPair::Parse(const char *s)
876
+ {
877
+ // here we keep compatibility with original md5sum / shasum
878
+ bool escape = false;
879
+
880
+ s = SkipWhite(s);
881
+
882
+ if (*s == '\\')
883
+ {
884
+ s++;
885
+ escape = true;
886
+ }
887
+ Escape = escape;
888
+
889
+ // const char *kMethod = GetMethod_from_FileName(s);
890
+ // if (kMethod)
891
+ if ((size_t)(FindNonHexChar(s) - s) < 4)
892
+ {
893
+ // BSD-style checksum line
894
+ {
895
+ const char *s2 = s;
896
+ for (; *s2 != 0; s2++)
897
+ {
898
+ const char c = *s2;
899
+ if (c == 0)
900
+ return false;
901
+ if (c == ' ' || c == '(')
902
+ break;
903
+ }
904
+ Method.SetFrom(s, (unsigned)(s2 - s));
905
+ s = s2;
906
+ }
907
+ IsBSD = true;
908
+ if (*s == ' ')
909
+ s++;
910
+ if (*s != '(')
911
+ return false;
912
+ s++;
913
+ {
914
+ const char *s2 = s;
915
+ for (; *s2 != 0; s2++)
916
+ {}
917
+ for (;;)
918
+ {
919
+ s2--;
920
+ if (s2 < s)
921
+ return false;
922
+ if (*s2 == ')')
923
+ break;
924
+ }
925
+ Name.SetFrom(s, (unsigned)(s2 - s));
926
+ s = s2 + 1;
927
+ }
928
+
929
+ s = SkipWhite(s);
930
+ if (*s != '=')
931
+ return false;
932
+ s++;
933
+ s = SkipWhite(s);
934
+ }
935
+
936
+ {
937
+ const size_t numChars = (size_t)(FindNonHexChar(s) - s) & ~(size_t)1;
938
+ Hash.Alloc(numChars / 2);
939
+ if ((size_t)(ParseHexString(s, Hash) - Hash) != numChars / 2)
940
+ throw 101;
941
+ HashString.SetFrom(s, (unsigned)numChars);
942
+ s += numChars;
943
+ }
944
+
945
+ if (IsBSD)
946
+ {
947
+ if (*s != 0)
948
+ return false;
949
+ if (escape)
950
+ {
951
+ const AString temp (Name);
952
+ return CSum_Name_EscapeToOriginal(temp, Name);
953
+ }
954
+ return true;
955
+ }
956
+
957
+ if (*s == 0)
958
+ return true;
959
+
960
+ if (*s != ' ')
961
+ return false;
962
+ s++;
963
+ const char c = *s;
964
+ if (c != ' '
965
+ && c != '*'
966
+ && c != 'U' // shasum Universal
967
+ && c != '^' // shasum 0/1
968
+ )
969
+ return false;
970
+ Mode = c;
971
+ s++;
972
+ if (escape)
973
+ return CSum_Name_EscapeToOriginal(s, Name);
974
+ Name = s;
975
+ return true;
976
+ }
977
+
978
+
979
+ static bool GetLine(CByteBuffer &buf, bool zeroMode, bool cr_lf_Mode, size_t &posCur, AString &s)
980
+ {
981
+ s.Empty();
982
+ size_t pos = posCur;
983
+ const Byte *p = buf;
984
+ unsigned numDigits = 0;
985
+ for (; pos < buf.Size(); pos++)
986
+ {
987
+ const Byte b = p[pos];
988
+ if (b == 0)
989
+ {
990
+ numDigits = 1;
991
+ break;
992
+ }
993
+ if (zeroMode)
994
+ continue;
995
+ if (b == 0x0a)
996
+ {
997
+ numDigits = 1;
998
+ break;
999
+ }
1000
+ if (!cr_lf_Mode)
1001
+ continue;
1002
+ if (b == 0x0d)
1003
+ {
1004
+ if (pos + 1 >= buf.Size())
1005
+ {
1006
+ numDigits = 1;
1007
+ break;
1008
+ // return false;
1009
+ }
1010
+ if (p[pos + 1] == 0x0a)
1011
+ {
1012
+ numDigits = 2;
1013
+ break;
1014
+ }
1015
+ }
1016
+ }
1017
+ s.SetFrom((const char *)(p + posCur), (unsigned)(pos - posCur));
1018
+ posCur = pos + numDigits;
1019
+ return true;
1020
+ }
1021
+
1022
+
1023
+ static bool Is_CR_LF_Data(const Byte *buf, size_t size)
1024
+ {
1025
+ bool isCrLf = false;
1026
+ for (size_t i = 0; i < size;)
1027
+ {
1028
+ const Byte b = buf[i];
1029
+ if (b == 0x0a)
1030
+ return false;
1031
+ if (b == 0x0d)
1032
+ {
1033
+ if (i == size - 1)
1034
+ return false;
1035
+ if (buf[i + 1] != 0x0a)
1036
+ return false;
1037
+ isCrLf = true;
1038
+ i += 2;
1039
+ }
1040
+ else
1041
+ i++;
1042
+ }
1043
+ return isCrLf;
1044
+ }
1045
+
1046
+
1047
+ static const Byte kArcProps[] =
1048
+ {
1049
+ // kpidComment,
1050
+ kpidCharacts
1051
+ };
1052
+
1053
+ static const Byte kProps[] =
1054
+ {
1055
+ kpidPath,
1056
+ kpidSize,
1057
+ kpidPackSize,
1058
+ kpidMethod
1059
+ };
1060
+
1061
+ static const Byte kRawProps[] =
1062
+ {
1063
+ kpidChecksum
1064
+ };
1065
+
1066
+
1067
+ Z7_COM7F_IMF(CHandler::GetParent(UInt32 /* index */ , UInt32 *parent, UInt32 *parentType))
1068
+ {
1069
+ *parentType = NParentType::kDir;
1070
+ *parent = (UInt32)(Int32)-1;
1071
+ return S_OK;
1072
+ }
1073
+
1074
+ Z7_COM7F_IMF(CHandler::GetNumRawProps(UInt32 *numProps))
1075
+ {
1076
+ *numProps = Z7_ARRAY_SIZE(kRawProps);
1077
+ return S_OK;
1078
+ }
1079
+
1080
+ Z7_COM7F_IMF(CHandler::GetRawPropInfo(UInt32 index, BSTR *name, PROPID *propID))
1081
+ {
1082
+ *propID = kRawProps[index];
1083
+ *name = NULL;
1084
+ return S_OK;
1085
+ }
1086
+
1087
+ Z7_COM7F_IMF(CHandler::GetRawProp(UInt32 index, PROPID propID, const void **data, UInt32 *dataSize, UInt32 *propType))
1088
+ {
1089
+ *data = NULL;
1090
+ *dataSize = 0;
1091
+ *propType = 0;
1092
+
1093
+ if (propID == kpidChecksum)
1094
+ {
1095
+ const CHashPair &hp = HashPairs[index];
1096
+ if (hp.Hash.Size() != 0)
1097
+ {
1098
+ *data = hp.Hash;
1099
+ *dataSize = (UInt32)hp.Hash.Size();
1100
+ *propType = NPropDataType::kRaw;
1101
+ }
1102
+ return S_OK;
1103
+ }
1104
+
1105
+ return S_OK;
1106
+ }
1107
+
1108
+ IMP_IInArchive_Props
1109
+ IMP_IInArchive_ArcProps
1110
+
1111
+ Z7_COM7F_IMF(CHandler::GetNumberOfItems(UInt32 *numItems))
1112
+ {
1113
+ *numItems = HashPairs.Size();
1114
+ return S_OK;
1115
+ }
1116
+
1117
+ static void Add_OptSpace_String(UString &dest, const char *src)
1118
+ {
1119
+ dest.Add_Space_if_NotEmpty();
1120
+ dest += src;
1121
+ }
1122
+
1123
+ Z7_COM7F_IMF(CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value))
1124
+ {
1125
+ NCOM::CPropVariant prop;
1126
+ switch (propID)
1127
+ {
1128
+ case kpidPhySize: if (_phySize != 0) prop = _phySize; break;
1129
+ /*
1130
+ case kpidErrorFlags:
1131
+ {
1132
+ UInt32 v = 0;
1133
+ if (!_isArc) v |= kpv_ErrorFlags_IsNotArc;
1134
+ // if (_sres == k_Base64_RES_NeedMoreInput) v |= kpv_ErrorFlags_UnexpectedEnd;
1135
+ if (v != 0)
1136
+ prop = v;
1137
+ break;
1138
+ }
1139
+ */
1140
+ case kpidCharacts:
1141
+ {
1142
+ UString s;
1143
+ if (_hashSize_Defined)
1144
+ {
1145
+ s.Add_Space_if_NotEmpty();
1146
+ s.Add_UInt32(_hashSize * 8);
1147
+ s += "-bit";
1148
+ }
1149
+ if (_is_PgpMethod)
1150
+ {
1151
+ Add_OptSpace_String(s, "PGP");
1152
+ if (!_pgpMethod.IsEmpty())
1153
+ {
1154
+ s.Add_Colon();
1155
+ s += _pgpMethod;
1156
+ }
1157
+ }
1158
+ if (_is_ZeroMode)
1159
+ Add_OptSpace_String(s, "ZERO");
1160
+ if (_are_there_Tags)
1161
+ Add_OptSpace_String(s, "TAG");
1162
+ if (_are_there_Dirs)
1163
+ Add_OptSpace_String(s, "DIRS");
1164
+ if (!_method_from_FileName.IsEmpty())
1165
+ {
1166
+ Add_OptSpace_String(s, "filename_method:");
1167
+ s += _method_from_FileName;
1168
+ if (!_is_KnownMethod_in_FileName)
1169
+ s += ":UNKNOWN";
1170
+ }
1171
+ if (!_methods.IsEmpty())
1172
+ {
1173
+ Add_OptSpace_String(s, "cmd_method:");
1174
+ s += _methods[0];
1175
+ }
1176
+ prop = s;
1177
+ break;
1178
+ }
1179
+
1180
+ case kpidReadOnly:
1181
+ {
1182
+ if (_isArc)
1183
+ if (!CanUpdate())
1184
+ prop = true;
1185
+ break;
1186
+ }
1187
+ default: break;
1188
+ }
1189
+ prop.Detach(value);
1190
+ return S_OK;
1191
+ }
1192
+
1193
+
1194
+ Z7_COM7F_IMF(CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value))
1195
+ {
1196
+ // COM_TRY_BEGIN
1197
+ NCOM::CPropVariant prop;
1198
+ const CHashPair &hp = HashPairs[index];
1199
+ switch (propID)
1200
+ {
1201
+ case kpidIsDir:
1202
+ {
1203
+ prop = hp.IsDir();
1204
+ break;
1205
+ }
1206
+ case kpidPath:
1207
+ {
1208
+ UString path;
1209
+ hp.Get_UString_Path(path);
1210
+
1211
+ bool useBackslashReplacement = true;
1212
+ if (_supportWindowsBackslash && !hp.Escape && path.Find(L"\\\\") < 0)
1213
+ {
1214
+ #if WCHAR_PATH_SEPARATOR == L'/'
1215
+ path.Replace(L'\\', L'/');
1216
+ #else
1217
+ useBackslashReplacement = false;
1218
+ #endif
1219
+ }
1220
+ NArchive::NItemName::ReplaceToOsSlashes_Remove_TailSlash(
1221
+ path, useBackslashReplacement);
1222
+ prop = path;
1223
+ break;
1224
+ }
1225
+ case kpidSize:
1226
+ {
1227
+ // client needs processed size of last file
1228
+ if (hp.Size_from_Disk_Defined)
1229
+ prop = (UInt64)hp.Size_from_Disk;
1230
+ else if (hp.Size_from_Arc_Defined)
1231
+ prop = (UInt64)hp.Size_from_Arc;
1232
+ break;
1233
+ }
1234
+ case kpidPackSize:
1235
+ {
1236
+ prop = (UInt64)hp.Hash.Size();
1237
+ break;
1238
+ }
1239
+ case kpidMethod:
1240
+ {
1241
+ if (!hp.Method.IsEmpty())
1242
+ prop = hp.Method;
1243
+ break;
1244
+ }
1245
+ default: break;
1246
+ }
1247
+ prop.Detach(value);
1248
+ return S_OK;
1249
+ // COM_TRY_END
1250
+ }
1251
+
1252
+
1253
+ static HRESULT ReadStream_to_Buf(IInStream *stream, CByteBuffer &buf, IArchiveOpenCallback *openCallback)
1254
+ {
1255
+ buf.Free();
1256
+ UInt64 len;
1257
+ RINOK(InStream_AtBegin_GetSize(stream, len))
1258
+ if (len == 0 || len >= ((UInt64)1 << 31))
1259
+ return S_FALSE;
1260
+ buf.Alloc((size_t)len);
1261
+ UInt64 pos = 0;
1262
+ // return ReadStream_FALSE(stream, buf, (size_t)len);
1263
+ for (;;)
1264
+ {
1265
+ const UInt32 kBlockSize = ((UInt32)1 << 24);
1266
+ const UInt32 curSize = (len < kBlockSize) ? (UInt32)len : kBlockSize;
1267
+ UInt32 processedSizeLoc;
1268
+ RINOK(stream->Read((Byte *)buf + pos, curSize, &processedSizeLoc))
1269
+ if (processedSizeLoc == 0)
1270
+ return E_FAIL;
1271
+ len -= processedSizeLoc;
1272
+ pos += processedSizeLoc;
1273
+ if (len == 0)
1274
+ return S_OK;
1275
+ if (openCallback)
1276
+ {
1277
+ const UInt64 files = 0;
1278
+ RINOK(openCallback->SetCompleted(&files, &pos))
1279
+ }
1280
+ }
1281
+ }
1282
+
1283
+
1284
+ static bool isThere_Zero_Byte(const Byte *data, size_t size)
1285
+ {
1286
+ for (size_t i = 0; i < size; i++)
1287
+ if (data[i] == 0)
1288
+ return true;
1289
+ return false;
1290
+ }
1291
+
1292
+
1293
+ Z7_COM7F_IMF(CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *openCallback))
1294
+ {
1295
+ COM_TRY_BEGIN
1296
+ {
1297
+ Close();
1298
+
1299
+ CByteBuffer buf;
1300
+ RINOK(ReadStream_to_Buf(stream, buf, openCallback))
1301
+
1302
+ CObjectVector<CHashPair> &pairs = HashPairs;
1303
+
1304
+ const bool zeroMode = isThere_Zero_Byte(buf, buf.Size());
1305
+ _is_ZeroMode = zeroMode;
1306
+ bool cr_lf_Mode = false;
1307
+ if (!zeroMode)
1308
+ cr_lf_Mode = Is_CR_LF_Data(buf, buf.Size());
1309
+
1310
+ if (openCallback)
1311
+ {
1312
+ Z7_DECL_CMyComPtr_QI_FROM(
1313
+ IArchiveOpenVolumeCallback,
1314
+ openVolumeCallback, openCallback)
1315
+ if (openVolumeCallback)
1316
+ {
1317
+ NCOM::CPropVariant prop;
1318
+ RINOK(openVolumeCallback->GetProperty(kpidName, &prop))
1319
+ if (prop.vt == VT_BSTR)
1320
+ _is_KnownMethod_in_FileName = GetMethod_from_FileName(prop.bstrVal, _method_from_FileName);
1321
+ }
1322
+ }
1323
+
1324
+ if (!_methods.IsEmpty())
1325
+ {
1326
+ ConvertUnicodeToUTF8(_methods[0], _method_for_Extraction);
1327
+ }
1328
+ if (_method_for_Extraction.IsEmpty())
1329
+ {
1330
+ // if (_is_KnownMethod_in_FileName)
1331
+ _method_for_Extraction = _method_from_FileName;
1332
+ }
1333
+
1334
+ const bool cksumMode = _method_for_Extraction.IsEqualTo_Ascii_NoCase("cksum");
1335
+ _is_CksumMode = cksumMode;
1336
+
1337
+ size_t pos = 0;
1338
+ AString s;
1339
+ bool minusMode = false;
1340
+ unsigned numLines = 0;
1341
+
1342
+ while (pos < buf.Size())
1343
+ {
1344
+ if (!GetLine(buf, zeroMode, cr_lf_Mode, pos, s))
1345
+ return S_FALSE;
1346
+ numLines++;
1347
+ if (s.IsEmpty())
1348
+ continue;
1349
+
1350
+ if (s.IsPrefixedBy_Ascii_NoCase("; "))
1351
+ {
1352
+ if (numLines != 1)
1353
+ return S_FALSE;
1354
+ // comment line of FileVerifier++
1355
+ continue;
1356
+ }
1357
+
1358
+ if (s.IsPrefixedBy_Ascii_NoCase("-----"))
1359
+ {
1360
+ if (minusMode)
1361
+ break; // end of pgp mode
1362
+ minusMode = true;
1363
+ if (s.IsPrefixedBy_Ascii_NoCase("-----BEGIN PGP SIGNED MESSAGE"))
1364
+ {
1365
+ if (_is_PgpMethod)
1366
+ return S_FALSE;
1367
+ if (!GetLine(buf, zeroMode, cr_lf_Mode, pos, s))
1368
+ return S_FALSE;
1369
+ const char *kStart = "Hash: ";
1370
+ if (!s.IsPrefixedBy_Ascii_NoCase(kStart))
1371
+ return S_FALSE;
1372
+ _pgpMethod = s.Ptr((unsigned)strlen(kStart));
1373
+ _is_PgpMethod = true;
1374
+ }
1375
+ continue;
1376
+ }
1377
+
1378
+ CHashPair pair;
1379
+ pair.FullLine = s;
1380
+ if (cksumMode)
1381
+ {
1382
+ if (!pair.ParseCksum(s))
1383
+ return S_FALSE;
1384
+ }
1385
+ else if (!pair.Parse(s))
1386
+ return S_FALSE;
1387
+ pairs.Add(pair);
1388
+ }
1389
+
1390
+ {
1391
+ unsigned hashSize = 0;
1392
+ bool hashSize_Dismatch = false;
1393
+ for (unsigned i = 0; i < HashPairs.Size(); i++)
1394
+ {
1395
+ const CHashPair &hp = HashPairs[i];
1396
+ if (i == 0)
1397
+ hashSize = (unsigned)hp.Hash.Size();
1398
+ else
1399
+ if (hashSize != hp.Hash.Size())
1400
+ hashSize_Dismatch = true;
1401
+
1402
+ if (hp.IsBSD)
1403
+ _are_there_Tags = true;
1404
+ if (!_are_there_Dirs && hp.IsDir())
1405
+ _are_there_Dirs = true;
1406
+ }
1407
+ if (!hashSize_Dismatch && hashSize != 0)
1408
+ {
1409
+ _hashSize = hashSize;
1410
+ _hashSize_Defined = true;
1411
+ }
1412
+ }
1413
+
1414
+ _phySize = buf.Size();
1415
+ _isArc = true;
1416
+ return S_OK;
1417
+ }
1418
+ COM_TRY_END
1419
+ }
1420
+
1421
+
1422
+ void CHandler::ClearVars()
1423
+ {
1424
+ _phySize = 0;
1425
+ _isArc = false;
1426
+ _is_CksumMode = false;
1427
+ _is_PgpMethod = false;
1428
+ _is_ZeroMode = false;
1429
+ _are_there_Tags = false;
1430
+ _are_there_Dirs = false;
1431
+ _is_KnownMethod_in_FileName = false;
1432
+ _hashSize_Defined = false;
1433
+ _hashSize = 0;
1434
+ }
1435
+
1436
+
1437
+ Z7_COM7F_IMF(CHandler::Close())
1438
+ {
1439
+ ClearVars();
1440
+ _method_from_FileName.Empty();
1441
+ _method_for_Extraction.Empty();
1442
+ _pgpMethod.Empty();
1443
+ HashPairs.Clear();
1444
+ return S_OK;
1445
+ }
1446
+
1447
+
1448
+ static bool CheckDigests(const Byte *a, const Byte *b, size_t size)
1449
+ {
1450
+ if (size <= 8)
1451
+ {
1452
+ /* we use reversed order for one digest, when text representation
1453
+ uses big-order for crc-32 and crc-64 */
1454
+ for (size_t i = 0; i < size; i++)
1455
+ if (a[i] != b[size - 1 - i])
1456
+ return false;
1457
+ return true;
1458
+ }
1459
+ {
1460
+ for (size_t i = 0; i < size; i++)
1461
+ if (a[i] != b[i])
1462
+ return false;
1463
+ return true;
1464
+ }
1465
+ }
1466
+
1467
+
1468
+ static void AddDefaultMethod(UStringVector &methods,
1469
+ const char *name, unsigned size)
1470
+ {
1471
+ int shaVersion = -1;
1472
+ if (name)
1473
+ {
1474
+ if (StringsAreEqualNoCase_Ascii(name, "sha"))
1475
+ {
1476
+ shaVersion = 0;
1477
+ if (size == 0)
1478
+ size = 32;
1479
+ }
1480
+ else if (StringsAreEqualNoCase_Ascii(name, "sha1"))
1481
+ {
1482
+ shaVersion = 1;
1483
+ if (size == 0)
1484
+ size = 20;
1485
+ }
1486
+ else if (StringsAreEqualNoCase_Ascii(name, "sha2"))
1487
+ {
1488
+ shaVersion = 2;
1489
+ if (size == 0)
1490
+ size = 32;
1491
+ }
1492
+ else if (StringsAreEqualNoCase_Ascii(name, "sha3"))
1493
+ {
1494
+ if (size == 0 ||
1495
+ size == 32) name = "sha3-256";
1496
+ else if (size == 28) name = "sha3-224";
1497
+ else if (size == 48) name = "sha3-384";
1498
+ else if (size == 64) name = "sha3-512";
1499
+ }
1500
+ else if (StringsAreEqualNoCase_Ascii(name, "sha512"))
1501
+ {
1502
+ // we allow any sha512 derived hash inside .sha512 file:
1503
+ if (size == 48) name = "sha384";
1504
+ else if (size == 32) name = "sha512-256";
1505
+ else if (size == 28) name = "sha512-224";
1506
+ }
1507
+ if (shaVersion >= 0)
1508
+ name = NULL;
1509
+ }
1510
+
1511
+ const char *m = NULL;
1512
+ if (name)
1513
+ m = name;
1514
+ else
1515
+ {
1516
+ if (size == 64) m = "sha512";
1517
+ else if (size == 48) m = "sha384";
1518
+ else if (size == 32) m = "sha256";
1519
+ else if (size == 28) m = "sha224";
1520
+ else if (size == 20) m = "sha1";
1521
+ else if (shaVersion < 0)
1522
+ {
1523
+ if (size == 16) m = "md5";
1524
+ else if (size == 8) m = "crc64";
1525
+ else if (size == 4) m = "crc32";
1526
+ }
1527
+ }
1528
+
1529
+ if (!m)
1530
+ return;
1531
+
1532
+ #ifdef Z7_EXTERNAL_CODECS
1533
+ const CExternalCodecs *_externalCodecs = g_ExternalCodecs_Ptr;
1534
+ #endif
1535
+ CMethodId id;
1536
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS
1537
+ AString(m), id))
1538
+ methods.Add(UString(m));
1539
+ }
1540
+
1541
+
1542
+ Z7_COM7F_IMF(CHandler::Extract(const UInt32 *indices, UInt32 numItems,
1543
+ Int32 testMode, IArchiveExtractCallback *extractCallback))
1544
+ {
1545
+ COM_TRY_BEGIN
1546
+
1547
+ /*
1548
+ if (testMode == 0)
1549
+ return E_NOTIMPL;
1550
+ */
1551
+
1552
+ const bool allFilesMode = (numItems == (UInt32)(Int32)-1);
1553
+ if (allFilesMode)
1554
+ numItems = HashPairs.Size();
1555
+ if (numItems == 0)
1556
+ return S_OK;
1557
+
1558
+ #ifdef Z7_EXTERNAL_CODECS
1559
+ const CExternalCodecs *_externalCodecs = g_ExternalCodecs_Ptr;
1560
+ #endif
1561
+
1562
+ CHashBundle hb_Glob;
1563
+ // UStringVector methods = options.Methods;
1564
+ UStringVector methods;
1565
+
1566
+ /*
1567
+ if (methods.IsEmpty() && !utf_nameExtenstion.IsEmpty() && !_hashSize_Defined)
1568
+ {
1569
+ CMethodId id;
1570
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS utf_nameExtenstion, id))
1571
+ methods.Add(_nameExtenstion);
1572
+ }
1573
+ */
1574
+
1575
+ if (methods.IsEmpty() && !_pgpMethod.IsEmpty())
1576
+ {
1577
+ CMethodId id;
1578
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS _pgpMethod, id))
1579
+ methods.Add(UString(_pgpMethod));
1580
+ }
1581
+
1582
+ /*
1583
+ if (methods.IsEmpty() && _pgpMethod.IsEmpty() && _hashSize_Defined)
1584
+ {
1585
+ AddDefaultMethod(methods,
1586
+ utf_nameExtenstion.IsEmpty() ? NULL : utf_nameExtenstion.Ptr(),
1587
+ _hashSize);
1588
+ }
1589
+ */
1590
+
1591
+ if (!methods.IsEmpty())
1592
+ {
1593
+ RINOK(hb_Glob.SetMethods(
1594
+ EXTERNAL_CODECS_LOC_VARS
1595
+ methods))
1596
+ }
1597
+
1598
+ Z7_DECL_CMyComPtr_QI_FROM(
1599
+ IArchiveUpdateCallbackFile,
1600
+ updateCallbackFile, extractCallback)
1601
+ if (!updateCallbackFile)
1602
+ return E_NOTIMPL;
1603
+ {
1604
+ Z7_DECL_CMyComPtr_QI_FROM(
1605
+ IArchiveGetDiskProperty,
1606
+ GetDiskProperty, extractCallback)
1607
+ if (GetDiskProperty)
1608
+ {
1609
+ UInt64 totalSize = 0;
1610
+ UInt32 i;
1611
+ for (i = 0; i < numItems; i++)
1612
+ {
1613
+ const UInt32 index = allFilesMode ? i : indices[i];
1614
+ const CHashPair &hp = HashPairs[index];
1615
+ if (hp.IsDir())
1616
+ continue;
1617
+ {
1618
+ NCOM::CPropVariant prop;
1619
+ RINOK(GetDiskProperty->GetDiskProperty(index, kpidSize, &prop))
1620
+ if (prop.vt != VT_UI8)
1621
+ continue;
1622
+ totalSize += prop.uhVal.QuadPart;
1623
+ }
1624
+ }
1625
+ RINOK(extractCallback->SetTotal(totalSize))
1626
+ // RINOK(Hash_SetTotalUnpacked->Hash_SetTotalUnpacked(indices, numItems));
1627
+ }
1628
+ }
1629
+
1630
+ const UInt32 kBufSize = 1 << 15;
1631
+ CHashMidBuf buf;
1632
+ if (!buf.Alloc(kBufSize))
1633
+ return E_OUTOFMEMORY;
1634
+
1635
+ CMyComPtr2_Create<ICompressProgressInfo, CLocalProgress> lps;
1636
+ lps->Init(extractCallback, false);
1637
+
1638
+ for (UInt32 i = 0;; i++)
1639
+ {
1640
+ RINOK(lps->SetCur())
1641
+ if (i >= numItems)
1642
+ break;
1643
+ const UInt32 index = allFilesMode ? i : indices[i];
1644
+
1645
+ CHashPair &hp = HashPairs[index];
1646
+
1647
+ UString path;
1648
+ hp.Get_UString_Path(path);
1649
+
1650
+ CMyComPtr<ISequentialInStream> inStream;
1651
+ const bool isDir = hp.IsDir();
1652
+ if (!isDir)
1653
+ {
1654
+ RINOK(updateCallbackFile->GetStream2(index, &inStream, NUpdateNotifyOp::kHashRead))
1655
+ if (!inStream)
1656
+ {
1657
+ continue; // we have shown error in GetStream2()
1658
+ }
1659
+ // askMode = NArchive::NExtract::NAskMode::kSkip;
1660
+ }
1661
+
1662
+ Int32 askMode = testMode ?
1663
+ NArchive::NExtract::NAskMode::kTest :
1664
+ NArchive::NExtract::NAskMode::kExtract;
1665
+
1666
+ CMyComPtr<ISequentialOutStream> realOutStream;
1667
+ RINOK(extractCallback->GetStream(index, &realOutStream, askMode))
1668
+
1669
+ /* PrepareOperation() can expect kExtract to set
1670
+ Attrib and security of output file */
1671
+ askMode = NArchive::NExtract::NAskMode::kReadExternal;
1672
+
1673
+ RINOK(extractCallback->PrepareOperation(askMode))
1674
+
1675
+ const bool isAltStream = false;
1676
+
1677
+ UInt64 fileSize = 0;
1678
+
1679
+ CHashBundle hb_Loc;
1680
+
1681
+ CHashBundle *hb_Use = &hb_Glob;
1682
+
1683
+ HRESULT res_SetMethods = S_OK;
1684
+
1685
+ UStringVector methods_loc;
1686
+
1687
+ if (!hp.Method.IsEmpty())
1688
+ {
1689
+ hb_Use = &hb_Loc;
1690
+ CMethodId id;
1691
+ AString methodName = hp.Method;
1692
+ Convert_TagName_to_MethodName(methodName);
1693
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS methodName, id))
1694
+ {
1695
+ methods_loc.Add(UString(methodName));
1696
+ RINOK(hb_Loc.SetMethods(
1697
+ EXTERNAL_CODECS_LOC_VARS
1698
+ methods_loc))
1699
+ }
1700
+ else
1701
+ res_SetMethods = E_NOTIMPL;
1702
+ }
1703
+ else if (methods.IsEmpty())
1704
+ {
1705
+ AddDefaultMethod(methods_loc,
1706
+ _method_for_Extraction.IsEmpty() ? NULL :
1707
+ _method_for_Extraction.Ptr(),
1708
+ (unsigned)hp.Hash.Size());
1709
+ if (!methods_loc.IsEmpty())
1710
+ {
1711
+ hb_Use = &hb_Loc;
1712
+ RINOK(hb_Loc.SetMethods(
1713
+ EXTERNAL_CODECS_LOC_VARS
1714
+ methods_loc))
1715
+ }
1716
+ }
1717
+
1718
+ const bool isSupportedMode = hp.IsSupportedMode();
1719
+ hb_Use->InitForNewFile();
1720
+
1721
+ if (inStream)
1722
+ {
1723
+ for (UInt32 step = 0;; step++)
1724
+ {
1725
+ if ((step & 0xFF) == 0)
1726
+ {
1727
+ RINOK(lps.Interface()->SetRatioInfo(NULL, &fileSize))
1728
+ }
1729
+ UInt32 size;
1730
+ RINOK(inStream->Read(buf, kBufSize, &size))
1731
+ if (size == 0)
1732
+ break;
1733
+ hb_Use->Update(buf, size);
1734
+ if (realOutStream)
1735
+ {
1736
+ RINOK(WriteStream(realOutStream, buf, size))
1737
+ }
1738
+ fileSize += size;
1739
+ }
1740
+
1741
+ hp.Size_from_Disk = fileSize;
1742
+ hp.Size_from_Disk_Defined = true;
1743
+ }
1744
+
1745
+ realOutStream.Release();
1746
+ inStream.Release();
1747
+
1748
+ lps->InSize += hp.Hash.Size();
1749
+ lps->OutSize += fileSize;
1750
+
1751
+ hb_Use->Final(isDir, isAltStream, path);
1752
+
1753
+ Int32 opRes = NArchive::NExtract::NOperationResult::kUnsupportedMethod;
1754
+ if (isSupportedMode
1755
+ && res_SetMethods != E_NOTIMPL
1756
+ && !hb_Use->Hashers.IsEmpty()
1757
+ )
1758
+ {
1759
+ const CHasherState &hs = hb_Use->Hashers[0];
1760
+ if (hs.DigestSize == hp.Hash.Size())
1761
+ {
1762
+ opRes = NArchive::NExtract::NOperationResult::kCRCError;
1763
+ if (CheckDigests(hp.Hash, hs.Digests[0], hs.DigestSize))
1764
+ if (!hp.Size_from_Arc_Defined || hp.Size_from_Arc == fileSize)
1765
+ opRes = NArchive::NExtract::NOperationResult::kOK;
1766
+ }
1767
+ }
1768
+
1769
+ RINOK(extractCallback->SetOperationResult(opRes))
1770
+ }
1771
+
1772
+ return S_OK;
1773
+ COM_TRY_END
1774
+ }
1775
+
1776
+
1777
+ // ---------- UPDATE ----------
1778
+
1779
+ struct CUpdateItem
1780
+ {
1781
+ int IndexInArc;
1782
+ unsigned IndexInClient;
1783
+ UInt64 Size;
1784
+ bool NewData;
1785
+ bool NewProps;
1786
+ bool IsDir;
1787
+ UString Path;
1788
+
1789
+ CUpdateItem(): Size(0), IsDir(false) {}
1790
+ };
1791
+
1792
+
1793
+ static HRESULT GetPropString(IArchiveUpdateCallback *callback, UInt32 index, PROPID propId,
1794
+ UString &res,
1795
+ bool convertSlash)
1796
+ {
1797
+ NCOM::CPropVariant prop;
1798
+ RINOK(callback->GetProperty(index, propId, &prop))
1799
+ if (prop.vt == VT_BSTR)
1800
+ {
1801
+ res = prop.bstrVal;
1802
+ if (convertSlash)
1803
+ NArchive::NItemName::ReplaceSlashes_OsToUnix(res);
1804
+ }
1805
+ else if (prop.vt != VT_EMPTY)
1806
+ return E_INVALIDARG;
1807
+ return S_OK;
1808
+ }
1809
+
1810
+
1811
+ Z7_COM7F_IMF(CHandler::GetFileTimeType(UInt32 *type))
1812
+ {
1813
+ *type = NFileTimeType::kUnix;
1814
+ return S_OK;
1815
+ }
1816
+
1817
+
1818
+ Z7_COM7F_IMF(CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems,
1819
+ IArchiveUpdateCallback *callback))
1820
+ {
1821
+ COM_TRY_BEGIN
1822
+
1823
+ if (_isArc && !CanUpdate())
1824
+ return E_NOTIMPL;
1825
+
1826
+ /*
1827
+ Z7_DECL_CMyComPtr_QI_FROM(IArchiveUpdateCallbackArcProp,
1828
+ reportArcProp, callback)
1829
+ */
1830
+
1831
+ CObjectVector<CUpdateItem> updateItems;
1832
+
1833
+ UInt64 complexity = 0;
1834
+
1835
+ UInt32 i;
1836
+ for (i = 0; i < numItems; i++)
1837
+ {
1838
+ CUpdateItem ui;
1839
+ Int32 newData;
1840
+ Int32 newProps;
1841
+ UInt32 indexInArc;
1842
+
1843
+ if (!callback)
1844
+ return E_FAIL;
1845
+
1846
+ RINOK(callback->GetUpdateItemInfo(i, &newData, &newProps, &indexInArc))
1847
+
1848
+ ui.NewProps = IntToBool(newProps);
1849
+ ui.NewData = IntToBool(newData);
1850
+ ui.IndexInArc = (int)indexInArc;
1851
+ ui.IndexInClient = i;
1852
+ if (IntToBool(newProps))
1853
+ {
1854
+ {
1855
+ NCOM::CPropVariant prop;
1856
+ RINOK(callback->GetProperty(i, kpidIsDir, &prop))
1857
+ if (prop.vt == VT_EMPTY)
1858
+ ui.IsDir = false;
1859
+ else if (prop.vt != VT_BOOL)
1860
+ return E_INVALIDARG;
1861
+ else
1862
+ ui.IsDir = (prop.boolVal != VARIANT_FALSE);
1863
+ }
1864
+
1865
+ RINOK(GetPropString(callback, i, kpidPath, ui.Path,
1866
+ true)) // convertSlash
1867
+ /*
1868
+ if (ui.IsDir && !ui.Name.IsEmpty() && ui.Name.Back() != '/')
1869
+ ui.Name += '/';
1870
+ */
1871
+ }
1872
+
1873
+ if (IntToBool(newData))
1874
+ {
1875
+ NCOM::CPropVariant prop;
1876
+ RINOK(callback->GetProperty(i, kpidSize, &prop))
1877
+ if (prop.vt == VT_UI8)
1878
+ {
1879
+ ui.Size = prop.uhVal.QuadPart;
1880
+ complexity += ui.Size;
1881
+ }
1882
+ else if (prop.vt == VT_EMPTY)
1883
+ ui.Size = (UInt64)(Int64)-1;
1884
+ else
1885
+ return E_INVALIDARG;
1886
+ }
1887
+
1888
+ updateItems.Add(ui);
1889
+ }
1890
+
1891
+ if (complexity != 0)
1892
+ {
1893
+ RINOK(callback->SetTotal(complexity))
1894
+ }
1895
+
1896
+ #ifdef Z7_EXTERNAL_CODECS
1897
+ const CExternalCodecs *_externalCodecs = g_ExternalCodecs_Ptr;
1898
+ #endif
1899
+
1900
+ CHashBundle hb;
1901
+ UStringVector methods;
1902
+ if (!_methods.IsEmpty())
1903
+ {
1904
+ FOR_VECTOR(k, _methods)
1905
+ {
1906
+ methods.Add(_methods[k]);
1907
+ }
1908
+ }
1909
+ else
1910
+ {
1911
+ Z7_DECL_CMyComPtr_QI_FROM(
1912
+ IArchiveGetRootProps,
1913
+ getRootProps, callback)
1914
+ if (getRootProps)
1915
+ {
1916
+ NCOM::CPropVariant prop;
1917
+ RINOK(getRootProps->GetRootProp(kpidArcFileName, &prop))
1918
+ if (prop.vt == VT_BSTR)
1919
+ {
1920
+ AString method;
1921
+ /* const bool isKnownMethod = */ GetMethod_from_FileName(prop.bstrVal, method);
1922
+ if (!method.IsEmpty())
1923
+ {
1924
+ AddDefaultMethod(methods, method, _crcSize_WasSet ? _crcSize : 0);
1925
+ if (methods.IsEmpty())
1926
+ return E_NOTIMPL;
1927
+ }
1928
+ }
1929
+ }
1930
+ }
1931
+ if (methods.IsEmpty() && _crcSize_WasSet)
1932
+ {
1933
+ AddDefaultMethod(methods,
1934
+ NULL, // name
1935
+ _crcSize);
1936
+ }
1937
+
1938
+ RINOK(hb.SetMethods(EXTERNAL_CODECS_LOC_VARS methods))
1939
+
1940
+ CMyComPtr2_Create<ICompressProgressInfo, CLocalProgress> lps;
1941
+ lps->Init(callback, true);
1942
+
1943
+ const UInt32 kBufSize = 1 << 15;
1944
+ CHashMidBuf buf;
1945
+ if (!buf.Alloc(kBufSize))
1946
+ return E_OUTOFMEMORY;
1947
+
1948
+ CDynLimBuf hashFileString((size_t)1 << 31);
1949
+
1950
+ CHashOptionsLocal options = _options;
1951
+
1952
+ if (_isArc)
1953
+ {
1954
+ if (!options.HashMode_Zero.Def && _is_ZeroMode)
1955
+ options.HashMode_Zero.Val = true;
1956
+ if (!options.HashMode_Tag.Def && _are_there_Tags)
1957
+ options.HashMode_Tag.Val = true;
1958
+ if (!options.HashMode_Dirs.Def && _are_there_Dirs)
1959
+ options.HashMode_Dirs.Val = true;
1960
+ }
1961
+ if (options.HashMode_OnlyHash.Val && updateItems.Size() != 1)
1962
+ options.HashMode_OnlyHash.Val = false;
1963
+
1964
+ complexity = 0;
1965
+
1966
+ for (i = 0; i < updateItems.Size(); i++)
1967
+ {
1968
+ lps->InSize = complexity;
1969
+ RINOK(lps->SetCur())
1970
+
1971
+ const CUpdateItem &ui = updateItems[i];
1972
+
1973
+ /*
1974
+ CHashPair item;
1975
+ if (!ui.NewProps)
1976
+ item = HashPairs[(unsigned)ui.IndexInArc];
1977
+ */
1978
+
1979
+ if (ui.NewData)
1980
+ {
1981
+ UInt64 currentComplexity = ui.Size;
1982
+ UInt64 fileSize = 0;
1983
+
1984
+ CMyComPtr<ISequentialInStream> fileInStream;
1985
+ bool needWrite = true;
1986
+ {
1987
+ HRESULT res = callback->GetStream(ui.IndexInClient, &fileInStream);
1988
+
1989
+ if (res == S_FALSE)
1990
+ needWrite = false;
1991
+ else
1992
+ {
1993
+ RINOK(res)
1994
+
1995
+ if (fileInStream)
1996
+ {
1997
+ Z7_DECL_CMyComPtr_QI_FROM(
1998
+ IStreamGetSize,
1999
+ streamGetSize, fileInStream)
2000
+ if (streamGetSize)
2001
+ {
2002
+ UInt64 size;
2003
+ if (streamGetSize->GetSize(&size) == S_OK)
2004
+ currentComplexity = size;
2005
+ }
2006
+ /*
2007
+ Z7_DECL_CMyComPtr_QI_FROM(
2008
+ IStreamGetProps,
2009
+ getProps, fileInStream)
2010
+ if (getProps)
2011
+ {
2012
+ FILETIME mTime;
2013
+ UInt64 size2;
2014
+ if (getProps->GetProps(&size2, NULL, NULL, &mTime, NULL) == S_OK)
2015
+ {
2016
+ currentComplexity = size2;
2017
+ // item.MTime = NTime::FileTimeToUnixTime64(mTime);;
2018
+ }
2019
+ }
2020
+ */
2021
+ }
2022
+ else
2023
+ {
2024
+ currentComplexity = 0;
2025
+ }
2026
+ }
2027
+ }
2028
+
2029
+ hb.InitForNewFile();
2030
+ const bool isDir = ui.IsDir;
2031
+
2032
+ if (needWrite && fileInStream && !isDir)
2033
+ {
2034
+ for (UInt32 step = 0;; step++)
2035
+ {
2036
+ if ((step & 0xFF) == 0)
2037
+ {
2038
+ RINOK(lps.Interface()->SetRatioInfo(&fileSize, NULL))
2039
+ // RINOK(callback->SetCompleted(&completeValue));
2040
+ }
2041
+ UInt32 size;
2042
+ RINOK(fileInStream->Read(buf, kBufSize, &size))
2043
+ if (size == 0)
2044
+ break;
2045
+ hb.Update(buf, size);
2046
+ fileSize += size;
2047
+ }
2048
+ currentComplexity = fileSize;
2049
+ }
2050
+
2051
+ fileInStream.Release();
2052
+ const bool isAltStream = false;
2053
+ hb.Final(isDir, isAltStream, ui.Path);
2054
+
2055
+ if (options.HashMode_Dirs.Val || !isDir)
2056
+ {
2057
+ if (!hb.Hashers.IsEmpty())
2058
+ lps->OutSize += hb.Hashers[0].DigestSize;
2059
+ WriteLine(hashFileString,
2060
+ options,
2061
+ ui.Path,
2062
+ isDir,
2063
+ hb);
2064
+ if (hashFileString.IsError())
2065
+ return E_OUTOFMEMORY;
2066
+ }
2067
+
2068
+ complexity += currentComplexity;
2069
+
2070
+ /*
2071
+ if (reportArcProp)
2072
+ {
2073
+ PROPVARIANT prop;
2074
+ prop.vt = VT_EMPTY;
2075
+ prop.wReserved1 = 0;
2076
+
2077
+ NCOM::PropVarEm_Set_UInt64(&prop, fileSize);
2078
+ RINOK(reportArcProp->ReportProp(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient, kpidSize, &prop));
2079
+
2080
+ for (unsigned k = 0; k < hb.Hashers.Size(); k++)
2081
+ {
2082
+ const CHasherState &hs = hb.Hashers[k];
2083
+
2084
+ if (hs.DigestSize == 4 && hs.Name.IsEqualTo_Ascii_NoCase("crc32"))
2085
+ {
2086
+ NCOM::PropVarEm_Set_UInt32(&prop, GetUi32(hs.Digests[k_HashCalc_Index_Current]));
2087
+ RINOK(reportArcProp->ReportProp(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient, kpidCRC, &prop));
2088
+ }
2089
+ else
2090
+ {
2091
+ RINOK(reportArcProp->ReportRawProp(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient,
2092
+ kpidChecksum, hs.Digests[k_HashCalc_Index_Current],
2093
+ hs.DigestSize, NPropDataType::kRaw));
2094
+ }
2095
+ RINOK(reportArcProp->ReportFinished(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient, NArchive::NUpdate::NOperationResult::kOK));
2096
+ }
2097
+ }
2098
+ */
2099
+ RINOK(callback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK))
2100
+ }
2101
+ else
2102
+ {
2103
+ // old data
2104
+ const CHashPair &existItem = HashPairs[(unsigned)ui.IndexInArc];
2105
+ if (ui.NewProps)
2106
+ {
2107
+ WriteLine(hashFileString,
2108
+ options,
2109
+ ui.Path,
2110
+ ui.IsDir,
2111
+ existItem.Method, existItem.HashString
2112
+ );
2113
+ }
2114
+ else
2115
+ {
2116
+ hashFileString += existItem.FullLine;
2117
+ Add_LF(hashFileString, options);
2118
+ }
2119
+ }
2120
+ if (hashFileString.IsError())
2121
+ return E_OUTOFMEMORY;
2122
+ }
2123
+
2124
+ RINOK(WriteStream(outStream, hashFileString, hashFileString.Len()))
2125
+
2126
+ return S_OK;
2127
+ COM_TRY_END
2128
+ }
2129
+
2130
+
2131
+
2132
+ HRESULT CHandler::SetProperty(const wchar_t *nameSpec, const PROPVARIANT &value)
2133
+ {
2134
+ UString name = nameSpec;
2135
+ name.MakeLower_Ascii();
2136
+ if (name.IsEmpty())
2137
+ return E_INVALIDARG;
2138
+
2139
+ if (name.IsEqualTo("m")) // "hm" hash method
2140
+ {
2141
+ // COneMethodInfo omi;
2142
+ // RINOK(omi.ParseMethodFromPROPVARIANT(L"", value));
2143
+ // _methods.Add(omi.MethodName); // change it. use omi.PropsString
2144
+ if (value.vt != VT_BSTR)
2145
+ return E_INVALIDARG;
2146
+ UString s (value.bstrVal);
2147
+ _methods.Add(s);
2148
+ return S_OK;
2149
+ }
2150
+
2151
+ if (name.IsEqualTo("flags"))
2152
+ {
2153
+ if (value.vt != VT_BSTR)
2154
+ return E_INVALIDARG;
2155
+ if (!_options.ParseString(value.bstrVal))
2156
+ return E_INVALIDARG;
2157
+ return S_OK;
2158
+ }
2159
+
2160
+ if (name.IsEqualTo("backslash"))
2161
+ return PROPVARIANT_to_bool(value, _supportWindowsBackslash);
2162
+
2163
+ if (name.IsPrefixedBy_Ascii_NoCase("crc"))
2164
+ {
2165
+ name.Delete(0, 3);
2166
+ _crcSize = 4;
2167
+ _crcSize_WasSet = true;
2168
+ return ParsePropToUInt32(name, value, _crcSize);
2169
+ }
2170
+
2171
+ // common properties
2172
+ if (name.IsPrefixedBy_Ascii_NoCase("mt")
2173
+ || name.IsPrefixedBy_Ascii_NoCase("memuse"))
2174
+ return S_OK;
2175
+
2176
+ return E_INVALIDARG;
2177
+ }
2178
+
2179
+
2180
+ void CHandler::InitProps()
2181
+ {
2182
+ _supportWindowsBackslash = true;
2183
+ _crcSize_WasSet = false;
2184
+ _crcSize = 4;
2185
+ _methods.Clear();
2186
+ _options.Init_HashOptionsLocal();
2187
+ }
2188
+
2189
+ Z7_COM7F_IMF(CHandler::SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps))
2190
+ {
2191
+ COM_TRY_BEGIN
2192
+
2193
+ InitProps();
2194
+
2195
+ for (UInt32 i = 0; i < numProps; i++)
2196
+ {
2197
+ RINOK(SetProperty(names[i], values[i]))
2198
+ }
2199
+ return S_OK;
2200
+ COM_TRY_END
2201
+ }
2202
+
2203
+ CHandler::CHandler()
2204
+ {
2205
+ ClearVars();
2206
+ InitProps();
2207
+ }
2208
+
2209
+ }
2210
+
2211
+
2212
+
2213
+ static IInArchive *CreateHashHandler_In() { return new NHash::CHandler; }
2214
+ static IOutArchive *CreateHashHandler_Out() { return new NHash::CHandler; }
2215
+
2216
+ void Codecs_AddHashArcHandler(CCodecs *codecs)
2217
+ {
2218
+ {
2219
+ CArcInfoEx item;
2220
+
2221
+ item.Name = "Hash";
2222
+ item.CreateInArchive = CreateHashHandler_In;
2223
+ item.CreateOutArchive = CreateHashHandler_Out;
2224
+ item.IsArcFunc = NULL;
2225
+ item.Flags =
2226
+ NArcInfoFlags::kKeepName
2227
+ | NArcInfoFlags::kStartOpen
2228
+ | NArcInfoFlags::kByExtOnlyOpen
2229
+ // | NArcInfoFlags::kPureStartOpen
2230
+ | NArcInfoFlags::kHashHandler
2231
+ ;
2232
+
2233
+ // ubuntu uses "SHA256SUMS" file
2234
+ item.AddExts(UString (
2235
+ "sha256"
2236
+ " sha512"
2237
+ " sha384"
2238
+ " sha224"
2239
+ " sha512-224"
2240
+ " sha512-256"
2241
+ " sha3-224"
2242
+ " sha3-256"
2243
+ " sha3-384"
2244
+ " sha3-512"
2245
+ // " shake128"
2246
+ // " shake256"
2247
+ " sha1"
2248
+ " sha2"
2249
+ " sha3"
2250
+ " sha"
2251
+ " md5"
2252
+ " blake2s"
2253
+ " blake2b"
2254
+ " blake2sp"
2255
+ " xxh64"
2256
+ " crc32"
2257
+ " crc64"
2258
+ " cksum"
2259
+ " asc"
2260
+ // " b2sum"
2261
+ ),
2262
+ UString());
2263
+
2264
+ item.UpdateEnabled = (item.CreateOutArchive != NULL);
2265
+ item.SignatureOffset = 0;
2266
+ // item.Version = MY_VER_MIX;
2267
+ item.NewInterface = true;
2268
+
2269
+ item.Signatures.AddNew().CopyFrom(NULL, 0);
2270
+
2271
+ codecs->Formats.Add(item);
2272
+ }
2273
+ }