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,1786 @@
1
+ /* 7zArcIn.c -- 7z Input functions
2
+ 2023-09-07 : Igor Pavlov : Public domain */
3
+
4
+ #include "Precomp.h"
5
+
6
+ #include <string.h>
7
+
8
+ #include "7z.h"
9
+ #include "7zBuf.h"
10
+ #include "7zCrc.h"
11
+ #include "CpuArch.h"
12
+
13
+ #define MY_ALLOC(T, p, size, alloc) \
14
+ { if ((p = (T *)ISzAlloc_Alloc(alloc, (size) * sizeof(T))) == NULL) return SZ_ERROR_MEM; }
15
+
16
+ #define MY_ALLOC_ZE(T, p, size, alloc) \
17
+ { if ((size) == 0) p = NULL; else MY_ALLOC(T, p, size, alloc) }
18
+
19
+ #define MY_ALLOC_AND_CPY(to, size, from, alloc) \
20
+ { MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); }
21
+
22
+ #define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc) \
23
+ { if ((size) == 0) to = NULL; else { MY_ALLOC_AND_CPY(to, size, from, alloc) } }
24
+
25
+ #define k7zMajorVersion 0
26
+
27
+ enum EIdEnum
28
+ {
29
+ k7zIdEnd,
30
+ k7zIdHeader,
31
+ k7zIdArchiveProperties,
32
+ k7zIdAdditionalStreamsInfo,
33
+ k7zIdMainStreamsInfo,
34
+ k7zIdFilesInfo,
35
+ k7zIdPackInfo,
36
+ k7zIdUnpackInfo,
37
+ k7zIdSubStreamsInfo,
38
+ k7zIdSize,
39
+ k7zIdCRC,
40
+ k7zIdFolder,
41
+ k7zIdCodersUnpackSize,
42
+ k7zIdNumUnpackStream,
43
+ k7zIdEmptyStream,
44
+ k7zIdEmptyFile,
45
+ k7zIdAnti,
46
+ k7zIdName,
47
+ k7zIdCTime,
48
+ k7zIdATime,
49
+ k7zIdMTime,
50
+ k7zIdWinAttrib,
51
+ k7zIdComment,
52
+ k7zIdEncodedHeader,
53
+ k7zIdStartPos,
54
+ k7zIdDummy
55
+ // k7zNtSecure,
56
+ // k7zParent,
57
+ // k7zIsReal
58
+ };
59
+
60
+ const Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C};
61
+
62
+ #define SzBitUi32s_INIT(p) { (p)->Defs = NULL; (p)->Vals = NULL; }
63
+
64
+ static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAllocPtr alloc)
65
+ {
66
+ if (num == 0)
67
+ {
68
+ p->Defs = NULL;
69
+ p->Vals = NULL;
70
+ }
71
+ else
72
+ {
73
+ MY_ALLOC(Byte, p->Defs, (num + 7) >> 3, alloc)
74
+ MY_ALLOC(UInt32, p->Vals, num, alloc)
75
+ }
76
+ return SZ_OK;
77
+ }
78
+
79
+ static void SzBitUi32s_Free(CSzBitUi32s *p, ISzAllocPtr alloc)
80
+ {
81
+ ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL;
82
+ ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL;
83
+ }
84
+
85
+ #define SzBitUi64s_INIT(p) { (p)->Defs = NULL; (p)->Vals = NULL; }
86
+
87
+ static void SzBitUi64s_Free(CSzBitUi64s *p, ISzAllocPtr alloc)
88
+ {
89
+ ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL;
90
+ ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL;
91
+ }
92
+
93
+
94
+ static void SzAr_Init(CSzAr *p)
95
+ {
96
+ p->NumPackStreams = 0;
97
+ p->NumFolders = 0;
98
+
99
+ p->PackPositions = NULL;
100
+ SzBitUi32s_INIT(&p->FolderCRCs)
101
+
102
+ p->FoCodersOffsets = NULL;
103
+ p->FoStartPackStreamIndex = NULL;
104
+ p->FoToCoderUnpackSizes = NULL;
105
+ p->FoToMainUnpackSizeIndex = NULL;
106
+ p->CoderUnpackSizes = NULL;
107
+
108
+ p->CodersData = NULL;
109
+
110
+ p->RangeLimit = 0;
111
+ }
112
+
113
+ static void SzAr_Free(CSzAr *p, ISzAllocPtr alloc)
114
+ {
115
+ ISzAlloc_Free(alloc, p->PackPositions);
116
+ SzBitUi32s_Free(&p->FolderCRCs, alloc);
117
+
118
+ ISzAlloc_Free(alloc, p->FoCodersOffsets);
119
+ ISzAlloc_Free(alloc, p->FoStartPackStreamIndex);
120
+ ISzAlloc_Free(alloc, p->FoToCoderUnpackSizes);
121
+ ISzAlloc_Free(alloc, p->FoToMainUnpackSizeIndex);
122
+ ISzAlloc_Free(alloc, p->CoderUnpackSizes);
123
+
124
+ ISzAlloc_Free(alloc, p->CodersData);
125
+
126
+ SzAr_Init(p);
127
+ }
128
+
129
+
130
+ void SzArEx_Init(CSzArEx *p)
131
+ {
132
+ SzAr_Init(&p->db);
133
+
134
+ p->NumFiles = 0;
135
+ p->dataPos = 0;
136
+
137
+ p->UnpackPositions = NULL;
138
+ p->IsDirs = NULL;
139
+
140
+ p->FolderToFile = NULL;
141
+ p->FileToFolder = NULL;
142
+
143
+ p->FileNameOffsets = NULL;
144
+ p->FileNames = NULL;
145
+
146
+ SzBitUi32s_INIT(&p->CRCs)
147
+ SzBitUi32s_INIT(&p->Attribs)
148
+ // SzBitUi32s_INIT(&p->Parents)
149
+ SzBitUi64s_INIT(&p->MTime)
150
+ SzBitUi64s_INIT(&p->CTime)
151
+ }
152
+
153
+ void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc)
154
+ {
155
+ ISzAlloc_Free(alloc, p->UnpackPositions);
156
+ ISzAlloc_Free(alloc, p->IsDirs);
157
+
158
+ ISzAlloc_Free(alloc, p->FolderToFile);
159
+ ISzAlloc_Free(alloc, p->FileToFolder);
160
+
161
+ ISzAlloc_Free(alloc, p->FileNameOffsets);
162
+ ISzAlloc_Free(alloc, p->FileNames);
163
+
164
+ SzBitUi32s_Free(&p->CRCs, alloc);
165
+ SzBitUi32s_Free(&p->Attribs, alloc);
166
+ // SzBitUi32s_Free(&p->Parents, alloc);
167
+ SzBitUi64s_Free(&p->MTime, alloc);
168
+ SzBitUi64s_Free(&p->CTime, alloc);
169
+
170
+ SzAr_Free(&p->db, alloc);
171
+ SzArEx_Init(p);
172
+ }
173
+
174
+
175
+ static int TestSignatureCandidate(const Byte *testBytes)
176
+ {
177
+ unsigned i;
178
+ for (i = 0; i < k7zSignatureSize; i++)
179
+ if (testBytes[i] != k7zSignature[i])
180
+ return 0;
181
+ return 1;
182
+ }
183
+
184
+ #define SzData_CLEAR(p) { (p)->Data = NULL; (p)->Size = 0; }
185
+
186
+ #define SZ_READ_BYTE_SD_NOCHECK(_sd_, dest) \
187
+ (_sd_)->Size--; dest = *(_sd_)->Data++;
188
+
189
+ #define SZ_READ_BYTE_SD(_sd_, dest) \
190
+ if ((_sd_)->Size == 0) return SZ_ERROR_ARCHIVE; \
191
+ SZ_READ_BYTE_SD_NOCHECK(_sd_, dest)
192
+
193
+ #define SZ_READ_BYTE(dest) SZ_READ_BYTE_SD(sd, dest)
194
+
195
+ #define SZ_READ_BYTE_2(dest) \
196
+ if (sd.Size == 0) return SZ_ERROR_ARCHIVE; \
197
+ sd.Size--; dest = *sd.Data++;
198
+
199
+ #define SKIP_DATA(sd, size) { sd->Size -= (size_t)(size); sd->Data += (size_t)(size); }
200
+ #define SKIP_DATA2(sd, size) { sd.Size -= (size_t)(size); sd.Data += (size_t)(size); }
201
+
202
+ #define SZ_READ_32(dest) if (sd.Size < 4) return SZ_ERROR_ARCHIVE; \
203
+ dest = GetUi32(sd.Data); SKIP_DATA2(sd, 4);
204
+
205
+ static Z7_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value)
206
+ {
207
+ Byte firstByte, mask;
208
+ unsigned i;
209
+ UInt32 v;
210
+
211
+ SZ_READ_BYTE(firstByte)
212
+ if ((firstByte & 0x80) == 0)
213
+ {
214
+ *value = firstByte;
215
+ return SZ_OK;
216
+ }
217
+ SZ_READ_BYTE(v)
218
+ if ((firstByte & 0x40) == 0)
219
+ {
220
+ *value = (((UInt32)firstByte & 0x3F) << 8) | v;
221
+ return SZ_OK;
222
+ }
223
+ SZ_READ_BYTE(mask)
224
+ *value = v | ((UInt32)mask << 8);
225
+ mask = 0x20;
226
+ for (i = 2; i < 8; i++)
227
+ {
228
+ Byte b;
229
+ if ((firstByte & mask) == 0)
230
+ {
231
+ const UInt64 highPart = (unsigned)firstByte & (unsigned)(mask - 1);
232
+ *value |= (highPart << (8 * i));
233
+ return SZ_OK;
234
+ }
235
+ SZ_READ_BYTE(b)
236
+ *value |= ((UInt64)b << (8 * i));
237
+ mask >>= 1;
238
+ }
239
+ return SZ_OK;
240
+ }
241
+
242
+
243
+ static Z7_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value)
244
+ {
245
+ Byte firstByte;
246
+ UInt64 value64;
247
+ if (sd->Size == 0)
248
+ return SZ_ERROR_ARCHIVE;
249
+ firstByte = *sd->Data;
250
+ if ((firstByte & 0x80) == 0)
251
+ {
252
+ *value = firstByte;
253
+ sd->Data++;
254
+ sd->Size--;
255
+ return SZ_OK;
256
+ }
257
+ RINOK(ReadNumber(sd, &value64))
258
+ if (value64 >= (UInt32)0x80000000 - 1)
259
+ return SZ_ERROR_UNSUPPORTED;
260
+ if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 4)))
261
+ return SZ_ERROR_UNSUPPORTED;
262
+ *value = (UInt32)value64;
263
+ return SZ_OK;
264
+ }
265
+
266
+ #define ReadID(sd, value) ReadNumber(sd, value)
267
+
268
+ static SRes SkipData(CSzData *sd)
269
+ {
270
+ UInt64 size;
271
+ RINOK(ReadNumber(sd, &size))
272
+ if (size > sd->Size)
273
+ return SZ_ERROR_ARCHIVE;
274
+ SKIP_DATA(sd, size)
275
+ return SZ_OK;
276
+ }
277
+
278
+ static SRes WaitId(CSzData *sd, UInt32 id)
279
+ {
280
+ for (;;)
281
+ {
282
+ UInt64 type;
283
+ RINOK(ReadID(sd, &type))
284
+ if (type == id)
285
+ return SZ_OK;
286
+ if (type == k7zIdEnd)
287
+ return SZ_ERROR_ARCHIVE;
288
+ RINOK(SkipData(sd))
289
+ }
290
+ }
291
+
292
+ static SRes RememberBitVector(CSzData *sd, UInt32 numItems, const Byte **v)
293
+ {
294
+ const UInt32 numBytes = (numItems + 7) >> 3;
295
+ if (numBytes > sd->Size)
296
+ return SZ_ERROR_ARCHIVE;
297
+ *v = sd->Data;
298
+ SKIP_DATA(sd, numBytes)
299
+ return SZ_OK;
300
+ }
301
+
302
+ static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems)
303
+ {
304
+ unsigned b = 0;
305
+ unsigned m = 0;
306
+ UInt32 sum = 0;
307
+ for (; numItems != 0; numItems--)
308
+ {
309
+ if (m == 0)
310
+ {
311
+ b = *bits++;
312
+ m = 8;
313
+ }
314
+ m--;
315
+ sum += (UInt32)((b >> m) & 1);
316
+ }
317
+ return sum;
318
+ }
319
+
320
+ static Z7_NO_INLINE SRes ReadBitVector(CSzData *sd, UInt32 numItems, Byte **v, ISzAllocPtr alloc)
321
+ {
322
+ Byte allAreDefined;
323
+ Byte *v2;
324
+ const UInt32 numBytes = (numItems + 7) >> 3;
325
+ *v = NULL;
326
+ SZ_READ_BYTE(allAreDefined)
327
+ if (numBytes == 0)
328
+ return SZ_OK;
329
+ if (allAreDefined == 0)
330
+ {
331
+ if (numBytes > sd->Size)
332
+ return SZ_ERROR_ARCHIVE;
333
+ MY_ALLOC_AND_CPY(*v, numBytes, sd->Data, alloc)
334
+ SKIP_DATA(sd, numBytes)
335
+ return SZ_OK;
336
+ }
337
+ MY_ALLOC(Byte, *v, numBytes, alloc)
338
+ v2 = *v;
339
+ memset(v2, 0xFF, (size_t)numBytes);
340
+ {
341
+ const unsigned numBits = (unsigned)numItems & 7;
342
+ if (numBits != 0)
343
+ v2[(size_t)numBytes - 1] = (Byte)((((UInt32)1 << numBits) - 1) << (8 - numBits));
344
+ }
345
+ return SZ_OK;
346
+ }
347
+
348
+ static Z7_NO_INLINE SRes ReadUi32s(CSzData *sd2, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc)
349
+ {
350
+ UInt32 i;
351
+ CSzData sd;
352
+ UInt32 *vals;
353
+ const Byte *defs;
354
+ MY_ALLOC_ZE(UInt32, crcs->Vals, numItems, alloc)
355
+ sd = *sd2;
356
+ defs = crcs->Defs;
357
+ vals = crcs->Vals;
358
+ for (i = 0; i < numItems; i++)
359
+ if (SzBitArray_Check(defs, i))
360
+ {
361
+ SZ_READ_32(vals[i])
362
+ }
363
+ else
364
+ vals[i] = 0;
365
+ *sd2 = sd;
366
+ return SZ_OK;
367
+ }
368
+
369
+ static SRes ReadBitUi32s(CSzData *sd, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc)
370
+ {
371
+ SzBitUi32s_Free(crcs, alloc);
372
+ RINOK(ReadBitVector(sd, numItems, &crcs->Defs, alloc))
373
+ return ReadUi32s(sd, numItems, crcs, alloc);
374
+ }
375
+
376
+ static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems)
377
+ {
378
+ Byte allAreDefined;
379
+ UInt32 numDefined = numItems;
380
+ SZ_READ_BYTE(allAreDefined)
381
+ if (!allAreDefined)
382
+ {
383
+ const size_t numBytes = (numItems + 7) >> 3;
384
+ if (numBytes > sd->Size)
385
+ return SZ_ERROR_ARCHIVE;
386
+ numDefined = CountDefinedBits(sd->Data, numItems);
387
+ SKIP_DATA(sd, numBytes)
388
+ }
389
+ if (numDefined > (sd->Size >> 2))
390
+ return SZ_ERROR_ARCHIVE;
391
+ SKIP_DATA(sd, (size_t)numDefined * 4)
392
+ return SZ_OK;
393
+ }
394
+
395
+ static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAllocPtr alloc)
396
+ {
397
+ RINOK(SzReadNumber32(sd, &p->NumPackStreams))
398
+
399
+ RINOK(WaitId(sd, k7zIdSize))
400
+ MY_ALLOC(UInt64, p->PackPositions, (size_t)p->NumPackStreams + 1, alloc)
401
+ {
402
+ UInt64 sum = 0;
403
+ UInt32 i;
404
+ const UInt32 numPackStreams = p->NumPackStreams;
405
+ for (i = 0; i < numPackStreams; i++)
406
+ {
407
+ UInt64 packSize;
408
+ p->PackPositions[i] = sum;
409
+ RINOK(ReadNumber(sd, &packSize))
410
+ sum += packSize;
411
+ if (sum < packSize)
412
+ return SZ_ERROR_ARCHIVE;
413
+ }
414
+ p->PackPositions[i] = sum;
415
+ }
416
+
417
+ for (;;)
418
+ {
419
+ UInt64 type;
420
+ RINOK(ReadID(sd, &type))
421
+ if (type == k7zIdEnd)
422
+ return SZ_OK;
423
+ if (type == k7zIdCRC)
424
+ {
425
+ /* CRC of packed streams is unused now */
426
+ RINOK(SkipBitUi32s(sd, p->NumPackStreams))
427
+ continue;
428
+ }
429
+ RINOK(SkipData(sd))
430
+ }
431
+ }
432
+
433
+ /*
434
+ static SRes SzReadSwitch(CSzData *sd)
435
+ {
436
+ Byte external;
437
+ RINOK(SzReadByte(sd, &external));
438
+ return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED;
439
+ }
440
+ */
441
+
442
+ #define k_NumCodersStreams_in_Folder_MAX (SZ_NUM_BONDS_IN_FOLDER_MAX + SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX)
443
+
444
+ SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd)
445
+ {
446
+ UInt32 numCoders, i;
447
+ UInt32 numInStreams = 0;
448
+ const Byte *dataStart = sd->Data;
449
+
450
+ f->NumCoders = 0;
451
+ f->NumBonds = 0;
452
+ f->NumPackStreams = 0;
453
+ f->UnpackStream = 0;
454
+
455
+ RINOK(SzReadNumber32(sd, &numCoders))
456
+ if (numCoders == 0 || numCoders > SZ_NUM_CODERS_IN_FOLDER_MAX)
457
+ return SZ_ERROR_UNSUPPORTED;
458
+
459
+ for (i = 0; i < numCoders; i++)
460
+ {
461
+ Byte mainByte;
462
+ CSzCoderInfo *coder = f->Coders + i;
463
+ unsigned idSize, j;
464
+ UInt64 id;
465
+
466
+ SZ_READ_BYTE(mainByte)
467
+ if ((mainByte & 0xC0) != 0)
468
+ return SZ_ERROR_UNSUPPORTED;
469
+
470
+ idSize = (unsigned)(mainByte & 0xF);
471
+ if (idSize > sizeof(id))
472
+ return SZ_ERROR_UNSUPPORTED;
473
+ if (idSize > sd->Size)
474
+ return SZ_ERROR_ARCHIVE;
475
+ id = 0;
476
+ for (j = 0; j < idSize; j++)
477
+ {
478
+ id = ((id << 8) | *sd->Data);
479
+ sd->Data++;
480
+ sd->Size--;
481
+ }
482
+ if (id > (UInt32)0xFFFFFFFF)
483
+ return SZ_ERROR_UNSUPPORTED;
484
+ coder->MethodID = (UInt32)id;
485
+
486
+ coder->NumStreams = 1;
487
+ coder->PropsOffset = 0;
488
+ coder->PropsSize = 0;
489
+
490
+ if ((mainByte & 0x10) != 0)
491
+ {
492
+ UInt32 numStreams;
493
+
494
+ RINOK(SzReadNumber32(sd, &numStreams))
495
+ if (numStreams > k_NumCodersStreams_in_Folder_MAX)
496
+ return SZ_ERROR_UNSUPPORTED;
497
+ coder->NumStreams = (Byte)numStreams;
498
+
499
+ RINOK(SzReadNumber32(sd, &numStreams))
500
+ if (numStreams != 1)
501
+ return SZ_ERROR_UNSUPPORTED;
502
+ }
503
+
504
+ numInStreams += coder->NumStreams;
505
+
506
+ if (numInStreams > k_NumCodersStreams_in_Folder_MAX)
507
+ return SZ_ERROR_UNSUPPORTED;
508
+
509
+ if ((mainByte & 0x20) != 0)
510
+ {
511
+ UInt32 propsSize = 0;
512
+ RINOK(SzReadNumber32(sd, &propsSize))
513
+ if (propsSize > sd->Size)
514
+ return SZ_ERROR_ARCHIVE;
515
+ if (propsSize >= 0x80)
516
+ return SZ_ERROR_UNSUPPORTED;
517
+ coder->PropsOffset = (size_t)(sd->Data - dataStart);
518
+ coder->PropsSize = (Byte)propsSize;
519
+ sd->Data += (size_t)propsSize;
520
+ sd->Size -= (size_t)propsSize;
521
+ }
522
+ }
523
+
524
+ /*
525
+ if (numInStreams == 1 && numCoders == 1)
526
+ {
527
+ f->NumPackStreams = 1;
528
+ f->PackStreams[0] = 0;
529
+ }
530
+ else
531
+ */
532
+ {
533
+ Byte streamUsed[k_NumCodersStreams_in_Folder_MAX];
534
+ UInt32 numBonds, numPackStreams;
535
+
536
+ numBonds = numCoders - 1;
537
+ if (numInStreams < numBonds)
538
+ return SZ_ERROR_ARCHIVE;
539
+ if (numBonds > SZ_NUM_BONDS_IN_FOLDER_MAX)
540
+ return SZ_ERROR_UNSUPPORTED;
541
+ f->NumBonds = numBonds;
542
+
543
+ numPackStreams = numInStreams - numBonds;
544
+ if (numPackStreams > SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX)
545
+ return SZ_ERROR_UNSUPPORTED;
546
+ f->NumPackStreams = numPackStreams;
547
+
548
+ for (i = 0; i < numInStreams; i++)
549
+ streamUsed[i] = False;
550
+
551
+ if (numBonds != 0)
552
+ {
553
+ Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX];
554
+
555
+ for (i = 0; i < numCoders; i++)
556
+ coderUsed[i] = False;
557
+
558
+ for (i = 0; i < numBonds; i++)
559
+ {
560
+ CSzBond *bp = f->Bonds + i;
561
+
562
+ RINOK(SzReadNumber32(sd, &bp->InIndex))
563
+ if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex])
564
+ return SZ_ERROR_ARCHIVE;
565
+ streamUsed[bp->InIndex] = True;
566
+
567
+ RINOK(SzReadNumber32(sd, &bp->OutIndex))
568
+ if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex])
569
+ return SZ_ERROR_ARCHIVE;
570
+ coderUsed[bp->OutIndex] = True;
571
+ }
572
+
573
+ for (i = 0; i < numCoders; i++)
574
+ if (!coderUsed[i])
575
+ {
576
+ f->UnpackStream = i;
577
+ break;
578
+ }
579
+
580
+ if (i == numCoders)
581
+ return SZ_ERROR_ARCHIVE;
582
+ }
583
+
584
+ if (numPackStreams == 1)
585
+ {
586
+ for (i = 0; i < numInStreams; i++)
587
+ if (!streamUsed[i])
588
+ break;
589
+ if (i == numInStreams)
590
+ return SZ_ERROR_ARCHIVE;
591
+ f->PackStreams[0] = i;
592
+ }
593
+ else
594
+ for (i = 0; i < numPackStreams; i++)
595
+ {
596
+ UInt32 index;
597
+ RINOK(SzReadNumber32(sd, &index))
598
+ if (index >= numInStreams || streamUsed[index])
599
+ return SZ_ERROR_ARCHIVE;
600
+ streamUsed[index] = True;
601
+ f->PackStreams[i] = index;
602
+ }
603
+ }
604
+
605
+ f->NumCoders = numCoders;
606
+
607
+ return SZ_OK;
608
+ }
609
+
610
+
611
+ static Z7_NO_INLINE SRes SkipNumbers(CSzData *sd2, UInt32 num)
612
+ {
613
+ CSzData sd;
614
+ sd = *sd2;
615
+ for (; num != 0; num--)
616
+ {
617
+ Byte firstByte, mask;
618
+ unsigned i;
619
+ SZ_READ_BYTE_2(firstByte)
620
+ if ((firstByte & 0x80) == 0)
621
+ continue;
622
+ if ((firstByte & 0x40) == 0)
623
+ {
624
+ if (sd.Size == 0)
625
+ return SZ_ERROR_ARCHIVE;
626
+ sd.Size--;
627
+ sd.Data++;
628
+ continue;
629
+ }
630
+ mask = 0x20;
631
+ for (i = 2; i < 8 && (firstByte & mask) != 0; i++)
632
+ mask >>= 1;
633
+ if (i > sd.Size)
634
+ return SZ_ERROR_ARCHIVE;
635
+ SKIP_DATA2(sd, i)
636
+ }
637
+ *sd2 = sd;
638
+ return SZ_OK;
639
+ }
640
+
641
+
642
+ #define k_Scan_NumCoders_MAX 64
643
+ #define k_Scan_NumCodersStreams_in_Folder_MAX 64
644
+
645
+
646
+ static SRes ReadUnpackInfo(CSzAr *p,
647
+ CSzData *sd2,
648
+ UInt32 numFoldersMax,
649
+ const CBuf *tempBufs, UInt32 numTempBufs,
650
+ ISzAllocPtr alloc)
651
+ {
652
+ CSzData sd;
653
+
654
+ UInt32 fo, numFolders, numCodersOutStreams, packStreamIndex;
655
+ const Byte *startBufPtr;
656
+ Byte external;
657
+
658
+ RINOK(WaitId(sd2, k7zIdFolder))
659
+
660
+ RINOK(SzReadNumber32(sd2, &numFolders))
661
+ if (numFolders > numFoldersMax)
662
+ return SZ_ERROR_UNSUPPORTED;
663
+ p->NumFolders = numFolders;
664
+
665
+ SZ_READ_BYTE_SD(sd2, external)
666
+ if (external == 0)
667
+ sd = *sd2;
668
+ else
669
+ {
670
+ UInt32 index;
671
+ RINOK(SzReadNumber32(sd2, &index))
672
+ if (index >= numTempBufs)
673
+ return SZ_ERROR_ARCHIVE;
674
+ sd.Data = tempBufs[index].data;
675
+ sd.Size = tempBufs[index].size;
676
+ }
677
+
678
+ MY_ALLOC(size_t, p->FoCodersOffsets, (size_t)numFolders + 1, alloc)
679
+ MY_ALLOC(UInt32, p->FoStartPackStreamIndex, (size_t)numFolders + 1, alloc)
680
+ MY_ALLOC(UInt32, p->FoToCoderUnpackSizes, (size_t)numFolders + 1, alloc)
681
+ MY_ALLOC_ZE(Byte, p->FoToMainUnpackSizeIndex, (size_t)numFolders, alloc)
682
+
683
+ startBufPtr = sd.Data;
684
+
685
+ packStreamIndex = 0;
686
+ numCodersOutStreams = 0;
687
+
688
+ for (fo = 0; fo < numFolders; fo++)
689
+ {
690
+ UInt32 numCoders, ci, numInStreams = 0;
691
+
692
+ p->FoCodersOffsets[fo] = (size_t)(sd.Data - startBufPtr);
693
+
694
+ RINOK(SzReadNumber32(&sd, &numCoders))
695
+ if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX)
696
+ return SZ_ERROR_UNSUPPORTED;
697
+
698
+ for (ci = 0; ci < numCoders; ci++)
699
+ {
700
+ Byte mainByte;
701
+ unsigned idSize;
702
+ UInt32 coderInStreams;
703
+
704
+ SZ_READ_BYTE_2(mainByte)
705
+ if ((mainByte & 0xC0) != 0)
706
+ return SZ_ERROR_UNSUPPORTED;
707
+ idSize = (mainByte & 0xF);
708
+ if (idSize > 8)
709
+ return SZ_ERROR_UNSUPPORTED;
710
+ if (idSize > sd.Size)
711
+ return SZ_ERROR_ARCHIVE;
712
+ SKIP_DATA2(sd, idSize)
713
+
714
+ coderInStreams = 1;
715
+
716
+ if ((mainByte & 0x10) != 0)
717
+ {
718
+ UInt32 coderOutStreams;
719
+ RINOK(SzReadNumber32(&sd, &coderInStreams))
720
+ RINOK(SzReadNumber32(&sd, &coderOutStreams))
721
+ if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX || coderOutStreams != 1)
722
+ return SZ_ERROR_UNSUPPORTED;
723
+ }
724
+
725
+ numInStreams += coderInStreams;
726
+
727
+ if ((mainByte & 0x20) != 0)
728
+ {
729
+ UInt32 propsSize;
730
+ RINOK(SzReadNumber32(&sd, &propsSize))
731
+ if (propsSize > sd.Size)
732
+ return SZ_ERROR_ARCHIVE;
733
+ SKIP_DATA2(sd, propsSize)
734
+ }
735
+ }
736
+
737
+ {
738
+ UInt32 indexOfMainStream = 0;
739
+ UInt32 numPackStreams = 1;
740
+
741
+ if (numCoders != 1 || numInStreams != 1)
742
+ {
743
+ Byte streamUsed[k_Scan_NumCodersStreams_in_Folder_MAX];
744
+ Byte coderUsed[k_Scan_NumCoders_MAX];
745
+
746
+ UInt32 i;
747
+ const UInt32 numBonds = numCoders - 1;
748
+ if (numInStreams < numBonds)
749
+ return SZ_ERROR_ARCHIVE;
750
+
751
+ if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
752
+ return SZ_ERROR_UNSUPPORTED;
753
+
754
+ for (i = 0; i < numInStreams; i++)
755
+ streamUsed[i] = False;
756
+ for (i = 0; i < numCoders; i++)
757
+ coderUsed[i] = False;
758
+
759
+ for (i = 0; i < numBonds; i++)
760
+ {
761
+ UInt32 index;
762
+
763
+ RINOK(SzReadNumber32(&sd, &index))
764
+ if (index >= numInStreams || streamUsed[index])
765
+ return SZ_ERROR_ARCHIVE;
766
+ streamUsed[index] = True;
767
+
768
+ RINOK(SzReadNumber32(&sd, &index))
769
+ if (index >= numCoders || coderUsed[index])
770
+ return SZ_ERROR_ARCHIVE;
771
+ coderUsed[index] = True;
772
+ }
773
+
774
+ numPackStreams = numInStreams - numBonds;
775
+
776
+ if (numPackStreams != 1)
777
+ for (i = 0; i < numPackStreams; i++)
778
+ {
779
+ UInt32 index;
780
+ RINOK(SzReadNumber32(&sd, &index))
781
+ if (index >= numInStreams || streamUsed[index])
782
+ return SZ_ERROR_ARCHIVE;
783
+ streamUsed[index] = True;
784
+ }
785
+
786
+ for (i = 0; i < numCoders; i++)
787
+ if (!coderUsed[i])
788
+ {
789
+ indexOfMainStream = i;
790
+ break;
791
+ }
792
+
793
+ if (i == numCoders)
794
+ return SZ_ERROR_ARCHIVE;
795
+ }
796
+
797
+ p->FoStartPackStreamIndex[fo] = packStreamIndex;
798
+ p->FoToCoderUnpackSizes[fo] = numCodersOutStreams;
799
+ p->FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream;
800
+ numCodersOutStreams += numCoders;
801
+ if (numCodersOutStreams < numCoders)
802
+ return SZ_ERROR_UNSUPPORTED;
803
+ if (numPackStreams > p->NumPackStreams - packStreamIndex)
804
+ return SZ_ERROR_ARCHIVE;
805
+ packStreamIndex += numPackStreams;
806
+ }
807
+ }
808
+
809
+ p->FoToCoderUnpackSizes[fo] = numCodersOutStreams;
810
+
811
+ {
812
+ const size_t dataSize = (size_t)(sd.Data - startBufPtr);
813
+ p->FoStartPackStreamIndex[fo] = packStreamIndex;
814
+ p->FoCodersOffsets[fo] = dataSize;
815
+ MY_ALLOC_ZE_AND_CPY(p->CodersData, dataSize, startBufPtr, alloc)
816
+ }
817
+
818
+ if (external != 0)
819
+ {
820
+ if (sd.Size != 0)
821
+ return SZ_ERROR_ARCHIVE;
822
+ sd = *sd2;
823
+ }
824
+
825
+ RINOK(WaitId(&sd, k7zIdCodersUnpackSize))
826
+
827
+ MY_ALLOC_ZE(UInt64, p->CoderUnpackSizes, (size_t)numCodersOutStreams, alloc)
828
+ {
829
+ UInt32 i;
830
+ for (i = 0; i < numCodersOutStreams; i++)
831
+ {
832
+ RINOK(ReadNumber(&sd, p->CoderUnpackSizes + i))
833
+ }
834
+ }
835
+
836
+ for (;;)
837
+ {
838
+ UInt64 type;
839
+ RINOK(ReadID(&sd, &type))
840
+ if (type == k7zIdEnd)
841
+ {
842
+ *sd2 = sd;
843
+ return SZ_OK;
844
+ }
845
+ if (type == k7zIdCRC)
846
+ {
847
+ RINOK(ReadBitUi32s(&sd, numFolders, &p->FolderCRCs, alloc))
848
+ continue;
849
+ }
850
+ RINOK(SkipData(&sd))
851
+ }
852
+ }
853
+
854
+
855
+ UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex)
856
+ {
857
+ return p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex] + p->FoToMainUnpackSizeIndex[folderIndex]];
858
+ }
859
+
860
+
861
+ typedef struct
862
+ {
863
+ UInt32 NumTotalSubStreams;
864
+ UInt32 NumSubDigests;
865
+ CSzData sdNumSubStreams;
866
+ CSzData sdSizes;
867
+ CSzData sdCRCs;
868
+ } CSubStreamInfo;
869
+
870
+
871
+ static SRes ReadSubStreamsInfo(CSzAr *p, CSzData *sd, CSubStreamInfo *ssi)
872
+ {
873
+ UInt64 type = 0;
874
+ UInt32 numSubDigests = 0;
875
+ const UInt32 numFolders = p->NumFolders;
876
+ UInt32 numUnpackStreams = numFolders;
877
+ UInt32 numUnpackSizesInData = 0;
878
+
879
+ for (;;)
880
+ {
881
+ RINOK(ReadID(sd, &type))
882
+ if (type == k7zIdNumUnpackStream)
883
+ {
884
+ UInt32 i;
885
+ ssi->sdNumSubStreams.Data = sd->Data;
886
+ numUnpackStreams = 0;
887
+ numSubDigests = 0;
888
+ for (i = 0; i < numFolders; i++)
889
+ {
890
+ UInt32 numStreams;
891
+ RINOK(SzReadNumber32(sd, &numStreams))
892
+ if (numUnpackStreams > numUnpackStreams + numStreams)
893
+ return SZ_ERROR_UNSUPPORTED;
894
+ numUnpackStreams += numStreams;
895
+ if (numStreams != 0)
896
+ numUnpackSizesInData += (numStreams - 1);
897
+ if (numStreams != 1 || !SzBitWithVals_Check(&p->FolderCRCs, i))
898
+ numSubDigests += numStreams;
899
+ }
900
+ ssi->sdNumSubStreams.Size = (size_t)(sd->Data - ssi->sdNumSubStreams.Data);
901
+ continue;
902
+ }
903
+ if (type == k7zIdCRC || type == k7zIdSize || type == k7zIdEnd)
904
+ break;
905
+ RINOK(SkipData(sd))
906
+ }
907
+
908
+ if (!ssi->sdNumSubStreams.Data)
909
+ {
910
+ numSubDigests = numFolders;
911
+ if (p->FolderCRCs.Defs)
912
+ numSubDigests = numFolders - CountDefinedBits(p->FolderCRCs.Defs, numFolders);
913
+ }
914
+
915
+ ssi->NumTotalSubStreams = numUnpackStreams;
916
+ ssi->NumSubDigests = numSubDigests;
917
+
918
+ if (type == k7zIdSize)
919
+ {
920
+ ssi->sdSizes.Data = sd->Data;
921
+ RINOK(SkipNumbers(sd, numUnpackSizesInData))
922
+ ssi->sdSizes.Size = (size_t)(sd->Data - ssi->sdSizes.Data);
923
+ RINOK(ReadID(sd, &type))
924
+ }
925
+
926
+ for (;;)
927
+ {
928
+ if (type == k7zIdEnd)
929
+ return SZ_OK;
930
+ if (type == k7zIdCRC)
931
+ {
932
+ ssi->sdCRCs.Data = sd->Data;
933
+ RINOK(SkipBitUi32s(sd, numSubDigests))
934
+ ssi->sdCRCs.Size = (size_t)(sd->Data - ssi->sdCRCs.Data);
935
+ }
936
+ else
937
+ {
938
+ RINOK(SkipData(sd))
939
+ }
940
+ RINOK(ReadID(sd, &type))
941
+ }
942
+ }
943
+
944
+ static SRes SzReadStreamsInfo(CSzAr *p,
945
+ CSzData *sd,
946
+ UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs,
947
+ UInt64 *dataOffset,
948
+ CSubStreamInfo *ssi,
949
+ ISzAllocPtr alloc)
950
+ {
951
+ UInt64 type;
952
+
953
+ SzData_CLEAR(&ssi->sdSizes)
954
+ SzData_CLEAR(&ssi->sdCRCs)
955
+ SzData_CLEAR(&ssi->sdNumSubStreams)
956
+
957
+ *dataOffset = 0;
958
+ RINOK(ReadID(sd, &type))
959
+ if (type == k7zIdPackInfo)
960
+ {
961
+ RINOK(ReadNumber(sd, dataOffset))
962
+ if (*dataOffset > p->RangeLimit)
963
+ return SZ_ERROR_ARCHIVE;
964
+ RINOK(ReadPackInfo(p, sd, alloc))
965
+ if (p->PackPositions[p->NumPackStreams] > p->RangeLimit - *dataOffset)
966
+ return SZ_ERROR_ARCHIVE;
967
+ RINOK(ReadID(sd, &type))
968
+ }
969
+ if (type == k7zIdUnpackInfo)
970
+ {
971
+ RINOK(ReadUnpackInfo(p, sd, numFoldersMax, tempBufs, numTempBufs, alloc))
972
+ RINOK(ReadID(sd, &type))
973
+ }
974
+ if (type == k7zIdSubStreamsInfo)
975
+ {
976
+ RINOK(ReadSubStreamsInfo(p, sd, ssi))
977
+ RINOK(ReadID(sd, &type))
978
+ }
979
+ else
980
+ {
981
+ ssi->NumTotalSubStreams = p->NumFolders;
982
+ // ssi->NumSubDigests = 0;
983
+ }
984
+
985
+ return (type == k7zIdEnd ? SZ_OK : SZ_ERROR_UNSUPPORTED);
986
+ }
987
+
988
+ static SRes SzReadAndDecodePackedStreams(
989
+ ILookInStreamPtr inStream,
990
+ CSzData *sd,
991
+ CBuf *tempBufs,
992
+ UInt32 numFoldersMax,
993
+ UInt64 baseOffset,
994
+ CSzAr *p,
995
+ ISzAllocPtr allocTemp)
996
+ {
997
+ UInt64 dataStartPos;
998
+ UInt32 fo;
999
+ CSubStreamInfo ssi;
1000
+
1001
+ RINOK(SzReadStreamsInfo(p, sd, numFoldersMax, NULL, 0, &dataStartPos, &ssi, allocTemp))
1002
+
1003
+ dataStartPos += baseOffset;
1004
+ if (p->NumFolders == 0)
1005
+ return SZ_ERROR_ARCHIVE;
1006
+
1007
+ for (fo = 0; fo < p->NumFolders; fo++)
1008
+ Buf_Init(tempBufs + fo);
1009
+
1010
+ for (fo = 0; fo < p->NumFolders; fo++)
1011
+ {
1012
+ CBuf *tempBuf = tempBufs + fo;
1013
+ const UInt64 unpackSize = SzAr_GetFolderUnpackSize(p, fo);
1014
+ if ((size_t)unpackSize != unpackSize)
1015
+ return SZ_ERROR_MEM;
1016
+ if (!Buf_Create(tempBuf, (size_t)unpackSize, allocTemp))
1017
+ return SZ_ERROR_MEM;
1018
+ }
1019
+
1020
+ for (fo = 0; fo < p->NumFolders; fo++)
1021
+ {
1022
+ const CBuf *tempBuf = tempBufs + fo;
1023
+ RINOK(LookInStream_SeekTo(inStream, dataStartPos))
1024
+ RINOK(SzAr_DecodeFolder(p, fo, inStream, dataStartPos, tempBuf->data, tempBuf->size, allocTemp))
1025
+ }
1026
+
1027
+ return SZ_OK;
1028
+ }
1029
+
1030
+ static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets)
1031
+ {
1032
+ size_t pos = 0;
1033
+ *offsets++ = 0;
1034
+ if (numFiles == 0)
1035
+ return (size == 0) ? SZ_OK : SZ_ERROR_ARCHIVE;
1036
+ if (size < 2)
1037
+ return SZ_ERROR_ARCHIVE;
1038
+ if (data[size - 2] != 0 || data[size - 1] != 0)
1039
+ return SZ_ERROR_ARCHIVE;
1040
+ do
1041
+ {
1042
+ const Byte *p;
1043
+ if (pos == size)
1044
+ return SZ_ERROR_ARCHIVE;
1045
+ for (p = data + pos;
1046
+ #ifdef _WIN32
1047
+ *(const UInt16 *)(const void *)p != 0
1048
+ #else
1049
+ p[0] != 0 || p[1] != 0
1050
+ #endif
1051
+ ; p += 2);
1052
+ pos = (size_t)(p - data) + 2;
1053
+ *offsets++ = (pos >> 1);
1054
+ }
1055
+ while (--numFiles);
1056
+ return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE;
1057
+ }
1058
+
1059
+ static Z7_NO_INLINE SRes ReadTime(CSzBitUi64s *p, UInt32 num,
1060
+ CSzData *sd2,
1061
+ const CBuf *tempBufs, UInt32 numTempBufs,
1062
+ ISzAllocPtr alloc)
1063
+ {
1064
+ CSzData sd;
1065
+ UInt32 i;
1066
+ CNtfsFileTime *vals;
1067
+ Byte *defs;
1068
+ Byte external;
1069
+
1070
+ RINOK(ReadBitVector(sd2, num, &p->Defs, alloc))
1071
+
1072
+ SZ_READ_BYTE_SD(sd2, external)
1073
+ if (external == 0)
1074
+ sd = *sd2;
1075
+ else
1076
+ {
1077
+ UInt32 index;
1078
+ RINOK(SzReadNumber32(sd2, &index))
1079
+ if (index >= numTempBufs)
1080
+ return SZ_ERROR_ARCHIVE;
1081
+ sd.Data = tempBufs[index].data;
1082
+ sd.Size = tempBufs[index].size;
1083
+ }
1084
+
1085
+ MY_ALLOC_ZE(CNtfsFileTime, p->Vals, num, alloc)
1086
+ vals = p->Vals;
1087
+ defs = p->Defs;
1088
+ for (i = 0; i < num; i++)
1089
+ if (SzBitArray_Check(defs, i))
1090
+ {
1091
+ if (sd.Size < 8)
1092
+ return SZ_ERROR_ARCHIVE;
1093
+ vals[i].Low = GetUi32(sd.Data);
1094
+ vals[i].High = GetUi32(sd.Data + 4);
1095
+ SKIP_DATA2(sd, 8)
1096
+ }
1097
+ else
1098
+ vals[i].High = vals[i].Low = 0;
1099
+
1100
+ if (external == 0)
1101
+ *sd2 = sd;
1102
+
1103
+ return SZ_OK;
1104
+ }
1105
+
1106
+
1107
+ #define NUM_ADDITIONAL_STREAMS_MAX 8
1108
+
1109
+
1110
+ static SRes SzReadHeader2(
1111
+ CSzArEx *p, /* allocMain */
1112
+ CSzData *sd,
1113
+ ILookInStreamPtr inStream,
1114
+ CBuf *tempBufs, UInt32 *numTempBufs,
1115
+ ISzAllocPtr allocMain,
1116
+ ISzAllocPtr allocTemp
1117
+ )
1118
+ {
1119
+ CSubStreamInfo ssi;
1120
+
1121
+ {
1122
+ UInt64 type;
1123
+
1124
+ SzData_CLEAR(&ssi.sdSizes)
1125
+ SzData_CLEAR(&ssi.sdCRCs)
1126
+ SzData_CLEAR(&ssi.sdNumSubStreams)
1127
+
1128
+ ssi.NumSubDigests = 0;
1129
+ ssi.NumTotalSubStreams = 0;
1130
+
1131
+ RINOK(ReadID(sd, &type))
1132
+
1133
+ if (type == k7zIdArchiveProperties)
1134
+ {
1135
+ for (;;)
1136
+ {
1137
+ UInt64 type2;
1138
+ RINOK(ReadID(sd, &type2))
1139
+ if (type2 == k7zIdEnd)
1140
+ break;
1141
+ RINOK(SkipData(sd))
1142
+ }
1143
+ RINOK(ReadID(sd, &type))
1144
+ }
1145
+
1146
+ if (type == k7zIdAdditionalStreamsInfo)
1147
+ {
1148
+ CSzAr tempAr;
1149
+ SRes res;
1150
+
1151
+ SzAr_Init(&tempAr);
1152
+ tempAr.RangeLimit = p->db.RangeLimit;
1153
+
1154
+ res = SzReadAndDecodePackedStreams(inStream, sd, tempBufs, NUM_ADDITIONAL_STREAMS_MAX,
1155
+ p->startPosAfterHeader, &tempAr, allocTemp);
1156
+ *numTempBufs = tempAr.NumFolders;
1157
+ SzAr_Free(&tempAr, allocTemp);
1158
+
1159
+ if (res != SZ_OK)
1160
+ return res;
1161
+ RINOK(ReadID(sd, &type))
1162
+ }
1163
+
1164
+ if (type == k7zIdMainStreamsInfo)
1165
+ {
1166
+ RINOK(SzReadStreamsInfo(&p->db, sd, (UInt32)1 << 30, tempBufs, *numTempBufs,
1167
+ &p->dataPos, &ssi, allocMain))
1168
+ p->dataPos += p->startPosAfterHeader;
1169
+ RINOK(ReadID(sd, &type))
1170
+ }
1171
+
1172
+ if (type == k7zIdEnd)
1173
+ {
1174
+ return SZ_OK;
1175
+ }
1176
+
1177
+ if (type != k7zIdFilesInfo)
1178
+ return SZ_ERROR_ARCHIVE;
1179
+ }
1180
+
1181
+ {
1182
+ UInt32 numFiles = 0;
1183
+ UInt32 numEmptyStreams = 0;
1184
+ const Byte *emptyStreams = NULL;
1185
+ const Byte *emptyFiles = NULL;
1186
+
1187
+ RINOK(SzReadNumber32(sd, &numFiles))
1188
+ p->NumFiles = numFiles;
1189
+
1190
+ for (;;)
1191
+ {
1192
+ UInt64 type;
1193
+ UInt64 size;
1194
+ RINOK(ReadID(sd, &type))
1195
+ if (type == k7zIdEnd)
1196
+ break;
1197
+ RINOK(ReadNumber(sd, &size))
1198
+ if (size > sd->Size)
1199
+ return SZ_ERROR_ARCHIVE;
1200
+
1201
+ if (type >= ((UInt32)1 << 8))
1202
+ {
1203
+ SKIP_DATA(sd, size)
1204
+ }
1205
+ else switch ((unsigned)type)
1206
+ {
1207
+ case k7zIdName:
1208
+ {
1209
+ size_t namesSize;
1210
+ const Byte *namesData;
1211
+ Byte external;
1212
+
1213
+ SZ_READ_BYTE(external)
1214
+ if (external == 0)
1215
+ {
1216
+ namesSize = (size_t)size - 1;
1217
+ namesData = sd->Data;
1218
+ }
1219
+ else
1220
+ {
1221
+ UInt32 index;
1222
+ RINOK(SzReadNumber32(sd, &index))
1223
+ if (index >= *numTempBufs)
1224
+ return SZ_ERROR_ARCHIVE;
1225
+ namesData = (tempBufs)[index].data;
1226
+ namesSize = (tempBufs)[index].size;
1227
+ }
1228
+
1229
+ if ((namesSize & 1) != 0)
1230
+ return SZ_ERROR_ARCHIVE;
1231
+ MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain)
1232
+ MY_ALLOC_ZE_AND_CPY(p->FileNames, namesSize, namesData, allocMain)
1233
+ RINOK(SzReadFileNames(p->FileNames, namesSize, numFiles, p->FileNameOffsets))
1234
+ if (external == 0)
1235
+ {
1236
+ SKIP_DATA(sd, namesSize)
1237
+ }
1238
+ break;
1239
+ }
1240
+ case k7zIdEmptyStream:
1241
+ {
1242
+ RINOK(RememberBitVector(sd, numFiles, &emptyStreams))
1243
+ numEmptyStreams = CountDefinedBits(emptyStreams, numFiles);
1244
+ emptyFiles = NULL;
1245
+ break;
1246
+ }
1247
+ case k7zIdEmptyFile:
1248
+ {
1249
+ RINOK(RememberBitVector(sd, numEmptyStreams, &emptyFiles))
1250
+ break;
1251
+ }
1252
+ case k7zIdWinAttrib:
1253
+ {
1254
+ Byte external;
1255
+ CSzData sdSwitch;
1256
+ CSzData *sdPtr;
1257
+ SzBitUi32s_Free(&p->Attribs, allocMain);
1258
+ RINOK(ReadBitVector(sd, numFiles, &p->Attribs.Defs, allocMain))
1259
+
1260
+ SZ_READ_BYTE(external)
1261
+ if (external == 0)
1262
+ sdPtr = sd;
1263
+ else
1264
+ {
1265
+ UInt32 index;
1266
+ RINOK(SzReadNumber32(sd, &index))
1267
+ if (index >= *numTempBufs)
1268
+ return SZ_ERROR_ARCHIVE;
1269
+ sdSwitch.Data = (tempBufs)[index].data;
1270
+ sdSwitch.Size = (tempBufs)[index].size;
1271
+ sdPtr = &sdSwitch;
1272
+ }
1273
+ RINOK(ReadUi32s(sdPtr, numFiles, &p->Attribs, allocMain))
1274
+ break;
1275
+ }
1276
+ /*
1277
+ case k7zParent:
1278
+ {
1279
+ SzBitUi32s_Free(&p->Parents, allocMain);
1280
+ RINOK(ReadBitVector(sd, numFiles, &p->Parents.Defs, allocMain));
1281
+ RINOK(SzReadSwitch(sd));
1282
+ RINOK(ReadUi32s(sd, numFiles, &p->Parents, allocMain));
1283
+ break;
1284
+ }
1285
+ */
1286
+ case k7zIdMTime: RINOK(ReadTime(&p->MTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)) break;
1287
+ case k7zIdCTime: RINOK(ReadTime(&p->CTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)) break;
1288
+ default:
1289
+ {
1290
+ SKIP_DATA(sd, size)
1291
+ }
1292
+ }
1293
+ }
1294
+
1295
+ if (numFiles - numEmptyStreams != ssi.NumTotalSubStreams)
1296
+ return SZ_ERROR_ARCHIVE;
1297
+
1298
+ for (;;)
1299
+ {
1300
+ UInt64 type;
1301
+ RINOK(ReadID(sd, &type))
1302
+ if (type == k7zIdEnd)
1303
+ break;
1304
+ RINOK(SkipData(sd))
1305
+ }
1306
+
1307
+ {
1308
+ UInt32 i;
1309
+ UInt32 emptyFileIndex = 0;
1310
+ UInt32 folderIndex = 0;
1311
+ UInt32 remSubStreams = 0;
1312
+ UInt32 numSubStreams = 0;
1313
+ UInt64 unpackPos = 0;
1314
+ const Byte *digestsDefs = NULL;
1315
+ const Byte *digestsVals = NULL;
1316
+ UInt32 digestIndex = 0;
1317
+ Byte isDirMask = 0;
1318
+ Byte crcMask = 0;
1319
+ Byte mask = 0x80;
1320
+
1321
+ MY_ALLOC(UInt32, p->FolderToFile, p->db.NumFolders + 1, allocMain)
1322
+ MY_ALLOC_ZE(UInt32, p->FileToFolder, p->NumFiles, allocMain)
1323
+ MY_ALLOC(UInt64, p->UnpackPositions, p->NumFiles + 1, allocMain)
1324
+ MY_ALLOC_ZE(Byte, p->IsDirs, (p->NumFiles + 7) >> 3, allocMain)
1325
+
1326
+ RINOK(SzBitUi32s_Alloc(&p->CRCs, p->NumFiles, allocMain))
1327
+
1328
+ if (ssi.sdCRCs.Size != 0)
1329
+ {
1330
+ Byte allDigestsDefined = 0;
1331
+ SZ_READ_BYTE_SD_NOCHECK(&ssi.sdCRCs, allDigestsDefined)
1332
+ if (allDigestsDefined)
1333
+ digestsVals = ssi.sdCRCs.Data;
1334
+ else
1335
+ {
1336
+ const size_t numBytes = (ssi.NumSubDigests + 7) >> 3;
1337
+ digestsDefs = ssi.sdCRCs.Data;
1338
+ digestsVals = digestsDefs + numBytes;
1339
+ }
1340
+ }
1341
+
1342
+ for (i = 0; i < numFiles; i++, mask >>= 1)
1343
+ {
1344
+ if (mask == 0)
1345
+ {
1346
+ const UInt32 byteIndex = (i - 1) >> 3;
1347
+ p->IsDirs[byteIndex] = isDirMask;
1348
+ p->CRCs.Defs[byteIndex] = crcMask;
1349
+ isDirMask = 0;
1350
+ crcMask = 0;
1351
+ mask = 0x80;
1352
+ }
1353
+
1354
+ p->UnpackPositions[i] = unpackPos;
1355
+ p->CRCs.Vals[i] = 0;
1356
+
1357
+ if (emptyStreams && SzBitArray_Check(emptyStreams, i))
1358
+ {
1359
+ if (emptyFiles)
1360
+ {
1361
+ if (!SzBitArray_Check(emptyFiles, emptyFileIndex))
1362
+ isDirMask |= mask;
1363
+ emptyFileIndex++;
1364
+ }
1365
+ else
1366
+ isDirMask |= mask;
1367
+ if (remSubStreams == 0)
1368
+ {
1369
+ p->FileToFolder[i] = (UInt32)-1;
1370
+ continue;
1371
+ }
1372
+ }
1373
+
1374
+ if (remSubStreams == 0)
1375
+ {
1376
+ for (;;)
1377
+ {
1378
+ if (folderIndex >= p->db.NumFolders)
1379
+ return SZ_ERROR_ARCHIVE;
1380
+ p->FolderToFile[folderIndex] = i;
1381
+ numSubStreams = 1;
1382
+ if (ssi.sdNumSubStreams.Data)
1383
+ {
1384
+ RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams))
1385
+ }
1386
+ remSubStreams = numSubStreams;
1387
+ if (numSubStreams != 0)
1388
+ break;
1389
+ {
1390
+ const UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
1391
+ unpackPos += folderUnpackSize;
1392
+ if (unpackPos < folderUnpackSize)
1393
+ return SZ_ERROR_ARCHIVE;
1394
+ }
1395
+ folderIndex++;
1396
+ }
1397
+ }
1398
+
1399
+ p->FileToFolder[i] = folderIndex;
1400
+
1401
+ if (emptyStreams && SzBitArray_Check(emptyStreams, i))
1402
+ continue;
1403
+
1404
+ if (--remSubStreams == 0)
1405
+ {
1406
+ const UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
1407
+ const UInt64 startFolderUnpackPos = p->UnpackPositions[p->FolderToFile[folderIndex]];
1408
+ if (folderUnpackSize < unpackPos - startFolderUnpackPos)
1409
+ return SZ_ERROR_ARCHIVE;
1410
+ unpackPos = startFolderUnpackPos + folderUnpackSize;
1411
+ if (unpackPos < folderUnpackSize)
1412
+ return SZ_ERROR_ARCHIVE;
1413
+
1414
+ if (numSubStreams == 1 && SzBitWithVals_Check(&p->db.FolderCRCs, folderIndex))
1415
+ {
1416
+ p->CRCs.Vals[i] = p->db.FolderCRCs.Vals[folderIndex];
1417
+ crcMask |= mask;
1418
+ }
1419
+ folderIndex++;
1420
+ }
1421
+ else
1422
+ {
1423
+ UInt64 v;
1424
+ RINOK(ReadNumber(&ssi.sdSizes, &v))
1425
+ unpackPos += v;
1426
+ if (unpackPos < v)
1427
+ return SZ_ERROR_ARCHIVE;
1428
+ }
1429
+ if ((crcMask & mask) == 0 && digestsVals)
1430
+ {
1431
+ if (!digestsDefs || SzBitArray_Check(digestsDefs, digestIndex))
1432
+ {
1433
+ p->CRCs.Vals[i] = GetUi32(digestsVals);
1434
+ digestsVals += 4;
1435
+ crcMask |= mask;
1436
+ }
1437
+ digestIndex++;
1438
+ }
1439
+ }
1440
+
1441
+ if (mask != 0x80)
1442
+ {
1443
+ const UInt32 byteIndex = (i - 1) >> 3;
1444
+ p->IsDirs[byteIndex] = isDirMask;
1445
+ p->CRCs.Defs[byteIndex] = crcMask;
1446
+ }
1447
+
1448
+ p->UnpackPositions[i] = unpackPos;
1449
+
1450
+ if (remSubStreams != 0)
1451
+ return SZ_ERROR_ARCHIVE;
1452
+
1453
+ for (;;)
1454
+ {
1455
+ p->FolderToFile[folderIndex] = i;
1456
+ if (folderIndex >= p->db.NumFolders)
1457
+ break;
1458
+ if (!ssi.sdNumSubStreams.Data)
1459
+ return SZ_ERROR_ARCHIVE;
1460
+ RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams))
1461
+ if (numSubStreams != 0)
1462
+ return SZ_ERROR_ARCHIVE;
1463
+ /*
1464
+ {
1465
+ UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
1466
+ unpackPos += folderUnpackSize;
1467
+ if (unpackPos < folderUnpackSize)
1468
+ return SZ_ERROR_ARCHIVE;
1469
+ }
1470
+ */
1471
+ folderIndex++;
1472
+ }
1473
+
1474
+ if (ssi.sdNumSubStreams.Data && ssi.sdNumSubStreams.Size != 0)
1475
+ return SZ_ERROR_ARCHIVE;
1476
+ }
1477
+ }
1478
+ return SZ_OK;
1479
+ }
1480
+
1481
+
1482
+ static SRes SzReadHeader(
1483
+ CSzArEx *p,
1484
+ CSzData *sd,
1485
+ ILookInStreamPtr inStream,
1486
+ ISzAllocPtr allocMain,
1487
+ ISzAllocPtr allocTemp)
1488
+ {
1489
+ UInt32 i;
1490
+ UInt32 numTempBufs = 0;
1491
+ SRes res;
1492
+ CBuf tempBufs[NUM_ADDITIONAL_STREAMS_MAX];
1493
+
1494
+ for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++)
1495
+ Buf_Init(tempBufs + i);
1496
+
1497
+ res = SzReadHeader2(p, sd, inStream,
1498
+ tempBufs, &numTempBufs,
1499
+ allocMain, allocTemp);
1500
+
1501
+ for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++)
1502
+ Buf_Free(tempBufs + i, allocTemp);
1503
+
1504
+ RINOK(res)
1505
+
1506
+ if (sd->Size != 0)
1507
+ return SZ_ERROR_FAIL;
1508
+
1509
+ return res;
1510
+ }
1511
+
1512
+ static SRes SzArEx_Open2(
1513
+ CSzArEx *p,
1514
+ ILookInStreamPtr inStream,
1515
+ ISzAllocPtr allocMain,
1516
+ ISzAllocPtr allocTemp)
1517
+ {
1518
+ Byte header[k7zStartHeaderSize];
1519
+ Int64 startArcPos;
1520
+ UInt64 nextHeaderOffset, nextHeaderSize;
1521
+ size_t nextHeaderSizeT;
1522
+ UInt32 nextHeaderCRC;
1523
+ CBuf buf;
1524
+ SRes res;
1525
+
1526
+ startArcPos = 0;
1527
+ RINOK(ILookInStream_Seek(inStream, &startArcPos, SZ_SEEK_CUR))
1528
+
1529
+ RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE))
1530
+
1531
+ if (!TestSignatureCandidate(header))
1532
+ return SZ_ERROR_NO_ARCHIVE;
1533
+ if (header[6] != k7zMajorVersion)
1534
+ return SZ_ERROR_UNSUPPORTED;
1535
+
1536
+ nextHeaderOffset = GetUi64(header + 12);
1537
+ nextHeaderSize = GetUi64(header + 20);
1538
+ nextHeaderCRC = GetUi32(header + 28);
1539
+
1540
+ p->startPosAfterHeader = (UInt64)startArcPos + k7zStartHeaderSize;
1541
+
1542
+ if (CrcCalc(header + 12, 20) != GetUi32(header + 8))
1543
+ return SZ_ERROR_CRC;
1544
+
1545
+ p->db.RangeLimit = nextHeaderOffset;
1546
+
1547
+ nextHeaderSizeT = (size_t)nextHeaderSize;
1548
+ if (nextHeaderSizeT != nextHeaderSize)
1549
+ return SZ_ERROR_MEM;
1550
+ if (nextHeaderSizeT == 0)
1551
+ return SZ_OK;
1552
+ if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize ||
1553
+ nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize)
1554
+ return SZ_ERROR_NO_ARCHIVE;
1555
+
1556
+ {
1557
+ Int64 pos = 0;
1558
+ RINOK(ILookInStream_Seek(inStream, &pos, SZ_SEEK_END))
1559
+ if ((UInt64)pos < (UInt64)startArcPos + nextHeaderOffset ||
1560
+ (UInt64)pos < (UInt64)startArcPos + k7zStartHeaderSize + nextHeaderOffset ||
1561
+ (UInt64)pos < (UInt64)startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize)
1562
+ return SZ_ERROR_INPUT_EOF;
1563
+ }
1564
+
1565
+ RINOK(LookInStream_SeekTo(inStream, (UInt64)startArcPos + k7zStartHeaderSize + nextHeaderOffset))
1566
+
1567
+ if (!Buf_Create(&buf, nextHeaderSizeT, allocTemp))
1568
+ return SZ_ERROR_MEM;
1569
+
1570
+ res = LookInStream_Read(inStream, buf.data, nextHeaderSizeT);
1571
+
1572
+ if (res == SZ_OK)
1573
+ {
1574
+ res = SZ_ERROR_ARCHIVE;
1575
+ if (CrcCalc(buf.data, nextHeaderSizeT) == nextHeaderCRC)
1576
+ {
1577
+ CSzData sd;
1578
+ UInt64 type;
1579
+ sd.Data = buf.data;
1580
+ sd.Size = buf.size;
1581
+
1582
+ res = ReadID(&sd, &type);
1583
+
1584
+ if (res == SZ_OK && type == k7zIdEncodedHeader)
1585
+ {
1586
+ CSzAr tempAr;
1587
+ CBuf tempBuf;
1588
+ Buf_Init(&tempBuf);
1589
+
1590
+ SzAr_Init(&tempAr);
1591
+ tempAr.RangeLimit = p->db.RangeLimit;
1592
+
1593
+ res = SzReadAndDecodePackedStreams(inStream, &sd, &tempBuf, 1, p->startPosAfterHeader, &tempAr, allocTemp);
1594
+ SzAr_Free(&tempAr, allocTemp);
1595
+
1596
+ if (res != SZ_OK)
1597
+ {
1598
+ Buf_Free(&tempBuf, allocTemp);
1599
+ }
1600
+ else
1601
+ {
1602
+ Buf_Free(&buf, allocTemp);
1603
+ buf.data = tempBuf.data;
1604
+ buf.size = tempBuf.size;
1605
+ sd.Data = buf.data;
1606
+ sd.Size = buf.size;
1607
+ res = ReadID(&sd, &type);
1608
+ }
1609
+ }
1610
+
1611
+ if (res == SZ_OK)
1612
+ {
1613
+ if (type == k7zIdHeader)
1614
+ {
1615
+ /*
1616
+ CSzData sd2;
1617
+ unsigned ttt;
1618
+ for (ttt = 0; ttt < 40000; ttt++)
1619
+ {
1620
+ SzArEx_Free(p, allocMain);
1621
+ sd2 = sd;
1622
+ res = SzReadHeader(p, &sd2, inStream, allocMain, allocTemp);
1623
+ if (res != SZ_OK)
1624
+ break;
1625
+ }
1626
+ */
1627
+ res = SzReadHeader(p, &sd, inStream, allocMain, allocTemp);
1628
+ }
1629
+ else
1630
+ res = SZ_ERROR_UNSUPPORTED;
1631
+ }
1632
+ }
1633
+ }
1634
+
1635
+ Buf_Free(&buf, allocTemp);
1636
+ return res;
1637
+ }
1638
+
1639
+
1640
+ SRes SzArEx_Open(CSzArEx *p, ILookInStreamPtr inStream,
1641
+ ISzAllocPtr allocMain, ISzAllocPtr allocTemp)
1642
+ {
1643
+ const SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp);
1644
+ if (res != SZ_OK)
1645
+ SzArEx_Free(p, allocMain);
1646
+ return res;
1647
+ }
1648
+
1649
+
1650
+ SRes SzArEx_Extract(
1651
+ const CSzArEx *p,
1652
+ ILookInStreamPtr inStream,
1653
+ UInt32 fileIndex,
1654
+ UInt32 *blockIndex,
1655
+ Byte **tempBuf,
1656
+ size_t *outBufferSize,
1657
+ size_t *offset,
1658
+ size_t *outSizeProcessed,
1659
+ ISzAllocPtr allocMain,
1660
+ ISzAllocPtr allocTemp)
1661
+ {
1662
+ const UInt32 folderIndex = p->FileToFolder[fileIndex];
1663
+ SRes res = SZ_OK;
1664
+
1665
+ *offset = 0;
1666
+ *outSizeProcessed = 0;
1667
+
1668
+ if (folderIndex == (UInt32)-1)
1669
+ {
1670
+ ISzAlloc_Free(allocMain, *tempBuf);
1671
+ *blockIndex = folderIndex;
1672
+ *tempBuf = NULL;
1673
+ *outBufferSize = 0;
1674
+ return SZ_OK;
1675
+ }
1676
+
1677
+ if (*tempBuf == NULL || *blockIndex != folderIndex)
1678
+ {
1679
+ const UInt64 unpackSizeSpec = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
1680
+ /*
1681
+ UInt64 unpackSizeSpec =
1682
+ p->UnpackPositions[p->FolderToFile[(size_t)folderIndex + 1]] -
1683
+ p->UnpackPositions[p->FolderToFile[folderIndex]];
1684
+ */
1685
+ const size_t unpackSize = (size_t)unpackSizeSpec;
1686
+
1687
+ if (unpackSize != unpackSizeSpec)
1688
+ return SZ_ERROR_MEM;
1689
+ *blockIndex = folderIndex;
1690
+ ISzAlloc_Free(allocMain, *tempBuf);
1691
+ *tempBuf = NULL;
1692
+
1693
+ if (res == SZ_OK)
1694
+ {
1695
+ *outBufferSize = unpackSize;
1696
+ if (unpackSize != 0)
1697
+ {
1698
+ *tempBuf = (Byte *)ISzAlloc_Alloc(allocMain, unpackSize);
1699
+ if (*tempBuf == NULL)
1700
+ res = SZ_ERROR_MEM;
1701
+ }
1702
+
1703
+ if (res == SZ_OK)
1704
+ {
1705
+ res = SzAr_DecodeFolder(&p->db, folderIndex,
1706
+ inStream, p->dataPos, *tempBuf, unpackSize, allocTemp);
1707
+ }
1708
+ }
1709
+ }
1710
+
1711
+ if (res == SZ_OK)
1712
+ {
1713
+ const UInt64 unpackPos = p->UnpackPositions[fileIndex];
1714
+ *offset = (size_t)(unpackPos - p->UnpackPositions[p->FolderToFile[folderIndex]]);
1715
+ *outSizeProcessed = (size_t)(p->UnpackPositions[(size_t)fileIndex + 1] - unpackPos);
1716
+ if (*offset + *outSizeProcessed > *outBufferSize)
1717
+ return SZ_ERROR_FAIL;
1718
+ if (SzBitWithVals_Check(&p->CRCs, fileIndex))
1719
+ if (CrcCalc(*tempBuf + *offset, *outSizeProcessed) != p->CRCs.Vals[fileIndex])
1720
+ res = SZ_ERROR_CRC;
1721
+ }
1722
+
1723
+ return res;
1724
+ }
1725
+
1726
+
1727
+ size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
1728
+ {
1729
+ const size_t offs = p->FileNameOffsets[fileIndex];
1730
+ const size_t len = p->FileNameOffsets[fileIndex + 1] - offs;
1731
+ if (dest != 0)
1732
+ {
1733
+ size_t i;
1734
+ const Byte *src = p->FileNames + offs * 2;
1735
+ for (i = 0; i < len; i++)
1736
+ dest[i] = GetUi16(src + i * 2);
1737
+ }
1738
+ return len;
1739
+ }
1740
+
1741
+ /*
1742
+ size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex)
1743
+ {
1744
+ size_t len;
1745
+ if (!p->FileNameOffsets)
1746
+ return 1;
1747
+ len = 0;
1748
+ for (;;)
1749
+ {
1750
+ UInt32 parent = (UInt32)(Int32)-1;
1751
+ len += p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex];
1752
+ if SzBitWithVals_Check(&p->Parents, fileIndex)
1753
+ parent = p->Parents.Vals[fileIndex];
1754
+ if (parent == (UInt32)(Int32)-1)
1755
+ return len;
1756
+ fileIndex = parent;
1757
+ }
1758
+ }
1759
+
1760
+ UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
1761
+ {
1762
+ BoolInt needSlash;
1763
+ if (!p->FileNameOffsets)
1764
+ {
1765
+ *(--dest) = 0;
1766
+ return dest;
1767
+ }
1768
+ needSlash = False;
1769
+ for (;;)
1770
+ {
1771
+ UInt32 parent = (UInt32)(Int32)-1;
1772
+ size_t curLen = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex];
1773
+ SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen);
1774
+ if (needSlash)
1775
+ *(dest - 1) = '/';
1776
+ needSlash = True;
1777
+ dest -= curLen;
1778
+
1779
+ if SzBitWithVals_Check(&p->Parents, fileIndex)
1780
+ parent = p->Parents.Vals[fileIndex];
1781
+ if (parent == (UInt32)(Int32)-1)
1782
+ return dest;
1783
+ fileIndex = parent;
1784
+ }
1785
+ }
1786
+ */