react-native-update 10.34.1 → 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 +6 -0
  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,1764 @@
1
+ // 7zIn.cpp
2
+
3
+ #include "StdAfx.h"
4
+
5
+ #ifdef _WIN32
6
+ #include <wchar.h>
7
+ #else
8
+ #include <ctype.h>
9
+ #endif
10
+
11
+ #include "../../../../C/7zCrc.h"
12
+ #include "../../../../C/CpuArch.h"
13
+
14
+ #include "../../../Common/MyBuffer2.h"
15
+ // #include "../../../Common/UTFConvert.h"
16
+
17
+ #include "../../Common/StreamObjects.h"
18
+ #include "../../Common/StreamUtils.h"
19
+
20
+ #include "7zDecode.h"
21
+ #include "7zIn.h"
22
+
23
+ #define Get16(p) GetUi16(p)
24
+ #define Get32(p) GetUi32(p)
25
+ #define Get64(p) GetUi64(p)
26
+
27
+ // define FORMAT_7Z_RECOVERY if you want to recover multivolume archives with empty StartHeader
28
+ #ifndef Z7_SFX
29
+ #define FORMAT_7Z_RECOVERY
30
+ #endif
31
+
32
+ using namespace NWindows;
33
+ using namespace NCOM;
34
+
35
+ unsigned BoolVector_CountSum(const CBoolVector &v);
36
+ Z7_NO_INLINE
37
+ unsigned BoolVector_CountSum(const CBoolVector &v)
38
+ {
39
+ unsigned sum = 0;
40
+ const unsigned size = v.Size();
41
+ if (size)
42
+ {
43
+ const bool *p = v.ConstData();
44
+ const bool * const lim = p + size;
45
+ do
46
+ if (*p)
47
+ sum++;
48
+ while (++p != lim);
49
+ }
50
+ return sum;
51
+ }
52
+
53
+ static inline bool BoolVector_Item_IsValidAndTrue(const CBoolVector &v, unsigned i)
54
+ {
55
+ return i < v.Size() ? v[i] : false;
56
+ }
57
+
58
+ Z7_NO_INLINE
59
+ static void BoolVector_Fill_False(CBoolVector &v, unsigned size)
60
+ {
61
+ v.ClearAndSetSize(size);
62
+ bool *p = v.NonConstData();
63
+ for (unsigned i = 0; i < size; i++)
64
+ p[i] = false;
65
+ }
66
+
67
+
68
+ namespace NArchive {
69
+ namespace N7z {
70
+
71
+ #define k_Scan_NumCoders_MAX 64
72
+ #define k_Scan_NumCodersStreams_in_Folder_MAX 64
73
+
74
+ class CInArchiveException {};
75
+ class CUnsupportedFeatureException: public CInArchiveException {};
76
+
77
+ Z7_ATTR_NORETURN
78
+ static void ThrowException() { throw CInArchiveException(); }
79
+ Z7_ATTR_NORETURN
80
+ static inline void ThrowEndOfData() { ThrowException(); }
81
+ Z7_ATTR_NORETURN
82
+ static inline void ThrowUnsupported() { throw CUnsupportedFeatureException(); }
83
+ Z7_ATTR_NORETURN
84
+ static inline void ThrowIncorrect() { ThrowException(); }
85
+
86
+ class CStreamSwitch
87
+ {
88
+ CInArchive *_archive;
89
+ bool _needRemove;
90
+ bool _needUpdatePos;
91
+ public:
92
+ CStreamSwitch(): _needRemove(false), _needUpdatePos(false) {}
93
+ ~CStreamSwitch() { Remove(); }
94
+ void Remove();
95
+ void Set(CInArchive *archive, const Byte *data, size_t size, bool needUpdatePos);
96
+ void Set(CInArchive *archive, const CByteBuffer &byteBuffer);
97
+ void Set(CInArchive *archive, const CObjectVector<CByteBuffer> *dataVector);
98
+ };
99
+
100
+ void CStreamSwitch::Remove()
101
+ {
102
+ if (_needRemove)
103
+ {
104
+ if (_archive->_inByteBack->GetRem() != 0)
105
+ _archive->ThereIsHeaderError = true;
106
+ _archive->DeleteByteStream(_needUpdatePos);
107
+ _needRemove = false;
108
+ }
109
+ }
110
+
111
+ void CStreamSwitch::Set(CInArchive *archive, const Byte *data, size_t size, bool needUpdatePos)
112
+ {
113
+ Remove();
114
+ _archive = archive;
115
+ _archive->AddByteStream(data, size);
116
+ _needRemove = true;
117
+ _needUpdatePos = needUpdatePos;
118
+ }
119
+
120
+ void CStreamSwitch::Set(CInArchive *archive, const CByteBuffer &byteBuffer)
121
+ {
122
+ Set(archive, byteBuffer, byteBuffer.Size(), false);
123
+ }
124
+
125
+ void CStreamSwitch::Set(CInArchive *archive, const CObjectVector<CByteBuffer> *dataVector)
126
+ {
127
+ Remove();
128
+ const Byte external = archive->ReadByte();
129
+ if (external != 0)
130
+ {
131
+ if (!dataVector)
132
+ ThrowIncorrect();
133
+ const CNum dataIndex = archive->ReadNum();
134
+ if (dataIndex >= dataVector->Size())
135
+ ThrowIncorrect();
136
+ Set(archive, (*dataVector)[dataIndex]);
137
+ }
138
+ }
139
+
140
+ void CInArchive::AddByteStream(const Byte *buf, size_t size)
141
+ {
142
+ if (_numInByteBufs == kNumBufLevelsMax)
143
+ ThrowIncorrect();
144
+ _inByteBack = &_inByteVector[_numInByteBufs++];
145
+ _inByteBack->Init(buf, size);
146
+ }
147
+
148
+
149
+ Byte CInByte2::ReadByte()
150
+ {
151
+ if (_pos >= _size)
152
+ ThrowEndOfData();
153
+ return _buffer[_pos++];
154
+ }
155
+
156
+ void CInByte2::ReadBytes(Byte *data, size_t size)
157
+ {
158
+ if (size == 0)
159
+ return;
160
+ if (size > _size - _pos)
161
+ ThrowEndOfData();
162
+ memcpy(data, _buffer + _pos, size);
163
+ _pos += size;
164
+ }
165
+
166
+ void CInByte2::SkipData(UInt64 size)
167
+ {
168
+ if (size > _size - _pos)
169
+ ThrowEndOfData();
170
+ _pos += (size_t)size;
171
+ }
172
+
173
+ void CInByte2::SkipData()
174
+ {
175
+ SkipData(ReadNumber());
176
+ }
177
+
178
+ static UInt64 ReadNumberSpec(const Byte *p, size_t size, size_t &processed)
179
+ {
180
+ if (size == 0)
181
+ {
182
+ processed = 0;
183
+ return 0;
184
+ }
185
+
186
+ const unsigned b = *p++;
187
+ size--;
188
+
189
+ if ((b & 0x80) == 0)
190
+ {
191
+ processed = 1;
192
+ return b;
193
+ }
194
+
195
+ if (size == 0)
196
+ {
197
+ processed = 0;
198
+ return 0;
199
+ }
200
+
201
+ UInt64 value = (UInt64)*p;
202
+ p++;
203
+ size--;
204
+
205
+ for (unsigned i = 1; i < 8; i++)
206
+ {
207
+ const unsigned mask = (unsigned)0x80 >> i;
208
+ if ((b & mask) == 0)
209
+ {
210
+ const UInt64 high = b & (mask - 1);
211
+ value |= (high << (i * 8));
212
+ processed = i + 1;
213
+ return value;
214
+ }
215
+
216
+ if (size == 0)
217
+ {
218
+ processed = 0;
219
+ return 0;
220
+ }
221
+
222
+ value |= ((UInt64)*p << (i * 8));
223
+ p++;
224
+ size--;
225
+ }
226
+
227
+ processed = 9;
228
+ return value;
229
+ }
230
+
231
+ UInt64 CInByte2::ReadNumber()
232
+ {
233
+ size_t processed;
234
+ const UInt64 res = ReadNumberSpec(_buffer + _pos, _size - _pos, processed);
235
+ if (processed == 0)
236
+ ThrowEndOfData();
237
+ _pos += processed;
238
+ return res;
239
+ }
240
+
241
+ CNum CInByte2::ReadNum()
242
+ {
243
+ /*
244
+ if (_pos < _size)
245
+ {
246
+ Byte val = _buffer[_pos];
247
+ if ((unsigned)val < 0x80)
248
+ {
249
+ _pos++;
250
+ return (unsigned)val;
251
+ }
252
+ }
253
+ */
254
+ const UInt64 value = ReadNumber();
255
+ if (value > kNumMax)
256
+ ThrowUnsupported();
257
+ return (CNum)value;
258
+ }
259
+
260
+ UInt32 CInByte2::ReadUInt32()
261
+ {
262
+ if (_pos + 4 > _size)
263
+ ThrowEndOfData();
264
+ const UInt32 res = Get32(_buffer + _pos);
265
+ _pos += 4;
266
+ return res;
267
+ }
268
+
269
+ UInt64 CInByte2::ReadUInt64()
270
+ {
271
+ if (_pos + 8 > _size)
272
+ ThrowEndOfData();
273
+ const UInt64 res = Get64(_buffer + _pos);
274
+ _pos += 8;
275
+ return res;
276
+ }
277
+
278
+ #define Y0 '7'
279
+ #define Y1 'z'
280
+ #define Y2 0xBC
281
+ #define Y3 0xAF
282
+ #define Y4 0x27
283
+ #define Y5 0x1C
284
+
285
+ #define IS_SIGNATURE(p)( \
286
+ (p)[2] == Y2 && \
287
+ (p)[3] == Y3 && \
288
+ (p)[5] == Y5 && \
289
+ (p)[4] == Y4 && \
290
+ (p)[1] == Y1 && \
291
+ (p)[0] == Y0)
292
+
293
+ /* FindSignature_10() is allowed to access data up to and including &limit[9].
294
+ limit[10] access is not allowed.
295
+ return:
296
+ (return_ptr < limit) : signature was found at (return_ptr)
297
+ (return_ptr >= limit) : limit was reached or crossed. So no signature found before limit
298
+ */
299
+ Z7_NO_INLINE
300
+ static const Byte *FindSignature_10(const Byte *p, const Byte *limit)
301
+ {
302
+ for (;;)
303
+ {
304
+ for (;;)
305
+ {
306
+ if (p >= limit)
307
+ return limit;
308
+ const Byte b = p[5];
309
+ p += 6;
310
+ if (b == Y0) { break; }
311
+ if (b == Y1) { p -= 1; break; }
312
+ if (b == Y2) { p -= 2; break; }
313
+ if (b == Y3) { p -= 3; break; }
314
+ if (b == Y4) { p -= 4; break; }
315
+ if (b == Y5) { p -= 5; break; }
316
+ }
317
+ if (IS_SIGNATURE(p - 1))
318
+ return p - 1;
319
+ }
320
+ }
321
+
322
+
323
+ static inline bool TestStartCrc(const Byte *p)
324
+ {
325
+ return CrcCalc(p + 12, 20) == Get32(p + 8);
326
+ }
327
+
328
+ static inline bool TestSignature2(const Byte *p)
329
+ {
330
+ if (!IS_SIGNATURE(p))
331
+ return false;
332
+ #ifdef FORMAT_7Z_RECOVERY
333
+ if (TestStartCrc(p))
334
+ return true;
335
+ for (unsigned i = 8; i < kHeaderSize; i++)
336
+ if (p[i] != 0)
337
+ return false;
338
+ return (p[6] != 0 || p[7] != 0);
339
+ #else
340
+ return TestStartCrc(p);
341
+ #endif
342
+ }
343
+
344
+
345
+ HRESULT CInArchive::FindAndReadSignature(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
346
+ {
347
+ RINOK(ReadStream_FALSE(stream, _header, kHeaderSize))
348
+
349
+ if (TestSignature2(_header))
350
+ return S_OK;
351
+ if (searchHeaderSizeLimit && *searchHeaderSizeLimit == 0)
352
+ return S_FALSE;
353
+
354
+ const UInt32 kBufSize = (1 << 15) + kHeaderSize; // must be > (kHeaderSize * 2)
355
+ CAlignedBuffer1 buf(kBufSize);
356
+ memcpy(buf, _header, kHeaderSize);
357
+ UInt64 offset = 0;
358
+
359
+ for (;;)
360
+ {
361
+ UInt32 readSize =
362
+ (offset == 0) ?
363
+ kBufSize - kHeaderSize - kHeaderSize :
364
+ kBufSize - kHeaderSize;
365
+ if (searchHeaderSizeLimit)
366
+ {
367
+ const UInt64 rem = *searchHeaderSizeLimit - offset;
368
+ if (readSize > rem)
369
+ readSize = (UInt32)rem;
370
+ if (readSize == 0)
371
+ return S_FALSE;
372
+ }
373
+
374
+ UInt32 processed = 0;
375
+ RINOK(stream->Read(buf + kHeaderSize, readSize, &processed))
376
+ if (processed == 0)
377
+ return S_FALSE;
378
+
379
+ /* &buf[0] was already tested for signature before.
380
+ So first search here will be for &buf[1] */
381
+
382
+ for (UInt32 pos = 0;;)
383
+ {
384
+ const Byte *p = buf + pos + 1;
385
+ const Byte *lim = buf + processed + 1;
386
+ /* we have (kHeaderSize - 1 = 31) filled bytes starting from (lim),
387
+ and it's safe to access just 10 bytes in that reserved area */
388
+ p = FindSignature_10(p, lim);
389
+ if (p >= lim)
390
+ break;
391
+ pos = (UInt32)(p - buf);
392
+ if (TestStartCrc(p))
393
+ {
394
+ memcpy(_header, p, kHeaderSize);
395
+ _arhiveBeginStreamPosition += offset + pos;
396
+ return InStream_SeekSet(stream, _arhiveBeginStreamPosition + kHeaderSize);
397
+ }
398
+ }
399
+
400
+ offset += processed;
401
+ memmove(buf, buf + processed, kHeaderSize);
402
+ }
403
+ }
404
+
405
+ // S_FALSE means that file is not archive
406
+ HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
407
+ {
408
+ HeadersSize = 0;
409
+ Close();
410
+ RINOK(InStream_GetPos_GetSize(stream, _arhiveBeginStreamPosition, _fileEndPosition))
411
+ RINOK(FindAndReadSignature(stream, searchHeaderSizeLimit))
412
+ _stream = stream;
413
+ return S_OK;
414
+ }
415
+
416
+ void CInArchive::Close()
417
+ {
418
+ _numInByteBufs = 0;
419
+ _stream.Release();
420
+ ThereIsHeaderError = false;
421
+ }
422
+
423
+ void CInArchive::ReadArchiveProperties(CInArchiveInfo & /* archiveInfo */)
424
+ {
425
+ for (;;)
426
+ {
427
+ if (ReadID() == NID::kEnd)
428
+ break;
429
+ SkipData();
430
+ }
431
+ }
432
+
433
+ // CFolder &folder can be non empty. So we must set all fields
434
+
435
+ void CInByte2::ParseFolder(CFolder &folder)
436
+ {
437
+ const UInt32 numCoders = ReadNum();
438
+
439
+ if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX)
440
+ ThrowUnsupported();
441
+
442
+ folder.Coders.SetSize(numCoders);
443
+
444
+ UInt32 numInStreams = 0;
445
+ UInt32 i;
446
+ for (i = 0; i < numCoders; i++)
447
+ {
448
+ CCoderInfo &coder = folder.Coders[i];
449
+ {
450
+ const Byte mainByte = ReadByte();
451
+ if ((mainByte & 0xC0) != 0)
452
+ ThrowUnsupported();
453
+ const unsigned idSize = (mainByte & 0xF);
454
+ if (idSize > 8 || idSize > GetRem())
455
+ ThrowUnsupported();
456
+ const Byte *longID = GetPtr();
457
+ UInt64 id = 0;
458
+ for (unsigned j = 0; j < idSize; j++)
459
+ id = ((id << 8) | longID[j]);
460
+ SkipDataNoCheck(idSize);
461
+ coder.MethodID = id;
462
+
463
+ if ((mainByte & 0x10) != 0)
464
+ {
465
+ coder.NumStreams = ReadNum();
466
+ // if (coder.NumStreams > k_Scan_NumCodersStreams_in_Folder_MAX) ThrowUnsupported();
467
+ /* numOutStreams = */ ReadNum();
468
+ // if (ReadNum() != 1) // numOutStreams ThrowUnsupported();
469
+ }
470
+ else
471
+ {
472
+ coder.NumStreams = 1;
473
+ }
474
+
475
+ if ((mainByte & 0x20) != 0)
476
+ {
477
+ const CNum propsSize = ReadNum();
478
+ coder.Props.Alloc((size_t)propsSize);
479
+ ReadBytes((Byte *)coder.Props, (size_t)propsSize);
480
+ }
481
+ else
482
+ coder.Props.Free();
483
+ }
484
+ numInStreams += coder.NumStreams;
485
+ }
486
+
487
+ const UInt32 numBonds = numCoders - 1;
488
+ folder.Bonds.SetSize(numBonds);
489
+ for (i = 0; i < numBonds; i++)
490
+ {
491
+ CBond &bp = folder.Bonds[i];
492
+ bp.PackIndex = ReadNum();
493
+ bp.UnpackIndex = ReadNum();
494
+ }
495
+
496
+ if (numInStreams < numBonds)
497
+ ThrowUnsupported();
498
+ const UInt32 numPackStreams = numInStreams - numBonds;
499
+ folder.PackStreams.SetSize(numPackStreams);
500
+
501
+ if (numPackStreams == 1)
502
+ {
503
+ for (i = 0; i < numInStreams; i++)
504
+ if (folder.FindBond_for_PackStream(i) < 0)
505
+ {
506
+ folder.PackStreams[0] = i;
507
+ break;
508
+ }
509
+ if (i == numInStreams)
510
+ ThrowUnsupported();
511
+ }
512
+ else
513
+ for (i = 0; i < numPackStreams; i++)
514
+ folder.PackStreams[i] = ReadNum();
515
+ }
516
+
517
+ void CFolders::ParseFolderInfo(unsigned folderIndex, CFolder &folder) const
518
+ {
519
+ const size_t startPos = FoCodersDataOffset[folderIndex];
520
+ CInByte2 inByte;
521
+ inByte.Init(CodersData.ConstData() + startPos, FoCodersDataOffset[folderIndex + 1] - startPos);
522
+ inByte.ParseFolder(folder);
523
+ if (inByte.GetRem() != 0)
524
+ throw 20120424;
525
+ }
526
+
527
+
528
+ void CDatabase::GetPath(unsigned index, UString &path) const
529
+ {
530
+ path.Empty();
531
+ if (!NameOffsets || !NamesBuf)
532
+ return;
533
+
534
+ const size_t offset = NameOffsets[index];
535
+ const size_t size = NameOffsets[index + 1] - offset;
536
+
537
+ if (size >= (1 << 28))
538
+ return;
539
+
540
+ wchar_t *s = path.GetBuf((unsigned)size - 1);
541
+
542
+ const Byte *p = ((const Byte *)NamesBuf + offset * 2);
543
+
544
+ #if defined(_WIN32) && defined(MY_CPU_LE)
545
+
546
+ wmemcpy(s, (const wchar_t *)(const void *)p, size);
547
+
548
+ #else
549
+
550
+ for (size_t i = 0; i < size; i++)
551
+ {
552
+ *s = Get16(p);
553
+ p += 2;
554
+ s++;
555
+ }
556
+
557
+ #endif
558
+
559
+ path.ReleaseBuf_SetLen((unsigned)size - 1);
560
+ }
561
+
562
+ HRESULT CDatabase::GetPath_Prop(unsigned index, PROPVARIANT *path) const throw()
563
+ {
564
+ PropVariant_Clear(path);
565
+ if (!NameOffsets || !NamesBuf)
566
+ return S_OK;
567
+
568
+ const size_t offset = NameOffsets[index];
569
+ const size_t size = NameOffsets[index + 1] - offset;
570
+
571
+ if (size >= (1 << 14))
572
+ return S_OK;
573
+
574
+ // (size) includes null terminator
575
+
576
+ /*
577
+ #if WCHAR_MAX > 0xffff
578
+
579
+ const Byte *p = ((const Byte *)NamesBuf + offset * 2);
580
+ size = Utf16LE__Get_Num_WCHARs(p, size - 1);
581
+ // (size) doesn't include null terminator
582
+ RINOK(PropVarEm_Alloc_Bstr(path, (unsigned)size));
583
+ wchar_t *s = path->bstrVal;
584
+ wchar_t *sEnd = Utf16LE__To_WCHARs_Sep(p, size, s);
585
+ *sEnd = 0;
586
+ if (s + size != sEnd) return E_FAIL;
587
+
588
+ #else
589
+ */
590
+
591
+ RINOK(PropVarEm_Alloc_Bstr(path, (unsigned)size - 1))
592
+ wchar_t *s = path->bstrVal;
593
+ const Byte *p = ((const Byte *)NamesBuf + offset * 2);
594
+ // Utf16LE__To_WCHARs_Sep(p, size, s);
595
+
596
+ for (size_t i = 0; i < size; i++)
597
+ {
598
+ wchar_t c = Get16(p);
599
+ p += 2;
600
+ #if WCHAR_PATH_SEPARATOR != L'/'
601
+ if (c == L'/')
602
+ c = WCHAR_PATH_SEPARATOR;
603
+ else if (c == L'\\')
604
+ c = WCHAR_IN_FILE_NAME_BACKSLASH_REPLACEMENT; // WSL scheme
605
+ #endif
606
+ *s++ = c;
607
+ }
608
+
609
+ // #endif
610
+
611
+ return S_OK;
612
+
613
+ /*
614
+ unsigned cur = index;
615
+ unsigned size = 0;
616
+
617
+ for (int i = 0;; i++)
618
+ {
619
+ size_t len = NameOffsets[cur + 1] - NameOffsets[cur];
620
+ size += (unsigned)len;
621
+ if (i > 256 || len > (1 << 14) || size > (1 << 14))
622
+ return PropVarEm_Set_Str(path, "[TOO-LONG]");
623
+ cur = Files[cur].Parent;
624
+ if (cur < 0)
625
+ break;
626
+ }
627
+ size--;
628
+
629
+ RINOK(PropVarEm_Alloc_Bstr(path, size));
630
+ wchar_t *s = path->bstrVal;
631
+ s += size;
632
+ *s = 0;
633
+ cur = index;
634
+
635
+ for (;;)
636
+ {
637
+ unsigned len = (unsigned)(NameOffsets[cur + 1] - NameOffsets[cur] - 1);
638
+ const Byte *p = (const Byte *)NamesBuf + (NameOffsets[cur + 1] * 2) - 2;
639
+ for (; len != 0; len--)
640
+ {
641
+ p -= 2;
642
+ --s;
643
+ wchar_t c = Get16(p);
644
+ if (c == '/')
645
+ c = WCHAR_PATH_SEPARATOR;
646
+ *s = c;
647
+ }
648
+
649
+ const CFileItem &file = Files[cur];
650
+ cur = file.Parent;
651
+ if (cur < 0)
652
+ return S_OK;
653
+ *(--s) = (file.IsAltStream ? ':' : WCHAR_PATH_SEPARATOR);
654
+ }
655
+ */
656
+ }
657
+
658
+ void CInArchive::WaitId(UInt64 id)
659
+ {
660
+ for (;;)
661
+ {
662
+ const UInt64 type = ReadID();
663
+ if (type == id)
664
+ return;
665
+ if (type == NID::kEnd)
666
+ ThrowIncorrect();
667
+ SkipData();
668
+ }
669
+ }
670
+
671
+
672
+ void CInArchive::Read_UInt32_Vector(CUInt32DefVector &v)
673
+ {
674
+ const unsigned numItems = v.Defs.Size();
675
+ v.Vals.ClearAndSetSize(numItems);
676
+ UInt32 *p = &v.Vals[0];
677
+ const bool *defs = &v.Defs[0];
678
+ for (unsigned i = 0; i < numItems; i++)
679
+ {
680
+ UInt32 a = 0;
681
+ if (defs[i])
682
+ a = ReadUInt32();
683
+ p[i] = a;
684
+ }
685
+ }
686
+
687
+
688
+ void CInArchive::ReadHashDigests(unsigned numItems, CUInt32DefVector &crcs)
689
+ {
690
+ ReadBoolVector2(numItems, crcs.Defs);
691
+ Read_UInt32_Vector(crcs);
692
+ }
693
+
694
+
695
+ void CInArchive::ReadPackInfo(CFolders &f)
696
+ {
697
+ const CNum numPackStreams = ReadNum();
698
+
699
+ WaitId(NID::kSize);
700
+ f.PackPositions.Alloc(numPackStreams + 1);
701
+ f.NumPackStreams = numPackStreams;
702
+ UInt64 sum = 0;
703
+ for (CNum i = 0; i < numPackStreams; i++)
704
+ {
705
+ f.PackPositions[i] = sum;
706
+ const UInt64 packSize = ReadNumber();
707
+ sum += packSize;
708
+ if (sum < packSize)
709
+ ThrowIncorrect();
710
+ }
711
+ f.PackPositions[numPackStreams] = sum;
712
+
713
+ UInt64 type;
714
+ for (;;)
715
+ {
716
+ type = ReadID();
717
+ if (type == NID::kEnd)
718
+ return;
719
+ if (type == NID::kCRC)
720
+ {
721
+ CUInt32DefVector PackCRCs;
722
+ ReadHashDigests(numPackStreams, PackCRCs);
723
+ continue;
724
+ }
725
+ SkipData();
726
+ }
727
+ }
728
+
729
+ void CInArchive::ReadUnpackInfo(
730
+ const CObjectVector<CByteBuffer> *dataVector,
731
+ CFolders &folders)
732
+ {
733
+ WaitId(NID::kFolder);
734
+ const CNum numFolders = ReadNum();
735
+
736
+ CNum numCodersOutStreams = 0;
737
+ {
738
+ CStreamSwitch streamSwitch;
739
+ streamSwitch.Set(this, dataVector);
740
+ const Byte *startBufPtr = _inByteBack->GetPtr();
741
+ folders.NumFolders = numFolders;
742
+
743
+ folders.FoStartPackStreamIndex.Alloc(numFolders + 1);
744
+ folders.FoToMainUnpackSizeIndex.Alloc(numFolders);
745
+ folders.FoCodersDataOffset.Alloc(numFolders + 1);
746
+ folders.FoToCoderUnpackSizes.Alloc(numFolders + 1);
747
+
748
+ CBoolVector StreamUsed;
749
+ CBoolVector CoderUsed;
750
+
751
+ CNum packStreamIndex = 0;
752
+ CNum fo;
753
+ CInByte2 *inByte = _inByteBack;
754
+
755
+ for (fo = 0; fo < numFolders; fo++)
756
+ {
757
+ UInt32 indexOfMainStream = 0;
758
+ UInt32 numPackStreams = 0;
759
+ folders.FoCodersDataOffset[fo] = (size_t)(_inByteBack->GetPtr() - startBufPtr);
760
+
761
+ CNum numInStreams = 0;
762
+ const CNum numCoders = inByte->ReadNum();
763
+
764
+ if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX)
765
+ ThrowUnsupported();
766
+
767
+ for (CNum ci = 0; ci < numCoders; ci++)
768
+ {
769
+ const Byte mainByte = inByte->ReadByte();
770
+ if ((mainByte & 0xC0) != 0)
771
+ ThrowUnsupported();
772
+
773
+ const unsigned idSize = (mainByte & 0xF);
774
+ if (idSize > 8)
775
+ ThrowUnsupported();
776
+ if (idSize > inByte->GetRem())
777
+ ThrowEndOfData();
778
+ const Byte *longID = inByte->GetPtr();
779
+ UInt64 id = 0;
780
+ for (unsigned j = 0; j < idSize; j++)
781
+ id = ((id << 8) | longID[j]);
782
+ inByte->SkipDataNoCheck(idSize);
783
+ if (folders.ParsedMethods.IDs.Size() < 128)
784
+ folders.ParsedMethods.IDs.AddToUniqueSorted(id);
785
+
786
+ CNum coderInStreams = 1;
787
+ if ((mainByte & 0x10) != 0)
788
+ {
789
+ coderInStreams = inByte->ReadNum();
790
+ if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
791
+ ThrowUnsupported();
792
+ if (inByte->ReadNum() != 1)
793
+ ThrowUnsupported();
794
+ }
795
+
796
+ numInStreams += coderInStreams;
797
+ if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
798
+ ThrowUnsupported();
799
+
800
+ if ((mainByte & 0x20) != 0)
801
+ {
802
+ const CNum propsSize = inByte->ReadNum();
803
+ if (propsSize > inByte->GetRem())
804
+ ThrowEndOfData();
805
+ if (id == k_LZMA2 && propsSize == 1)
806
+ {
807
+ const Byte v = *_inByteBack->GetPtr();
808
+ if (folders.ParsedMethods.Lzma2Prop < v)
809
+ folders.ParsedMethods.Lzma2Prop = v;
810
+ }
811
+ else if (id == k_LZMA && propsSize == 5)
812
+ {
813
+ const UInt32 dicSize = GetUi32(_inByteBack->GetPtr() + 1);
814
+ if (folders.ParsedMethods.LzmaDic < dicSize)
815
+ folders.ParsedMethods.LzmaDic = dicSize;
816
+ }
817
+ inByte->SkipDataNoCheck((size_t)propsSize);
818
+ }
819
+ }
820
+
821
+ if (numCoders == 1 && numInStreams == 1)
822
+ {
823
+ indexOfMainStream = 0;
824
+ numPackStreams = 1;
825
+ }
826
+ else
827
+ {
828
+ UInt32 i;
829
+ const CNum numBonds = numCoders - 1;
830
+ if (numInStreams < numBonds)
831
+ ThrowUnsupported();
832
+
833
+ BoolVector_Fill_False(StreamUsed, numInStreams);
834
+ BoolVector_Fill_False(CoderUsed, numCoders);
835
+
836
+ for (i = 0; i < numBonds; i++)
837
+ {
838
+ CNum index = ReadNum();
839
+ if (index >= numInStreams || StreamUsed[index])
840
+ ThrowUnsupported();
841
+ StreamUsed[index] = true;
842
+
843
+ index = ReadNum();
844
+ if (index >= numCoders || CoderUsed[index])
845
+ ThrowUnsupported();
846
+ CoderUsed[index] = true;
847
+ }
848
+
849
+ numPackStreams = numInStreams - numBonds;
850
+
851
+ if (numPackStreams != 1)
852
+ for (i = 0; i < numPackStreams; i++)
853
+ {
854
+ const CNum index = inByte->ReadNum(); // PackStreams
855
+ if (index >= numInStreams || StreamUsed[index])
856
+ ThrowUnsupported();
857
+ StreamUsed[index] = true;
858
+ }
859
+
860
+ for (i = 0; i < numCoders; i++)
861
+ if (!CoderUsed[i])
862
+ {
863
+ indexOfMainStream = i;
864
+ break;
865
+ }
866
+
867
+ if (i == numCoders)
868
+ ThrowUnsupported();
869
+ }
870
+
871
+ folders.FoToCoderUnpackSizes[fo] = numCodersOutStreams;
872
+ numCodersOutStreams += numCoders;
873
+ folders.FoStartPackStreamIndex[fo] = packStreamIndex;
874
+ if (numPackStreams > folders.NumPackStreams - packStreamIndex)
875
+ ThrowIncorrect();
876
+ packStreamIndex += numPackStreams;
877
+ folders.FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream;
878
+ }
879
+
880
+ const size_t dataSize = (size_t)(_inByteBack->GetPtr() - startBufPtr);
881
+ folders.FoToCoderUnpackSizes[fo] = numCodersOutStreams;
882
+ folders.FoStartPackStreamIndex[fo] = packStreamIndex;
883
+ folders.FoCodersDataOffset[fo] = (size_t)(_inByteBack->GetPtr() - startBufPtr);
884
+ folders.CodersData.CopyFrom(startBufPtr, dataSize);
885
+
886
+ // if (folders.NumPackStreams != packStreamIndex) ThrowUnsupported();
887
+ }
888
+
889
+ WaitId(NID::kCodersUnpackSize);
890
+ folders.CoderUnpackSizes.Alloc(numCodersOutStreams);
891
+ for (CNum i = 0; i < numCodersOutStreams; i++)
892
+ folders.CoderUnpackSizes[i] = ReadNumber();
893
+
894
+ for (;;)
895
+ {
896
+ const UInt64 type = ReadID();
897
+ if (type == NID::kEnd)
898
+ return;
899
+ if (type == NID::kCRC)
900
+ {
901
+ ReadHashDigests(numFolders, folders.FolderCRCs);
902
+ continue;
903
+ }
904
+ SkipData();
905
+ }
906
+ }
907
+
908
+ void CInArchive::ReadSubStreamsInfo(
909
+ CFolders &folders,
910
+ CRecordVector<UInt64> &unpackSizes,
911
+ CUInt32DefVector &digests)
912
+ {
913
+ folders.NumUnpackStreamsVector.Alloc(folders.NumFolders);
914
+ CNum i;
915
+ for (i = 0; i < folders.NumFolders; i++)
916
+ folders.NumUnpackStreamsVector[i] = 1;
917
+
918
+ UInt64 type;
919
+
920
+ for (;;)
921
+ {
922
+ type = ReadID();
923
+ if (type == NID::kNumUnpackStream)
924
+ {
925
+ for (i = 0; i < folders.NumFolders; i++)
926
+ folders.NumUnpackStreamsVector[i] = ReadNum();
927
+ continue;
928
+ }
929
+ if (type == NID::kCRC || type == NID::kSize || type == NID::kEnd)
930
+ break;
931
+ SkipData();
932
+ }
933
+
934
+ if (type == NID::kSize)
935
+ {
936
+ for (i = 0; i < folders.NumFolders; i++)
937
+ {
938
+ // v3.13 incorrectly worked with empty folders
939
+ // v4.07: we check that folder is empty
940
+ const CNum numSubstreams = folders.NumUnpackStreamsVector[i];
941
+ if (numSubstreams == 0)
942
+ continue;
943
+ UInt64 sum = 0;
944
+ for (CNum j = 1; j < numSubstreams; j++)
945
+ {
946
+ const UInt64 size = ReadNumber();
947
+ unpackSizes.Add(size);
948
+ sum += size;
949
+ if (sum < size)
950
+ ThrowIncorrect();
951
+ }
952
+ const UInt64 folderUnpackSize = folders.GetFolderUnpackSize(i);
953
+ if (folderUnpackSize < sum)
954
+ ThrowIncorrect();
955
+ unpackSizes.Add(folderUnpackSize - sum);
956
+ }
957
+ type = ReadID();
958
+ }
959
+ else
960
+ {
961
+ for (i = 0; i < folders.NumFolders; i++)
962
+ {
963
+ /* v9.26 - v9.29 incorrectly worked:
964
+ if (folders.NumUnpackStreamsVector[i] == 0), it threw error */
965
+ const CNum val = folders.NumUnpackStreamsVector[i];
966
+ if (val > 1)
967
+ ThrowIncorrect();
968
+ if (val == 1)
969
+ unpackSizes.Add(folders.GetFolderUnpackSize(i));
970
+ }
971
+ }
972
+
973
+ unsigned numDigests = 0;
974
+ for (i = 0; i < folders.NumFolders; i++)
975
+ {
976
+ const CNum numSubstreams = folders.NumUnpackStreamsVector[i];
977
+ if (numSubstreams != 1 || !folders.FolderCRCs.ValidAndDefined(i))
978
+ numDigests += numSubstreams;
979
+ }
980
+
981
+ for (;;)
982
+ {
983
+ if (type == NID::kEnd)
984
+ break;
985
+ if (type == NID::kCRC)
986
+ {
987
+ // CUInt32DefVector digests2;
988
+ // ReadHashDigests(numDigests, digests2);
989
+ CBoolVector digests2;
990
+ ReadBoolVector2(numDigests, digests2);
991
+
992
+ digests.ClearAndSetSize(unpackSizes.Size());
993
+
994
+ unsigned k = 0;
995
+ unsigned k2 = 0;
996
+
997
+ for (i = 0; i < folders.NumFolders; i++)
998
+ {
999
+ const CNum numSubstreams = folders.NumUnpackStreamsVector[i];
1000
+ if (numSubstreams == 1 && folders.FolderCRCs.ValidAndDefined(i))
1001
+ {
1002
+ digests.Defs[k] = true;
1003
+ digests.Vals[k] = folders.FolderCRCs.Vals[i];
1004
+ k++;
1005
+ }
1006
+ else for (CNum j = 0; j < numSubstreams; j++)
1007
+ {
1008
+ bool defined = digests2[k2++];
1009
+ digests.Defs[k] = defined;
1010
+ UInt32 crc = 0;
1011
+ if (defined)
1012
+ crc = ReadUInt32();
1013
+ digests.Vals[k] = crc;
1014
+ k++;
1015
+ }
1016
+ }
1017
+ // if (k != unpackSizes.Size()) throw 1234567;
1018
+ }
1019
+ else
1020
+ SkipData();
1021
+
1022
+ type = ReadID();
1023
+ }
1024
+
1025
+ if (digests.Defs.Size() != unpackSizes.Size())
1026
+ {
1027
+ digests.ClearAndSetSize(unpackSizes.Size());
1028
+ unsigned k = 0;
1029
+ for (i = 0; i < folders.NumFolders; i++)
1030
+ {
1031
+ const CNum numSubstreams = folders.NumUnpackStreamsVector[i];
1032
+ if (numSubstreams == 1 && folders.FolderCRCs.ValidAndDefined(i))
1033
+ {
1034
+ digests.Defs[k] = true;
1035
+ digests.Vals[k] = folders.FolderCRCs.Vals[i];
1036
+ k++;
1037
+ }
1038
+ else for (CNum j = 0; j < numSubstreams; j++)
1039
+ {
1040
+ digests.Defs[k] = false;
1041
+ digests.Vals[k] = 0;
1042
+ k++;
1043
+ }
1044
+ }
1045
+ }
1046
+ }
1047
+
1048
+
1049
+
1050
+ void CInArchive::ReadStreamsInfo(
1051
+ const CObjectVector<CByteBuffer> *dataVector,
1052
+ UInt64 &dataOffset,
1053
+ CFolders &folders,
1054
+ CRecordVector<UInt64> &unpackSizes,
1055
+ CUInt32DefVector &digests)
1056
+ {
1057
+ UInt64 type = ReadID();
1058
+
1059
+ if (type == NID::kPackInfo)
1060
+ {
1061
+ dataOffset = ReadNumber();
1062
+ if (dataOffset > _rangeLimit)
1063
+ ThrowIncorrect();
1064
+ ReadPackInfo(folders);
1065
+ if (folders.PackPositions[folders.NumPackStreams] > _rangeLimit - dataOffset)
1066
+ ThrowIncorrect();
1067
+ type = ReadID();
1068
+ }
1069
+
1070
+ if (type == NID::kUnpackInfo)
1071
+ {
1072
+ ReadUnpackInfo(dataVector, folders);
1073
+ type = ReadID();
1074
+ }
1075
+
1076
+ if (folders.NumFolders != 0 && !folders.PackPositions)
1077
+ {
1078
+ // if there are folders, we need PackPositions also
1079
+ folders.PackPositions.Alloc(1);
1080
+ folders.PackPositions[0] = 0;
1081
+ }
1082
+
1083
+ if (type == NID::kSubStreamsInfo)
1084
+ {
1085
+ ReadSubStreamsInfo(folders, unpackSizes, digests);
1086
+ type = ReadID();
1087
+ }
1088
+ else
1089
+ {
1090
+ folders.NumUnpackStreamsVector.Alloc(folders.NumFolders);
1091
+ /* If digests.Defs.Size() == 0, it means that there are no crcs.
1092
+ So we don't need to fill digests with values. */
1093
+ // digests.Vals.ClearAndSetSize(folders.NumFolders);
1094
+ // BoolVector_Fill_False(digests.Defs, folders.NumFolders);
1095
+ for (CNum i = 0; i < folders.NumFolders; i++)
1096
+ {
1097
+ folders.NumUnpackStreamsVector[i] = 1;
1098
+ unpackSizes.Add(folders.GetFolderUnpackSize(i));
1099
+ // digests.Vals[i] = 0;
1100
+ }
1101
+ }
1102
+
1103
+ if (type != NID::kEnd)
1104
+ ThrowIncorrect();
1105
+ }
1106
+
1107
+ void CInArchive::ReadBoolVector(unsigned numItems, CBoolVector &v)
1108
+ {
1109
+ v.ClearAndSetSize(numItems);
1110
+ Byte b = 0;
1111
+ Byte mask = 0;
1112
+ bool *p = &v[0];
1113
+ for (unsigned i = 0; i < numItems; i++)
1114
+ {
1115
+ if (mask == 0)
1116
+ {
1117
+ b = ReadByte();
1118
+ mask = 0x80;
1119
+ }
1120
+ p[i] = ((b & mask) != 0);
1121
+ mask = (Byte)(mask >> 1);
1122
+ }
1123
+ }
1124
+
1125
+ void CInArchive::ReadBoolVector2(unsigned numItems, CBoolVector &v)
1126
+ {
1127
+ const Byte allAreDefined = ReadByte();
1128
+ if (allAreDefined == 0)
1129
+ {
1130
+ ReadBoolVector(numItems, v);
1131
+ return;
1132
+ }
1133
+ v.ClearAndSetSize(numItems);
1134
+ bool *p = &v[0];
1135
+ for (unsigned i = 0; i < numItems; i++)
1136
+ p[i] = true;
1137
+ }
1138
+
1139
+ void CInArchive::ReadUInt64DefVector(const CObjectVector<CByteBuffer> &dataVector,
1140
+ CUInt64DefVector &v, unsigned numItems)
1141
+ {
1142
+ ReadBoolVector2(numItems, v.Defs);
1143
+
1144
+ CStreamSwitch streamSwitch;
1145
+ streamSwitch.Set(this, &dataVector);
1146
+
1147
+ v.Vals.ClearAndSetSize(numItems);
1148
+ UInt64 *p = &v.Vals[0];
1149
+ const bool *defs = &v.Defs[0];
1150
+
1151
+ for (unsigned i = 0; i < numItems; i++)
1152
+ {
1153
+ UInt64 t = 0;
1154
+ if (defs[i])
1155
+ t = ReadUInt64();
1156
+ p[i] = t;
1157
+ }
1158
+ }
1159
+
1160
+ HRESULT CInArchive::ReadAndDecodePackedStreams(
1161
+ DECL_EXTERNAL_CODECS_LOC_VARS
1162
+ UInt64 baseOffset,
1163
+ UInt64 &dataOffset, CObjectVector<CByteBuffer> &dataVector
1164
+ Z7_7Z_DECODER_CRYPRO_VARS_DECL
1165
+ )
1166
+ {
1167
+ CFolders folders;
1168
+ CRecordVector<UInt64> unpackSizes;
1169
+ CUInt32DefVector digests;
1170
+
1171
+ ReadStreamsInfo(NULL,
1172
+ dataOffset,
1173
+ folders,
1174
+ unpackSizes,
1175
+ digests);
1176
+
1177
+ CDecoder decoder(_useMixerMT);
1178
+
1179
+ for (CNum i = 0; i < folders.NumFolders; i++)
1180
+ {
1181
+ CByteBuffer &data = dataVector.AddNew();
1182
+ const UInt64 unpackSize64 = folders.GetFolderUnpackSize(i);
1183
+ const size_t unpackSize = (size_t)unpackSize64;
1184
+ if (unpackSize != unpackSize64)
1185
+ ThrowUnsupported();
1186
+ data.Alloc(unpackSize);
1187
+
1188
+ CMyComPtr2_Create<ISequentialOutStream, CBufPtrSeqOutStream> outStreamSpec;
1189
+ outStreamSpec->Init(data, unpackSize);
1190
+
1191
+ bool dataAfterEnd_Error = false;
1192
+
1193
+ HRESULT result = decoder.Decode(
1194
+ EXTERNAL_CODECS_LOC_VARS
1195
+ _stream, baseOffset + dataOffset,
1196
+ folders, i,
1197
+ NULL, // &unpackSize64
1198
+
1199
+ outStreamSpec,
1200
+ NULL, // *compressProgress
1201
+
1202
+ NULL // **inStreamMainRes
1203
+ , dataAfterEnd_Error
1204
+
1205
+ Z7_7Z_DECODER_CRYPRO_VARS
1206
+ #if !defined(Z7_ST)
1207
+ , false // mtMode
1208
+ , 1 // numThreads
1209
+ , 0 // memUsage
1210
+ #endif
1211
+ );
1212
+
1213
+ RINOK(result)
1214
+
1215
+ if (dataAfterEnd_Error)
1216
+ ThereIsHeaderError = true;
1217
+
1218
+ if (unpackSize != outStreamSpec->GetPos())
1219
+ ThrowIncorrect();
1220
+
1221
+ if (folders.FolderCRCs.ValidAndDefined(i))
1222
+ if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])
1223
+ ThrowIncorrect();
1224
+ }
1225
+
1226
+ if (folders.PackPositions)
1227
+ HeadersSize += folders.PackPositions[folders.NumPackStreams];
1228
+
1229
+ return S_OK;
1230
+ }
1231
+
1232
+ HRESULT CInArchive::ReadHeader(
1233
+ DECL_EXTERNAL_CODECS_LOC_VARS
1234
+ CDbEx &db
1235
+ Z7_7Z_DECODER_CRYPRO_VARS_DECL
1236
+ )
1237
+ {
1238
+ UInt64 type = ReadID();
1239
+
1240
+ if (type == NID::kArchiveProperties)
1241
+ {
1242
+ ReadArchiveProperties(db.ArcInfo);
1243
+ type = ReadID();
1244
+ }
1245
+
1246
+ CObjectVector<CByteBuffer> dataVector;
1247
+
1248
+ if (type == NID::kAdditionalStreamsInfo)
1249
+ {
1250
+ const HRESULT result = ReadAndDecodePackedStreams(
1251
+ EXTERNAL_CODECS_LOC_VARS
1252
+ db.ArcInfo.StartPositionAfterHeader,
1253
+ db.ArcInfo.DataStartPosition2,
1254
+ dataVector
1255
+ Z7_7Z_DECODER_CRYPRO_VARS
1256
+ );
1257
+ RINOK(result)
1258
+ db.ArcInfo.DataStartPosition2 += db.ArcInfo.StartPositionAfterHeader;
1259
+ type = ReadID();
1260
+ }
1261
+
1262
+ CRecordVector<UInt64> unpackSizes;
1263
+ CUInt32DefVector digests;
1264
+
1265
+ if (type == NID::kMainStreamsInfo)
1266
+ {
1267
+ ReadStreamsInfo(&dataVector,
1268
+ db.ArcInfo.DataStartPosition,
1269
+ (CFolders &)db,
1270
+ unpackSizes,
1271
+ digests);
1272
+ db.ArcInfo.DataStartPosition += db.ArcInfo.StartPositionAfterHeader;
1273
+ type = ReadID();
1274
+ }
1275
+
1276
+ if (type == NID::kFilesInfo)
1277
+ {
1278
+
1279
+ const CNum numFiles = ReadNum();
1280
+
1281
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kSize);
1282
+ // if (!db.PackSizes.IsEmpty())
1283
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kPackInfo);
1284
+ if (numFiles > 0 && !digests.Defs.IsEmpty())
1285
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kCRC);
1286
+
1287
+ CBoolVector emptyStreamVector;
1288
+ CBoolVector emptyFileVector;
1289
+ CBoolVector antiFileVector;
1290
+ unsigned numEmptyStreams = 0;
1291
+
1292
+ for (;;)
1293
+ {
1294
+ const UInt64 type2 = ReadID();
1295
+ if (type2 == NID::kEnd)
1296
+ break;
1297
+ const UInt64 size = ReadNumber();
1298
+ if (size > _inByteBack->GetRem())
1299
+ ThrowIncorrect();
1300
+ CStreamSwitch switchProp;
1301
+ switchProp.Set(this, _inByteBack->GetPtr(), (size_t)size, true);
1302
+ bool addPropIdToList = true;
1303
+ bool isKnownType = true;
1304
+ if (type2 > ((UInt32)1 << 30))
1305
+ isKnownType = false;
1306
+ else switch ((UInt32)type2)
1307
+ {
1308
+ case NID::kName:
1309
+ {
1310
+ CStreamSwitch streamSwitch;
1311
+ streamSwitch.Set(this, &dataVector);
1312
+ const size_t rem = _inByteBack->GetRem();
1313
+ db.NamesBuf.Alloc(rem);
1314
+ ReadBytes(db.NamesBuf, rem);
1315
+ db.NameOffsets.Alloc(numFiles + 1);
1316
+ size_t pos = 0;
1317
+ unsigned i;
1318
+ for (i = 0; i < numFiles; i++)
1319
+ {
1320
+ const size_t curRem = (rem - pos) / 2;
1321
+ const UInt16 *buf = (const UInt16 *)(const void *)(db.NamesBuf.ConstData() + pos);
1322
+ size_t j;
1323
+ for (j = 0; j < curRem && buf[j] != 0; j++);
1324
+ if (j == curRem)
1325
+ ThrowEndOfData();
1326
+ db.NameOffsets[i] = pos / 2;
1327
+ pos += j * 2 + 2;
1328
+ }
1329
+ db.NameOffsets[i] = pos / 2;
1330
+ if (pos != rem)
1331
+ ThereIsHeaderError = true;
1332
+ break;
1333
+ }
1334
+
1335
+ case NID::kWinAttrib:
1336
+ {
1337
+ ReadBoolVector2(numFiles, db.Attrib.Defs);
1338
+ CStreamSwitch streamSwitch;
1339
+ streamSwitch.Set(this, &dataVector);
1340
+ Read_UInt32_Vector(db.Attrib);
1341
+ break;
1342
+ }
1343
+
1344
+ /*
1345
+ case NID::kIsAux:
1346
+ {
1347
+ ReadBoolVector(numFiles, db.IsAux);
1348
+ break;
1349
+ }
1350
+ case NID::kParent:
1351
+ {
1352
+ db.IsTree = true;
1353
+ // CBoolVector boolVector;
1354
+ // ReadBoolVector2(numFiles, boolVector);
1355
+ // CStreamSwitch streamSwitch;
1356
+ // streamSwitch.Set(this, &dataVector);
1357
+ CBoolVector boolVector;
1358
+ ReadBoolVector2(numFiles, boolVector);
1359
+
1360
+ db.ThereAreAltStreams = false;
1361
+ for (i = 0; i < numFiles; i++)
1362
+ {
1363
+ CFileItem &file = db.Files[i];
1364
+ // file.Parent = -1;
1365
+ // if (boolVector[i])
1366
+ file.Parent = (int)ReadUInt32();
1367
+ file.IsAltStream = !boolVector[i];
1368
+ if (file.IsAltStream)
1369
+ db.ThereAreAltStreams = true;
1370
+ }
1371
+ break;
1372
+ }
1373
+ */
1374
+ case NID::kEmptyStream:
1375
+ {
1376
+ ReadBoolVector(numFiles, emptyStreamVector);
1377
+ numEmptyStreams = BoolVector_CountSum(emptyStreamVector);
1378
+ emptyFileVector.Clear();
1379
+ antiFileVector.Clear();
1380
+ break;
1381
+ }
1382
+ case NID::kEmptyFile: ReadBoolVector(numEmptyStreams, emptyFileVector); break;
1383
+ case NID::kAnti: ReadBoolVector(numEmptyStreams, antiFileVector); break;
1384
+ case NID::kStartPos: ReadUInt64DefVector(dataVector, db.StartPos, (unsigned)numFiles); break;
1385
+ case NID::kCTime: ReadUInt64DefVector(dataVector, db.CTime, (unsigned)numFiles); break;
1386
+ case NID::kATime: ReadUInt64DefVector(dataVector, db.ATime, (unsigned)numFiles); break;
1387
+ case NID::kMTime: ReadUInt64DefVector(dataVector, db.MTime, (unsigned)numFiles); break;
1388
+ case NID::kDummy:
1389
+ {
1390
+ for (UInt64 j = 0; j < size; j++)
1391
+ if (ReadByte() != 0)
1392
+ ThereIsHeaderError = true;
1393
+ addPropIdToList = false;
1394
+ break;
1395
+ }
1396
+ /*
1397
+ case NID::kNtSecure:
1398
+ {
1399
+ try
1400
+ {
1401
+ {
1402
+ CStreamSwitch streamSwitch;
1403
+ streamSwitch.Set(this, &dataVector);
1404
+ UInt32 numDescriptors = ReadUInt32();
1405
+ size_t offset = 0;
1406
+ db.SecureOffsets.Clear();
1407
+ for (i = 0; i < numDescriptors; i++)
1408
+ {
1409
+ UInt32 size = ReadUInt32();
1410
+ db.SecureOffsets.Add(offset);
1411
+ offset += size;
1412
+ }
1413
+ // ThrowIncorrect();;
1414
+ db.SecureOffsets.Add(offset);
1415
+ db.SecureBuf.SetCapacity(offset);
1416
+ for (i = 0; i < numDescriptors; i++)
1417
+ {
1418
+ offset = db.SecureOffsets[i];
1419
+ ReadBytes(db.SecureBuf + offset, db.SecureOffsets[i + 1] - offset);
1420
+ }
1421
+ db.SecureIDs.Clear();
1422
+ for (unsigned i = 0; i < numFiles; i++)
1423
+ {
1424
+ db.SecureIDs.Add(ReadNum());
1425
+ // db.SecureIDs.Add(ReadUInt32());
1426
+ }
1427
+ // ReadUInt32();
1428
+ if (_inByteBack->GetRem() != 0)
1429
+ ThrowIncorrect();;
1430
+ }
1431
+ }
1432
+ catch(CInArchiveException &)
1433
+ {
1434
+ ThereIsHeaderError = true;
1435
+ addPropIdToList = isKnownType = false;
1436
+ db.ClearSecure();
1437
+ }
1438
+ break;
1439
+ }
1440
+ */
1441
+ default:
1442
+ addPropIdToList = isKnownType = false;
1443
+ }
1444
+ if (isKnownType)
1445
+ {
1446
+ if (addPropIdToList)
1447
+ db.ArcInfo.FileInfoPopIDs.Add(type2);
1448
+ }
1449
+ else
1450
+ {
1451
+ db.UnsupportedFeatureWarning = true;
1452
+ _inByteBack->SkipRem();
1453
+ }
1454
+ // SkipData worked incorrectly in some versions before v4.59 (7zVer <= 0.02)
1455
+ if (_inByteBack->GetRem() != 0)
1456
+ ThrowIncorrect();
1457
+ }
1458
+
1459
+ type = ReadID(); // Read (NID::kEnd) end of headers
1460
+
1461
+ if (numFiles - numEmptyStreams != unpackSizes.Size())
1462
+ ThrowUnsupported();
1463
+
1464
+ CNum emptyFileIndex = 0;
1465
+ CNum sizeIndex = 0;
1466
+
1467
+ const unsigned numAntiItems = BoolVector_CountSum(antiFileVector);
1468
+
1469
+ if (numAntiItems != 0)
1470
+ db.IsAnti.ClearAndSetSize(numFiles);
1471
+
1472
+ db.Files.ClearAndSetSize(numFiles);
1473
+
1474
+ for (CNum i = 0; i < numFiles; i++)
1475
+ {
1476
+ CFileItem &file = db.Files[i];
1477
+ bool isAnti;
1478
+ file.Crc = 0;
1479
+ if (!BoolVector_Item_IsValidAndTrue(emptyStreamVector, i))
1480
+ {
1481
+ file.HasStream = true;
1482
+ file.IsDir = false;
1483
+ isAnti = false;
1484
+ file.Size = unpackSizes[sizeIndex];
1485
+ file.CrcDefined = digests.ValidAndDefined(sizeIndex);
1486
+ if (file.CrcDefined)
1487
+ file.Crc = digests.Vals[sizeIndex];
1488
+ sizeIndex++;
1489
+ }
1490
+ else
1491
+ {
1492
+ file.HasStream = false;
1493
+ file.IsDir = !BoolVector_Item_IsValidAndTrue(emptyFileVector, emptyFileIndex);
1494
+ isAnti = BoolVector_Item_IsValidAndTrue(antiFileVector, emptyFileIndex);
1495
+ emptyFileIndex++;
1496
+ file.Size = 0;
1497
+ file.CrcDefined = false;
1498
+ }
1499
+ if (numAntiItems != 0)
1500
+ db.IsAnti[i] = isAnti;
1501
+ }
1502
+
1503
+ }
1504
+
1505
+ db.FillLinks();
1506
+
1507
+ if (type != NID::kEnd || _inByteBack->GetRem() != 0)
1508
+ {
1509
+ db.UnsupportedFeatureWarning = true;
1510
+ // ThrowIncorrect();
1511
+ }
1512
+
1513
+ return S_OK;
1514
+ }
1515
+
1516
+
1517
+ void CDbEx::FillLinks()
1518
+ {
1519
+ FolderStartFileIndex.Alloc(NumFolders);
1520
+ FileIndexToFolderIndexMap.Alloc(Files.Size());
1521
+
1522
+ CNum folderIndex = 0;
1523
+ CNum indexInFolder = 0;
1524
+ unsigned i;
1525
+
1526
+ for (i = 0; i < Files.Size(); i++)
1527
+ {
1528
+ const bool emptyStream = !Files[i].HasStream;
1529
+ if (indexInFolder == 0)
1530
+ {
1531
+ if (emptyStream)
1532
+ {
1533
+ FileIndexToFolderIndexMap[i] = kNumNoIndex;
1534
+ continue;
1535
+ }
1536
+ // v3.13 incorrectly worked with empty folders
1537
+ // v4.07: we skip empty folders
1538
+ for (;;)
1539
+ {
1540
+ if (folderIndex >= NumFolders)
1541
+ ThrowIncorrect();
1542
+ FolderStartFileIndex[folderIndex] = i;
1543
+ if (NumUnpackStreamsVector[folderIndex] != 0)
1544
+ break;
1545
+ folderIndex++;
1546
+ }
1547
+ }
1548
+ FileIndexToFolderIndexMap[i] = folderIndex;
1549
+ if (emptyStream)
1550
+ continue;
1551
+ if (++indexInFolder >= NumUnpackStreamsVector[folderIndex])
1552
+ {
1553
+ folderIndex++;
1554
+ indexInFolder = 0;
1555
+ }
1556
+ }
1557
+
1558
+ if (indexInFolder != 0)
1559
+ {
1560
+ folderIndex++;
1561
+ // 18.06
1562
+ ThereIsHeaderError = true;
1563
+ // ThrowIncorrect();
1564
+ }
1565
+
1566
+ for (;;)
1567
+ {
1568
+ if (folderIndex >= NumFolders)
1569
+ return;
1570
+ FolderStartFileIndex[folderIndex] = i;
1571
+ if (NumUnpackStreamsVector[folderIndex] != 0)
1572
+ {
1573
+ // 18.06
1574
+ ThereIsHeaderError = true;
1575
+ // ThrowIncorrect();
1576
+ }
1577
+ folderIndex++;
1578
+ }
1579
+ }
1580
+
1581
+
1582
+ HRESULT CInArchive::ReadDatabase2(
1583
+ DECL_EXTERNAL_CODECS_LOC_VARS
1584
+ CDbEx &db
1585
+ Z7_7Z_DECODER_CRYPRO_VARS_DECL
1586
+ )
1587
+ {
1588
+ db.Clear();
1589
+ db.ArcInfo.StartPosition = _arhiveBeginStreamPosition;
1590
+
1591
+ db.ArcInfo.Version.Major = _header[6];
1592
+ db.ArcInfo.Version.Minor = _header[7];
1593
+
1594
+ if (db.ArcInfo.Version.Major != kMajorVersion)
1595
+ {
1596
+ // db.UnsupportedVersion = true;
1597
+ return S_FALSE;
1598
+ }
1599
+
1600
+ UInt64 nextHeaderOffset = Get64(_header + 12);
1601
+ UInt64 nextHeaderSize = Get64(_header + 20);
1602
+ UInt32 nextHeaderCRC = Get32(_header + 28);
1603
+
1604
+ #ifdef FORMAT_7Z_RECOVERY
1605
+ const UInt32 crcFromArc = Get32(_header + 8);
1606
+ if (crcFromArc == 0 && nextHeaderOffset == 0 && nextHeaderSize == 0 && nextHeaderCRC == 0)
1607
+ {
1608
+ UInt64 cur, fileSize;
1609
+ RINOK(InStream_GetPos(_stream, cur))
1610
+ const unsigned kCheckSize = 512;
1611
+ Byte buf[kCheckSize];
1612
+ RINOK(InStream_GetSize_SeekToEnd(_stream, fileSize))
1613
+ const UInt64 rem = fileSize - cur;
1614
+ unsigned checkSize = kCheckSize;
1615
+ if (rem < kCheckSize)
1616
+ checkSize = (unsigned)(rem);
1617
+ if (checkSize < 3)
1618
+ return S_FALSE;
1619
+ RINOK(InStream_SeekSet(_stream, fileSize - checkSize))
1620
+ RINOK(ReadStream_FALSE(_stream, buf, (size_t)checkSize))
1621
+
1622
+ if (buf[checkSize - 1] != 0)
1623
+ return S_FALSE;
1624
+
1625
+ unsigned i;
1626
+ for (i = checkSize - 2;; i--)
1627
+ {
1628
+ if ((buf[i] == NID::kEncodedHeader && buf[i + 1] == NID::kPackInfo) ||
1629
+ (buf[i] == NID::kHeader && buf[i + 1] == NID::kMainStreamsInfo))
1630
+ break;
1631
+ if (i == 0)
1632
+ return S_FALSE;
1633
+ }
1634
+ nextHeaderSize = checkSize - i;
1635
+ nextHeaderOffset = rem - nextHeaderSize;
1636
+ nextHeaderCRC = CrcCalc(buf + i, (size_t)nextHeaderSize);
1637
+ RINOK(InStream_SeekSet(_stream, cur))
1638
+ db.StartHeaderWasRecovered = true;
1639
+ }
1640
+ else
1641
+ #endif
1642
+ {
1643
+ // Crc was tested already at signature check
1644
+ // if (CrcCalc(_header + 12, 20) != crcFromArchive) ThrowIncorrect();
1645
+ }
1646
+
1647
+ db.ArcInfo.StartPositionAfterHeader = _arhiveBeginStreamPosition + kHeaderSize;
1648
+ db.PhySize = kHeaderSize;
1649
+
1650
+ db.IsArc = false;
1651
+ if ((Int64)nextHeaderOffset < 0 ||
1652
+ nextHeaderSize > ((UInt64)1 << 62))
1653
+ return S_FALSE;
1654
+
1655
+ HeadersSize = kHeaderSize;
1656
+
1657
+ if (nextHeaderSize == 0)
1658
+ {
1659
+ if (nextHeaderOffset != 0 || nextHeaderCRC != 0)
1660
+ return S_FALSE;
1661
+ db.IsArc = true;
1662
+ db.HeadersSize = HeadersSize;
1663
+ return S_OK;
1664
+ }
1665
+
1666
+ if (!db.StartHeaderWasRecovered)
1667
+ db.IsArc = true;
1668
+
1669
+ HeadersSize += nextHeaderSize;
1670
+ // db.EndHeaderOffset = nextHeaderOffset;
1671
+ _rangeLimit = nextHeaderOffset;
1672
+
1673
+ db.PhySize = kHeaderSize + nextHeaderOffset + nextHeaderSize;
1674
+ if (_fileEndPosition - db.ArcInfo.StartPositionAfterHeader < nextHeaderOffset + nextHeaderSize)
1675
+ {
1676
+ db.UnexpectedEnd = true;
1677
+ return S_FALSE;
1678
+ }
1679
+ RINOK(_stream->Seek((Int64)nextHeaderOffset, STREAM_SEEK_CUR, NULL))
1680
+
1681
+ const size_t nextHeaderSize_t = (size_t)nextHeaderSize;
1682
+ if (nextHeaderSize_t != nextHeaderSize)
1683
+ return E_OUTOFMEMORY;
1684
+ CByteBuffer buffer2(nextHeaderSize_t);
1685
+
1686
+ RINOK(ReadStream_FALSE(_stream, buffer2, nextHeaderSize_t))
1687
+
1688
+ if (CrcCalc(buffer2, nextHeaderSize_t) != nextHeaderCRC)
1689
+ ThrowIncorrect();
1690
+
1691
+ if (!db.StartHeaderWasRecovered)
1692
+ db.PhySizeWasConfirmed = true;
1693
+
1694
+ CStreamSwitch streamSwitch;
1695
+ streamSwitch.Set(this, buffer2);
1696
+
1697
+ CObjectVector<CByteBuffer> dataVector;
1698
+
1699
+ const UInt64 type = ReadID();
1700
+ if (type != NID::kHeader)
1701
+ {
1702
+ if (type != NID::kEncodedHeader)
1703
+ ThrowIncorrect();
1704
+ const HRESULT result = ReadAndDecodePackedStreams(
1705
+ EXTERNAL_CODECS_LOC_VARS
1706
+ db.ArcInfo.StartPositionAfterHeader,
1707
+ db.ArcInfo.DataStartPosition2,
1708
+ dataVector
1709
+ Z7_7Z_DECODER_CRYPRO_VARS
1710
+ );
1711
+ RINOK(result)
1712
+ if (dataVector.Size() == 0)
1713
+ return S_OK;
1714
+ if (dataVector.Size() > 1)
1715
+ ThrowIncorrect();
1716
+ streamSwitch.Remove();
1717
+ streamSwitch.Set(this, dataVector.Front());
1718
+ if (ReadID() != NID::kHeader)
1719
+ ThrowIncorrect();
1720
+ }
1721
+
1722
+ db.IsArc = true;
1723
+
1724
+ db.HeadersSize = HeadersSize;
1725
+
1726
+ return ReadHeader(
1727
+ EXTERNAL_CODECS_LOC_VARS
1728
+ db
1729
+ Z7_7Z_DECODER_CRYPRO_VARS
1730
+ );
1731
+ }
1732
+
1733
+
1734
+ HRESULT CInArchive::ReadDatabase(
1735
+ DECL_EXTERNAL_CODECS_LOC_VARS
1736
+ CDbEx &db
1737
+ Z7_7Z_DECODER_CRYPRO_VARS_DECL
1738
+ )
1739
+ {
1740
+ try
1741
+ {
1742
+ const HRESULT res = ReadDatabase2(
1743
+ EXTERNAL_CODECS_LOC_VARS db
1744
+ Z7_7Z_DECODER_CRYPRO_VARS
1745
+ );
1746
+ if (ThereIsHeaderError)
1747
+ db.ThereIsHeaderError = true;
1748
+ if (res == E_NOTIMPL)
1749
+ ThrowUnsupported();
1750
+ return res;
1751
+ }
1752
+ catch(CUnsupportedFeatureException &)
1753
+ {
1754
+ db.UnsupportedFeatureError = true;
1755
+ return S_FALSE;
1756
+ }
1757
+ catch(CInArchiveException &)
1758
+ {
1759
+ db.ThereIsHeaderError = true;
1760
+ return S_FALSE;
1761
+ }
1762
+ }
1763
+
1764
+ }}