react-native-update 10.34.2 → 10.34.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (746) hide show
  1. package/.gitmodules +4 -4
  2. package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +153 -0
  3. package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +48 -0
  4. package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +157 -0
  5. package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +307 -0
  6. package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +83 -0
  7. package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +47 -0
  8. package/harmony/pushy/src/main/cpp/HDiffPatch/_dir_ignore.h +191 -0
  9. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +37 -0
  10. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +7 -0
  11. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +1 -0
  12. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +1 -0
  13. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +18 -0
  14. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +20 -0
  15. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +28 -0
  16. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +8 -0
  17. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +8 -0
  18. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffZ.cbp +219 -0
  19. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HPatchZ.cbp +156 -0
  20. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/unitTest.cbp +65 -0
  21. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +105 -0
  22. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +237 -0
  23. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj.user +3 -0
  24. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +318 -0
  25. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj.user +3 -0
  26. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +182 -0
  27. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj.user +3 -0
  28. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +30 -0
  29. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  30. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +408 -0
  31. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +573 -0
  32. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +396 -0
  33. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +268 -0
  34. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +361 -0
  35. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +301 -0
  36. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +411 -0
  37. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +504 -0
  38. package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +344 -0
  39. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +166 -0
  40. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +59 -0
  41. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +1152 -0
  42. package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +995 -0
  43. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +797 -0
  44. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +65 -0
  45. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +200 -0
  46. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +178 -0
  47. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +357 -0
  48. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +87 -0
  49. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +151 -0
  50. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +770 -0
  51. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +236 -0
  52. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +47 -0
  53. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +112 -0
  54. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +53 -0
  55. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +61 -0
  56. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +331 -0
  57. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +144 -0
  58. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +176 -0
  59. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +84 -0
  60. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +146 -0
  61. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +61 -0
  62. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +152 -0
  63. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +76 -0
  64. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +524 -0
  65. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +259 -0
  66. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +1570 -0
  67. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +290 -0
  68. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +1221 -0
  69. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +1025 -0
  70. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +116 -0
  71. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +72 -0
  72. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +213 -0
  73. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +63 -0
  74. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +170 -0
  75. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +86 -0
  76. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +89 -0
  77. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c +13 -0
  78. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +398 -0
  79. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +194 -0
  80. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.c +13 -0
  81. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +204 -0
  82. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +207 -0
  83. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +815 -0
  84. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +586 -0
  85. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/utils.c.inc.h +381 -0
  86. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +352 -0
  87. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +137 -0
  88. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +137 -0
  89. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +70 -0
  90. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +628 -0
  91. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +87 -0
  92. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +363 -0
  93. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +139 -0
  94. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +68 -0
  95. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +115 -0
  96. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +342 -0
  97. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +94 -0
  98. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +52 -0
  99. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +2292 -0
  100. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +215 -0
  101. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +165 -0
  102. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +251 -0
  103. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +174 -0
  104. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +73 -0
  105. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.cpp +367 -0
  106. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +92 -0
  107. package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +301 -0
  108. package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +292 -0
  109. package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +436 -0
  110. package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +417 -0
  111. package/harmony/pushy/src/main/cpp/lzma/Asm/arm/7zCrcOpt.asm +100 -0
  112. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +147 -0
  113. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +147 -0
  114. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +237 -0
  115. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +1258 -0
  116. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +205 -0
  117. package/harmony/pushy/src/main/cpp/lzma/C/7z.h +202 -0
  118. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +80 -0
  119. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +19 -0
  120. package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +1771 -0
  121. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.c +36 -0
  122. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +35 -0
  123. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf2.c +52 -0
  124. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +128 -0
  125. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +25 -0
  126. package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +115 -0
  127. package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +591 -0
  128. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +286 -0
  129. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +83 -0
  130. package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +176 -0
  131. package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +375 -0
  132. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +27 -0
  133. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.rc +55 -0
  134. package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +306 -0
  135. package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +38 -0
  136. package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +184 -0
  137. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +455 -0
  138. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +51 -0
  139. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +257 -0
  140. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +146 -0
  141. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +311 -0
  142. package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +230 -0
  143. package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +64 -0
  144. package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +82 -0
  145. package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +53 -0
  146. package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +33 -0
  147. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +218 -0
  148. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +336 -0
  149. package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +64 -0
  150. package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +19 -0
  151. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +108 -0
  152. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +20 -0
  153. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +1127 -0
  154. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +121 -0
  155. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +853 -0
  156. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +101 -0
  157. package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +57 -0
  158. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +488 -0
  159. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +120 -0
  160. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +1082 -0
  161. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +79 -0
  162. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +803 -0
  163. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +55 -0
  164. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +111 -0
  165. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +54 -0
  166. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +106 -0
  167. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +1185 -0
  168. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +234 -0
  169. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +2976 -0
  170. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +76 -0
  171. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +40 -0
  172. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +131 -0
  173. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +601 -0
  174. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +141 -0
  175. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +1138 -0
  176. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +201 -0
  177. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +85 -0
  178. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +712 -0
  179. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +142 -0
  180. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +191 -0
  181. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +187 -0
  182. package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +10 -0
  183. package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +30 -0
  184. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +248 -0
  185. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +26 -0
  186. package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +141 -0
  187. package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +18 -0
  188. package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +95 -0
  189. package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +70 -0
  190. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.c +396 -0
  191. package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.h +31 -0
  192. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +241 -0
  193. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsw +29 -0
  194. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +686 -0
  195. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.c +4 -0
  196. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +10 -0
  197. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +40 -0
  198. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +75 -0
  199. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +258 -0
  200. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +168 -0
  201. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsw +29 -0
  202. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +28 -0
  203. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +44 -0
  204. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.def +4 -0
  205. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +178 -0
  206. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsw +29 -0
  207. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +14 -0
  208. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +34 -0
  209. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/resource.rc +3 -0
  210. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.c +4 -0
  211. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +10 -0
  212. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +640 -0
  213. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsp +231 -0
  214. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsw +29 -0
  215. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +37 -0
  216. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +38 -0
  217. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/resource.rc +5 -0
  218. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/setup.ico +0 -0
  219. package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +90 -0
  220. package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +460 -0
  221. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +86 -0
  222. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +26 -0
  223. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +69 -0
  224. package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +2766 -0
  225. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +1329 -0
  226. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +60 -0
  227. package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +319 -0
  228. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +240 -0
  229. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +7 -0
  230. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
  231. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +76 -0
  232. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +569 -0
  233. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +70 -0
  234. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +678 -0
  235. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +92 -0
  236. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +423 -0
  237. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +139 -0
  238. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +61 -0
  239. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +763 -0
  240. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +181 -0
  241. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +942 -0
  242. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
  243. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +148 -0
  244. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +1666 -0
  245. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +445 -0
  246. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +202 -0
  247. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +901 -0
  248. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +335 -0
  249. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +174 -0
  250. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +22 -0
  251. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +21 -0
  252. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +22 -0
  253. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +35 -0
  254. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +2500 -0
  255. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +139 -0
  256. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
  257. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +8 -0
  258. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +12 -0
  259. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +19 -0
  260. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +151 -0
  261. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +1125 -0
  262. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
  263. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
  264. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +25 -0
  265. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +232 -0
  266. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +110 -0
  267. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +46 -0
  268. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +67 -0
  269. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +88 -0
  270. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +28 -0
  271. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +191 -0
  272. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +89 -0
  273. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
  274. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +37 -0
  275. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
  276. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
  277. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +8 -0
  278. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +122 -0
  279. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +608 -0
  280. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
  281. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +629 -0
  282. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +359 -0
  283. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +8 -0
  284. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +1308 -0
  285. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +11 -0
  286. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +9 -0
  287. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +1910 -0
  288. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
  289. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
  290. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +8 -0
  291. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +154 -0
  292. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
  293. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
  294. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +8 -0
  295. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +96 -0
  296. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
  297. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
  298. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +8 -0
  299. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +116 -0
  300. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
  301. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +799 -0
  302. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +477 -0
  303. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
  304. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
  305. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +8 -0
  306. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +59 -0
  307. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +195 -0
  308. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
  309. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +715 -0
  310. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  311. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +912 -0
  312. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
  313. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +482 -0
  314. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
  315. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +8 -0
  316. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +134 -0
  317. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +5 -0
  318. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
  319. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +86 -0
  320. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +137 -0
  321. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
  322. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +803 -0
  323. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
  324. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +364 -0
  325. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
  326. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +13 -0
  327. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +117 -0
  328. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
  329. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
  330. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  331. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  332. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +988 -0
  333. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
  334. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +241 -0
  335. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
  336. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +14 -0
  337. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +153 -0
  338. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
  339. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +50 -0
  340. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +250 -0
  341. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +120 -0
  342. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +536 -0
  343. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +192 -0
  344. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
  345. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +10 -0
  346. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +475 -0
  347. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +166 -0
  348. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +435 -0
  349. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +205 -0
  350. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +163 -0
  351. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +92 -0
  352. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +127 -0
  353. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +48 -0
  354. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +367 -0
  355. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +252 -0
  356. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.cpp +3 -0
  357. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +6 -0
  358. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.cpp +3 -0
  359. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +10 -0
  360. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +509 -0
  361. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +264 -0
  362. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +39 -0
  363. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +26 -0
  364. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +111 -0
  365. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +66 -0
  366. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +51 -0
  367. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +35 -0
  368. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +108 -0
  369. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +78 -0
  370. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +106 -0
  371. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +8 -0
  372. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +156 -0
  373. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +60 -0
  374. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +285 -0
  375. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +157 -0
  376. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +56 -0
  377. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +13 -0
  378. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +57 -0
  379. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +26 -0
  380. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +48 -0
  381. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +24 -0
  382. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +666 -0
  383. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +120 -0
  384. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
  385. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +24 -0
  386. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +31 -0
  387. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +17 -0
  388. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +23 -0
  389. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +35 -0
  390. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +41 -0
  391. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +92 -0
  392. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +344 -0
  393. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +120 -0
  394. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +49 -0
  395. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyRegister.cpp +15 -0
  396. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +128 -0
  397. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +265 -0
  398. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +96 -0
  399. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +122 -0
  400. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +42 -0
  401. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
  402. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +343 -0
  403. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +113 -0
  404. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +182 -0
  405. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +46 -0
  406. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
  407. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +170 -0
  408. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +86 -0
  409. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +152 -0
  410. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +58 -0
  411. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
  412. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +8 -0
  413. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +150 -0
  414. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +92 -0
  415. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +245 -0
  416. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +46 -0
  417. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +8 -0
  418. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +8 -0
  419. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +280 -0
  420. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +118 -0
  421. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
  422. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +112 -0
  423. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +57 -0
  424. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +16 -0
  425. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +233 -0
  426. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +40 -0
  427. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +8 -0
  428. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +84 -0
  429. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +220 -0
  430. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +399 -0
  431. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +28 -0
  432. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +23 -0
  433. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +19 -0
  434. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +127 -0
  435. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +5 -0
  436. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersion.h +2 -0
  437. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +2 -0
  438. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +127 -0
  439. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/SubBuild.mak +3 -0
  440. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +993 -0
  441. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +235 -0
  442. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
  443. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
  444. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +8 -0
  445. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +28 -0
  446. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/resource.rc +3 -0
  447. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1295 -0
  448. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +136 -0
  449. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +1715 -0
  450. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +403 -0
  451. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +155 -0
  452. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +10 -0
  453. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +161 -0
  454. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +112 -0
  455. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +3618 -0
  456. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +77 -0
  457. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
  458. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +11 -0
  459. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +190 -0
  460. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +1096 -0
  461. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +42 -0
  462. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +27 -0
  463. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +482 -0
  464. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +94 -0
  465. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +34 -0
  466. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +280 -0
  467. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
  468. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +347 -0
  469. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +110 -0
  470. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +114 -0
  471. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +1074 -0
  472. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +424 -0
  473. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +3553 -0
  474. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +436 -0
  475. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +668 -0
  476. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
  477. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +14 -0
  478. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +80 -0
  479. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +10 -0
  480. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
  481. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +10 -0
  482. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +8 -0
  483. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +19 -0
  484. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +16 -0
  485. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +1704 -0
  486. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +200 -0
  487. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
  488. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +66 -0
  489. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +771 -0
  490. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +162 -0
  491. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +233 -0
  492. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +27 -0
  493. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +70 -0
  494. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +55 -0
  495. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +94 -0
  496. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +26 -0
  497. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +130 -0
  498. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
  499. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +14 -0
  500. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +43 -0
  501. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +13 -0
  502. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +69 -0
  503. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +33 -0
  504. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +825 -0
  505. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +164 -0
  506. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +367 -0
  507. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +48 -0
  508. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +1359 -0
  509. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +27 -0
  510. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +1154 -0
  511. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +175 -0
  512. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
  513. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +66 -0
  514. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +183 -0
  515. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +62 -0
  516. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
  517. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +8 -0
  518. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +702 -0
  519. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +124 -0
  520. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +110 -0
  521. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
  522. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +64 -0
  523. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/resource.rc +7 -0
  524. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +37 -0
  525. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
  526. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1025 -0
  527. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +21 -0
  528. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
  529. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
  530. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
  531. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
  532. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
  533. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1037 -0
  534. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +328 -0
  535. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
  536. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
  537. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +40 -0
  538. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +76 -0
  539. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +122 -0
  540. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +69 -0
  541. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +91 -0
  542. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +17 -0
  543. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
  544. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
  545. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +14 -0
  546. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
  547. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +196 -0
  548. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +170 -0
  549. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
  550. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1337 -0
  551. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +351 -0
  552. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
  553. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +48 -0
  554. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +80 -0
  555. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
  556. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
  557. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
  558. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +95 -0
  559. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +255 -0
  560. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +62 -0
  561. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +177 -0
  562. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +15 -0
  563. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +59 -0
  564. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +418 -0
  565. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
  566. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
  567. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
  568. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +280 -0
  569. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +38 -0
  570. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
  571. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +27 -0
  572. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/resource2.h +2 -0
  573. package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +156 -0
  574. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +35 -0
  575. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +7 -0
  576. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +92 -0
  577. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +53 -0
  578. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +21 -0
  579. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +197 -0
  580. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +63 -0
  581. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +43 -0
  582. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +98 -0
  583. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +15 -0
  584. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +64 -0
  585. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +193 -0
  586. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +28 -0
  587. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +23 -0
  588. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +132 -0
  589. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +18 -0
  590. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +259 -0
  591. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +100 -0
  592. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +277 -0
  593. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +14 -0
  594. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +54 -0
  595. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +45 -0
  596. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +42 -0
  597. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +1659 -0
  598. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +868 -0
  599. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +35 -0
  600. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +17 -0
  601. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.cpp +3 -0
  602. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +634 -0
  603. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +145 -0
  604. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +231 -0
  605. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +163 -0
  606. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +88 -0
  607. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +40 -0
  608. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +8 -0
  609. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +89 -0
  610. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +38 -0
  611. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +163 -0
  612. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +71 -0
  613. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +319 -0
  614. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +88 -0
  615. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +144 -0
  616. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +21 -0
  617. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +124 -0
  618. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +19 -0
  619. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +288 -0
  620. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +12 -0
  621. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +676 -0
  622. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +149 -0
  623. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Init.cpp +7 -0
  624. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +42 -0
  625. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +70 -0
  626. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +185 -0
  627. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +23 -0
  628. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +66 -0
  629. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +65 -0
  630. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +52 -0
  631. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +251 -0
  632. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +170 -0
  633. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +19 -0
  634. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.cpp +10 -0
  635. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +87 -0
  636. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +155 -0
  637. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +146 -0
  638. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +35 -0
  639. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +143 -0
  640. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +50 -0
  641. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +34 -0
  642. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +28 -0
  643. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +42 -0
  644. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +8 -0
  645. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +43 -0
  646. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +27 -0
  647. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +200 -0
  648. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +51 -0
  649. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +109 -0
  650. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +58 -0
  651. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +17 -0
  652. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +66 -0
  653. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +15 -0
  654. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +714 -0
  655. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +117 -0
  656. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +749 -0
  657. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +161 -0
  658. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +432 -0
  659. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +212 -0
  660. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +440 -0
  661. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.cpp +12 -0
  662. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +66 -0
  663. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +839 -0
  664. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +115 -0
  665. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +131 -0
  666. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +27 -0
  667. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +37 -0
  668. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +112 -0
  669. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +40 -0
  670. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +46 -0
  671. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +347 -0
  672. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +114 -0
  673. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +138 -0
  674. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +37 -0
  675. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +390 -0
  676. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +84 -0
  677. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +103 -0
  678. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +16 -0
  679. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +181 -0
  680. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +167 -0
  681. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +358 -0
  682. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +94 -0
  683. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +8 -0
  684. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +10 -0
  685. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +164 -0
  686. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +142 -0
  687. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +40 -0
  688. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +38 -0
  689. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +213 -0
  690. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +32 -0
  691. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +179 -0
  692. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +284 -0
  693. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CRC.cs +55 -0
  694. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CommandLineParser.cs +274 -0
  695. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/InBuffer.cs +72 -0
  696. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/OutBuffer.cs +47 -0
  697. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +24 -0
  698. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +367 -0
  699. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +132 -0
  700. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +110 -0
  701. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +76 -0
  702. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +398 -0
  703. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +1480 -0
  704. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +364 -0
  705. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj +90 -0
  706. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +20 -0
  707. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +340 -0
  708. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +29 -0
  709. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +70 -0
  710. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +42 -0
  711. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +234 -0
  712. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +117 -0
  713. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +157 -0
  714. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/ICoder.cs +157 -0
  715. package/harmony/pushy/src/main/cpp/lzma/DOC/7zC.txt +187 -0
  716. package/harmony/pushy/src/main/cpp/lzma/DOC/7zFormat.txt +469 -0
  717. package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +173 -0
  718. package/harmony/pushy/src/main/cpp/lzma/DOC/installer.txt +166 -0
  719. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +446 -0
  720. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +357 -0
  721. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-specification.txt +1176 -0
  722. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +328 -0
  723. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/CRC.java +52 -0
  724. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/BinTree.java +382 -0
  725. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/InWindow.java +131 -0
  726. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +85 -0
  727. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Base.java +88 -0
  728. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +329 -0
  729. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +1416 -0
  730. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +55 -0
  731. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +99 -0
  732. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +88 -0
  733. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +151 -0
  734. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/ICodeProgress.java +6 -0
  735. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaAlone.java +253 -0
  736. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaBench.java +392 -0
  737. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2.sfx +0 -0
  738. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2con.sfx +0 -0
  739. package/harmony/pushy/src/main/cpp/lzma/bin/7zSD.sfx +0 -0
  740. package/harmony/pushy/src/main/cpp/lzma/bin/7zdec.exe +0 -0
  741. package/harmony/pushy/src/main/cpp/lzma/bin/7zr.exe +0 -0
  742. package/harmony/pushy/src/main/cpp/lzma/bin/installer/config.txt +5 -0
  743. package/harmony/pushy/src/main/cpp/lzma/bin/installer/cr.bat +5 -0
  744. package/harmony/pushy/src/main/cpp/lzma/bin/lzma.exe +0 -0
  745. package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
  746. package/package.json +1 -1
@@ -0,0 +1,1666 @@
1
+ // 7zIn.cpp
2
+
3
+ #include "StdAfx.h"
4
+
5
+ #ifdef _WIN32
6
+ #include <wchar.h>
7
+ #else
8
+ #include <ctype.h>
9
+ #endif
10
+
11
+ #include "../../../../C/7zCrc.h"
12
+ #include "../../../../C/CpuArch.h"
13
+
14
+ #include "../../Common/StreamObjects.h"
15
+ #include "../../Common/StreamUtils.h"
16
+
17
+ #include "7zDecode.h"
18
+ #include "7zIn.h"
19
+
20
+ #define Get16(p) GetUi16(p)
21
+ #define Get32(p) GetUi32(p)
22
+ #define Get64(p) GetUi64(p)
23
+
24
+ // define FORMAT_7Z_RECOVERY if you want to recover multivolume archives with empty StartHeader
25
+ #ifndef _SFX
26
+ #define FORMAT_7Z_RECOVERY
27
+ #endif
28
+
29
+ using namespace NWindows;
30
+ using namespace NCOM;
31
+
32
+ namespace NArchive {
33
+ namespace N7z {
34
+
35
+ unsigned BoolVector_CountSum(const CBoolVector &v)
36
+ {
37
+ unsigned sum = 0;
38
+ const unsigned size = v.Size();
39
+ for (unsigned i = 0; i < size; i++)
40
+ if (v[i])
41
+ sum++;
42
+ return sum;
43
+ }
44
+
45
+ static inline bool BoolVector_Item_IsValidAndTrue(const CBoolVector &v, unsigned i)
46
+ {
47
+ return (i < v.Size() ? v[i] : false);
48
+ }
49
+
50
+ static void BoolVector_Fill_False(CBoolVector &v, unsigned size)
51
+ {
52
+ v.ClearAndSetSize(size);
53
+ bool *p = &v[0];
54
+ for (unsigned i = 0; i < size; i++)
55
+ p[i] = false;
56
+ }
57
+
58
+
59
+ class CInArchiveException {};
60
+ class CUnsupportedFeatureException: public CInArchiveException {};
61
+
62
+ static void ThrowException() { throw CInArchiveException(); }
63
+ static inline void ThrowEndOfData() { ThrowException(); }
64
+ static inline void ThrowUnsupported() { throw CUnsupportedFeatureException(); }
65
+ static inline void ThrowIncorrect() { ThrowException(); }
66
+
67
+ class CStreamSwitch
68
+ {
69
+ CInArchive *_archive;
70
+ bool _needRemove;
71
+ bool _needUpdatePos;
72
+ public:
73
+ CStreamSwitch(): _needRemove(false), _needUpdatePos(false) {}
74
+ ~CStreamSwitch() { Remove(); }
75
+ void Remove();
76
+ void Set(CInArchive *archive, const Byte *data, size_t size, bool needUpdatePos);
77
+ void Set(CInArchive *archive, const CByteBuffer &byteBuffer);
78
+ void Set(CInArchive *archive, const CObjectVector<CByteBuffer> *dataVector);
79
+ };
80
+
81
+ void CStreamSwitch::Remove()
82
+ {
83
+ if (_needRemove)
84
+ {
85
+ if (_archive->_inByteBack->GetRem() != 0)
86
+ _archive->ThereIsHeaderError = true;
87
+ _archive->DeleteByteStream(_needUpdatePos);
88
+ _needRemove = false;
89
+ }
90
+ }
91
+
92
+ void CStreamSwitch::Set(CInArchive *archive, const Byte *data, size_t size, bool needUpdatePos)
93
+ {
94
+ Remove();
95
+ _archive = archive;
96
+ _archive->AddByteStream(data, size);
97
+ _needRemove = true;
98
+ _needUpdatePos = needUpdatePos;
99
+ }
100
+
101
+ void CStreamSwitch::Set(CInArchive *archive, const CByteBuffer &byteBuffer)
102
+ {
103
+ Set(archive, byteBuffer, byteBuffer.Size(), false);
104
+ }
105
+
106
+ void CStreamSwitch::Set(CInArchive *archive, const CObjectVector<CByteBuffer> *dataVector)
107
+ {
108
+ Remove();
109
+ Byte external = archive->ReadByte();
110
+ if (external != 0)
111
+ {
112
+ if (!dataVector)
113
+ ThrowIncorrect();
114
+ CNum dataIndex = archive->ReadNum();
115
+ if (dataIndex >= dataVector->Size())
116
+ ThrowIncorrect();
117
+ Set(archive, (*dataVector)[dataIndex]);
118
+ }
119
+ }
120
+
121
+ void CInArchive::AddByteStream(const Byte *buf, size_t size)
122
+ {
123
+ if (_numInByteBufs == kNumBufLevelsMax)
124
+ ThrowIncorrect();
125
+ _inByteBack = &_inByteVector[_numInByteBufs++];
126
+ _inByteBack->Init(buf, size);
127
+ }
128
+
129
+
130
+ Byte CInByte2::ReadByte()
131
+ {
132
+ if (_pos >= _size)
133
+ ThrowEndOfData();
134
+ return _buffer[_pos++];
135
+ }
136
+
137
+ void CInByte2::ReadBytes(Byte *data, size_t size)
138
+ {
139
+ if (size == 0)
140
+ return;
141
+ if (size > _size - _pos)
142
+ ThrowEndOfData();
143
+ memcpy(data, _buffer + _pos, size);
144
+ _pos += size;
145
+ }
146
+
147
+ void CInByte2::SkipData(UInt64 size)
148
+ {
149
+ if (size > _size - _pos)
150
+ ThrowEndOfData();
151
+ _pos += (size_t)size;
152
+ }
153
+
154
+ void CInByte2::SkipData()
155
+ {
156
+ SkipData(ReadNumber());
157
+ }
158
+
159
+ static UInt64 ReadNumberSpec(const Byte *p, size_t size, size_t &processed)
160
+ {
161
+ if (size == 0)
162
+ {
163
+ processed = 0;
164
+ return 0;
165
+ }
166
+
167
+ unsigned b = *p++;
168
+ size--;
169
+
170
+ if ((b & 0x80) == 0)
171
+ {
172
+ processed = 1;
173
+ return b;
174
+ }
175
+
176
+ if (size == 0)
177
+ {
178
+ processed = 0;
179
+ return 0;
180
+ }
181
+
182
+ UInt64 value = (UInt64)*p;
183
+ p++;
184
+ size--;
185
+
186
+ for (unsigned i = 1; i < 8; i++)
187
+ {
188
+ unsigned mask = (unsigned)0x80 >> i;
189
+ if ((b & mask) == 0)
190
+ {
191
+ UInt64 high = b & (mask - 1);
192
+ value |= (high << (i * 8));
193
+ processed = i + 1;
194
+ return value;
195
+ }
196
+
197
+ if (size == 0)
198
+ {
199
+ processed = 0;
200
+ return 0;
201
+ }
202
+
203
+ value |= ((UInt64)*p << (i * 8));
204
+ p++;
205
+ size--;
206
+ }
207
+
208
+ processed = 9;
209
+ return value;
210
+ }
211
+
212
+ UInt64 CInByte2::ReadNumber()
213
+ {
214
+ size_t processed;
215
+ UInt64 res = ReadNumberSpec(_buffer + _pos, _size - _pos, processed);
216
+ if (processed == 0)
217
+ ThrowEndOfData();
218
+ _pos += processed;
219
+ return res;
220
+ }
221
+
222
+ CNum CInByte2::ReadNum()
223
+ {
224
+ /*
225
+ if (_pos < _size)
226
+ {
227
+ Byte val = _buffer[_pos];
228
+ if ((unsigned)val < 0x80)
229
+ {
230
+ _pos++;
231
+ return (unsigned)val;
232
+ }
233
+ }
234
+ */
235
+ UInt64 value = ReadNumber();
236
+ if (value > kNumMax)
237
+ ThrowUnsupported();
238
+ return (CNum)value;
239
+ }
240
+
241
+ UInt32 CInByte2::ReadUInt32()
242
+ {
243
+ if (_pos + 4 > _size)
244
+ ThrowEndOfData();
245
+ UInt32 res = Get32(_buffer + _pos);
246
+ _pos += 4;
247
+ return res;
248
+ }
249
+
250
+ UInt64 CInByte2::ReadUInt64()
251
+ {
252
+ if (_pos + 8 > _size)
253
+ ThrowEndOfData();
254
+ UInt64 res = Get64(_buffer + _pos);
255
+ _pos += 8;
256
+ return res;
257
+ }
258
+
259
+ #define CHECK_SIGNATURE if (p[0] != '7' || p[1] != 'z' || p[2] != 0xBC || p[3] != 0xAF || p[4] != 0x27 || p[5] != 0x1C) return false;
260
+
261
+ static inline bool TestSignature(const Byte *p)
262
+ {
263
+ CHECK_SIGNATURE
264
+ return CrcCalc(p + 12, 20) == Get32(p + 8);
265
+ }
266
+
267
+ #ifdef FORMAT_7Z_RECOVERY
268
+ static inline bool TestSignature2(const Byte *p)
269
+ {
270
+ CHECK_SIGNATURE;
271
+ if (CrcCalc(p + 12, 20) == Get32(p + 8))
272
+ return true;
273
+ for (unsigned i = 8; i < kHeaderSize; i++)
274
+ if (p[i] != 0)
275
+ return false;
276
+ return (p[6] != 0 || p[7] != 0);
277
+ }
278
+ #else
279
+ #define TestSignature2(p) TestSignature(p)
280
+ #endif
281
+
282
+ HRESULT CInArchive::FindAndReadSignature(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
283
+ {
284
+ RINOK(ReadStream_FALSE(stream, _header, kHeaderSize));
285
+
286
+ if (TestSignature2(_header))
287
+ return S_OK;
288
+ if (searchHeaderSizeLimit && *searchHeaderSizeLimit == 0)
289
+ return S_FALSE;
290
+
291
+ const UInt32 kBufSize = 1 << 15;
292
+ CByteArr buf(kBufSize);
293
+ memcpy(buf, _header, kHeaderSize);
294
+ UInt64 offset = 0;
295
+
296
+ for (;;)
297
+ {
298
+ UInt32 readSize = kBufSize - kHeaderSize;
299
+ if (searchHeaderSizeLimit)
300
+ {
301
+ UInt64 rem = *searchHeaderSizeLimit - offset;
302
+ if (readSize > rem)
303
+ readSize = (UInt32)rem;
304
+ if (readSize == 0)
305
+ return S_FALSE;
306
+ }
307
+
308
+ UInt32 processed = 0;
309
+ RINOK(stream->Read(buf + kHeaderSize, readSize, &processed));
310
+ if (processed == 0)
311
+ return S_FALSE;
312
+
313
+ for (UInt32 pos = 0;;)
314
+ {
315
+ const Byte *p = buf + pos + 1;
316
+ const Byte *lim = buf + processed;
317
+ for (; p <= lim; p += 4)
318
+ {
319
+ if (p[0] == '7') break;
320
+ if (p[1] == '7') { p += 1; break; }
321
+ if (p[2] == '7') { p += 2; break; }
322
+ if (p[3] == '7') { p += 3; break; }
323
+ };
324
+ if (p > lim)
325
+ break;
326
+ pos = (UInt32)(p - buf);
327
+ if (TestSignature(p))
328
+ {
329
+ memcpy(_header, p, kHeaderSize);
330
+ _arhiveBeginStreamPosition += offset + pos;
331
+ return stream->Seek(_arhiveBeginStreamPosition + kHeaderSize, STREAM_SEEK_SET, NULL);
332
+ }
333
+ }
334
+
335
+ offset += processed;
336
+ memmove(buf, buf + processed, kHeaderSize);
337
+ }
338
+ }
339
+
340
+ // S_FALSE means that file is not archive
341
+ HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
342
+ {
343
+ HeadersSize = 0;
344
+ Close();
345
+ RINOK(stream->Seek(0, STREAM_SEEK_CUR, &_arhiveBeginStreamPosition))
346
+ RINOK(stream->Seek(0, STREAM_SEEK_END, &_fileEndPosition))
347
+ RINOK(stream->Seek(_arhiveBeginStreamPosition, STREAM_SEEK_SET, NULL))
348
+ RINOK(FindAndReadSignature(stream, searchHeaderSizeLimit));
349
+ _stream = stream;
350
+ return S_OK;
351
+ }
352
+
353
+ void CInArchive::Close()
354
+ {
355
+ _numInByteBufs = 0;
356
+ _stream.Release();
357
+ ThereIsHeaderError = false;
358
+ }
359
+
360
+ void CInArchive::ReadArchiveProperties(CInArchiveInfo & /* archiveInfo */)
361
+ {
362
+ for (;;)
363
+ {
364
+ if (ReadID() == NID::kEnd)
365
+ break;
366
+ SkipData();
367
+ }
368
+ }
369
+
370
+ // CFolder &folder can be non empty. So we must set all fields
371
+
372
+ void CInByte2::ParseFolder(CFolder &folder)
373
+ {
374
+ UInt32 numCoders = ReadNum();
375
+
376
+ if (numCoders == 0)
377
+ ThrowUnsupported();
378
+
379
+ folder.Coders.SetSize(numCoders);
380
+
381
+ UInt32 numInStreams = 0;
382
+ UInt32 i;
383
+ for (i = 0; i < numCoders; i++)
384
+ {
385
+ CCoderInfo &coder = folder.Coders[i];
386
+ {
387
+ Byte mainByte = ReadByte();
388
+ if ((mainByte & 0xC0) != 0)
389
+ ThrowUnsupported();
390
+ unsigned idSize = (mainByte & 0xF);
391
+ if (idSize > 8 || idSize > GetRem())
392
+ ThrowUnsupported();
393
+ const Byte *longID = GetPtr();
394
+ UInt64 id = 0;
395
+ for (unsigned j = 0; j < idSize; j++)
396
+ id = ((id << 8) | longID[j]);
397
+ SkipDataNoCheck(idSize);
398
+ coder.MethodID = id;
399
+
400
+ if ((mainByte & 0x10) != 0)
401
+ {
402
+ coder.NumStreams = ReadNum();
403
+ /* numOutStreams = */ ReadNum();
404
+ }
405
+ else
406
+ {
407
+ coder.NumStreams = 1;
408
+ }
409
+
410
+ if ((mainByte & 0x20) != 0)
411
+ {
412
+ CNum propsSize = ReadNum();
413
+ coder.Props.Alloc((size_t)propsSize);
414
+ ReadBytes((Byte *)coder.Props, (size_t)propsSize);
415
+ }
416
+ else
417
+ coder.Props.Free();
418
+ }
419
+ numInStreams += coder.NumStreams;
420
+ }
421
+
422
+ UInt32 numBonds = numCoders - 1;
423
+ folder.Bonds.SetSize(numBonds);
424
+ for (i = 0; i < numBonds; i++)
425
+ {
426
+ CBond &bp = folder.Bonds[i];
427
+ bp.PackIndex = ReadNum();
428
+ bp.UnpackIndex = ReadNum();
429
+ }
430
+
431
+ if (numInStreams < numBonds)
432
+ ThrowUnsupported();
433
+ UInt32 numPackStreams = numInStreams - numBonds;
434
+ folder.PackStreams.SetSize(numPackStreams);
435
+
436
+ if (numPackStreams == 1)
437
+ {
438
+ for (i = 0; i < numInStreams; i++)
439
+ if (folder.FindBond_for_PackStream(i) < 0)
440
+ {
441
+ folder.PackStreams[0] = i;
442
+ break;
443
+ }
444
+ if (i == numInStreams)
445
+ ThrowUnsupported();
446
+ }
447
+ else
448
+ for (i = 0; i < numPackStreams; i++)
449
+ folder.PackStreams[i] = ReadNum();
450
+ }
451
+
452
+ void CFolders::ParseFolderInfo(unsigned folderIndex, CFolder &folder) const
453
+ {
454
+ size_t startPos = FoCodersDataOffset[folderIndex];
455
+ CInByte2 inByte;
456
+ inByte.Init(CodersData + startPos, FoCodersDataOffset[folderIndex + 1] - startPos);
457
+ inByte.ParseFolder(folder);
458
+ if (inByte.GetRem() != 0)
459
+ throw 20120424;
460
+ }
461
+
462
+
463
+ void CDatabase::GetPath(unsigned index, UString &path) const
464
+ {
465
+ path.Empty();
466
+ if (!NameOffsets || !NamesBuf)
467
+ return;
468
+
469
+ size_t offset = NameOffsets[index];
470
+ size_t size = NameOffsets[index + 1] - offset;
471
+
472
+ if (size >= (1 << 28))
473
+ return;
474
+
475
+ wchar_t *s = path.GetBuf((unsigned)size - 1);
476
+
477
+ const Byte *p = ((const Byte *)NamesBuf + offset * 2);
478
+
479
+ #if defined(_WIN32) && defined(MY_CPU_LE)
480
+
481
+ wmemcpy(s, (const wchar_t *)p, size);
482
+
483
+ #else
484
+
485
+ for (size_t i = 0; i < size; i++)
486
+ {
487
+ *s = Get16(p);
488
+ p += 2;
489
+ s++;
490
+ }
491
+
492
+ #endif
493
+
494
+ path.ReleaseBuf_SetLen((unsigned)size - 1);
495
+ }
496
+
497
+ HRESULT CDatabase::GetPath_Prop(unsigned index, PROPVARIANT *path) const throw()
498
+ {
499
+ PropVariant_Clear(path);
500
+ if (!NameOffsets || !NamesBuf)
501
+ return S_OK;
502
+
503
+ size_t offset = NameOffsets[index];
504
+ size_t size = NameOffsets[index + 1] - offset;
505
+
506
+ if (size >= (1 << 14))
507
+ return S_OK;
508
+
509
+ RINOK(PropVarEm_Alloc_Bstr(path, (unsigned)size - 1));
510
+ wchar_t *s = path->bstrVal;
511
+
512
+ const Byte *p = ((const Byte *)NamesBuf + offset * 2);
513
+
514
+ for (size_t i = 0; i < size; i++)
515
+ {
516
+ wchar_t c = Get16(p);
517
+ p += 2;
518
+ #if WCHAR_PATH_SEPARATOR != L'/'
519
+ if (c == L'/')
520
+ c = WCHAR_PATH_SEPARATOR;
521
+ #endif
522
+ *s++ = c;
523
+ }
524
+
525
+ return S_OK;
526
+
527
+ /*
528
+ unsigned cur = index;
529
+ unsigned size = 0;
530
+
531
+ for (int i = 0;; i++)
532
+ {
533
+ size_t len = NameOffsets[cur + 1] - NameOffsets[cur];
534
+ size += (unsigned)len;
535
+ if (i > 256 || len > (1 << 14) || size > (1 << 14))
536
+ return PropVarEm_Set_Str(path, "[TOO-LONG]");
537
+ cur = Files[cur].Parent;
538
+ if (cur < 0)
539
+ break;
540
+ }
541
+ size--;
542
+
543
+ RINOK(PropVarEm_Alloc_Bstr(path, size));
544
+ wchar_t *s = path->bstrVal;
545
+ s += size;
546
+ *s = 0;
547
+ cur = index;
548
+
549
+ for (;;)
550
+ {
551
+ unsigned len = (unsigned)(NameOffsets[cur + 1] - NameOffsets[cur] - 1);
552
+ const Byte *p = (const Byte *)NamesBuf + (NameOffsets[cur + 1] * 2) - 2;
553
+ for (; len != 0; len--)
554
+ {
555
+ p -= 2;
556
+ --s;
557
+ wchar_t c = Get16(p);
558
+ if (c == '/')
559
+ c = WCHAR_PATH_SEPARATOR;
560
+ *s = c;
561
+ }
562
+
563
+ const CFileItem &file = Files[cur];
564
+ cur = file.Parent;
565
+ if (cur < 0)
566
+ return S_OK;
567
+ *(--s) = (file.IsAltStream ? ':' : WCHAR_PATH_SEPARATOR);
568
+ }
569
+ */
570
+ }
571
+
572
+ void CInArchive::WaitId(UInt64 id)
573
+ {
574
+ for (;;)
575
+ {
576
+ UInt64 type = ReadID();
577
+ if (type == id)
578
+ return;
579
+ if (type == NID::kEnd)
580
+ ThrowIncorrect();
581
+ SkipData();
582
+ }
583
+ }
584
+
585
+
586
+ void CInArchive::Read_UInt32_Vector(CUInt32DefVector &v)
587
+ {
588
+ unsigned numItems = v.Defs.Size();
589
+ v.Vals.ClearAndSetSize(numItems);
590
+ UInt32 *p = &v.Vals[0];
591
+ const bool *defs = &v.Defs[0];
592
+ for (unsigned i = 0; i < numItems; i++)
593
+ {
594
+ UInt32 a = 0;
595
+ if (defs[i])
596
+ a = ReadUInt32();
597
+ p[i] = a;
598
+ }
599
+ }
600
+
601
+
602
+ void CInArchive::ReadHashDigests(unsigned numItems, CUInt32DefVector &crcs)
603
+ {
604
+ ReadBoolVector2(numItems, crcs.Defs);
605
+ Read_UInt32_Vector(crcs);
606
+ }
607
+
608
+
609
+ #define k_Scan_NumCoders_MAX 64
610
+ #define k_Scan_NumCodersStreams_in_Folder_MAX 64
611
+
612
+ void CInArchive::ReadPackInfo(CFolders &f)
613
+ {
614
+ CNum numPackStreams = ReadNum();
615
+
616
+ WaitId(NID::kSize);
617
+ f.PackPositions.Alloc(numPackStreams + 1);
618
+ f.NumPackStreams = numPackStreams;
619
+ UInt64 sum = 0;
620
+ for (CNum i = 0; i < numPackStreams; i++)
621
+ {
622
+ f.PackPositions[i] = sum;
623
+ UInt64 packSize = ReadNumber();
624
+ sum += packSize;
625
+ if (sum < packSize)
626
+ ThrowIncorrect();
627
+ }
628
+ f.PackPositions[numPackStreams] = sum;
629
+
630
+ UInt64 type;
631
+ for (;;)
632
+ {
633
+ type = ReadID();
634
+ if (type == NID::kEnd)
635
+ return;
636
+ if (type == NID::kCRC)
637
+ {
638
+ CUInt32DefVector PackCRCs;
639
+ ReadHashDigests(numPackStreams, PackCRCs);
640
+ continue;
641
+ }
642
+ SkipData();
643
+ }
644
+ }
645
+
646
+ void CInArchive::ReadUnpackInfo(
647
+ const CObjectVector<CByteBuffer> *dataVector,
648
+ CFolders &folders)
649
+ {
650
+ WaitId(NID::kFolder);
651
+ CNum numFolders = ReadNum();
652
+
653
+ CNum numCodersOutStreams = 0;
654
+ {
655
+ CStreamSwitch streamSwitch;
656
+ streamSwitch.Set(this, dataVector);
657
+ const Byte *startBufPtr = _inByteBack->GetPtr();
658
+ folders.NumFolders = numFolders;
659
+
660
+ folders.FoStartPackStreamIndex.Alloc(numFolders + 1);
661
+ folders.FoToMainUnpackSizeIndex.Alloc(numFolders);
662
+ folders.FoCodersDataOffset.Alloc(numFolders + 1);
663
+ folders.FoToCoderUnpackSizes.Alloc(numFolders + 1);
664
+
665
+ CBoolVector StreamUsed;
666
+ CBoolVector CoderUsed;
667
+
668
+ CNum packStreamIndex = 0;
669
+ CNum fo;
670
+ CInByte2 *inByte = _inByteBack;
671
+
672
+ for (fo = 0; fo < numFolders; fo++)
673
+ {
674
+ UInt32 indexOfMainStream = 0;
675
+ UInt32 numPackStreams = 0;
676
+ folders.FoCodersDataOffset[fo] = _inByteBack->GetPtr() - startBufPtr;
677
+
678
+ CNum numInStreams = 0;
679
+ CNum numCoders = inByte->ReadNum();
680
+
681
+ if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX)
682
+ ThrowUnsupported();
683
+
684
+ for (CNum ci = 0; ci < numCoders; ci++)
685
+ {
686
+ Byte mainByte = inByte->ReadByte();
687
+ if ((mainByte & 0xC0) != 0)
688
+ ThrowUnsupported();
689
+
690
+ unsigned idSize = (mainByte & 0xF);
691
+ if (idSize > 8)
692
+ ThrowUnsupported();
693
+ if (idSize > inByte->GetRem())
694
+ ThrowEndOfData();
695
+ const Byte *longID = inByte->GetPtr();
696
+ UInt64 id = 0;
697
+ for (unsigned j = 0; j < idSize; j++)
698
+ id = ((id << 8) | longID[j]);
699
+ inByte->SkipDataNoCheck(idSize);
700
+ if (folders.ParsedMethods.IDs.Size() < 128)
701
+ folders.ParsedMethods.IDs.AddToUniqueSorted(id);
702
+
703
+ CNum coderInStreams = 1;
704
+ if ((mainByte & 0x10) != 0)
705
+ {
706
+ coderInStreams = inByte->ReadNum();
707
+ if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
708
+ ThrowUnsupported();
709
+ if (inByte->ReadNum() != 1)
710
+ ThrowUnsupported();
711
+ }
712
+
713
+ numInStreams += coderInStreams;
714
+ if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
715
+ ThrowUnsupported();
716
+
717
+ if ((mainByte & 0x20) != 0)
718
+ {
719
+ CNum propsSize = inByte->ReadNum();
720
+ if (propsSize > inByte->GetRem())
721
+ ThrowEndOfData();
722
+ if (id == k_LZMA2 && propsSize == 1)
723
+ {
724
+ Byte v = *_inByteBack->GetPtr();
725
+ if (folders.ParsedMethods.Lzma2Prop < v)
726
+ folders.ParsedMethods.Lzma2Prop = v;
727
+ }
728
+ else if (id == k_LZMA && propsSize == 5)
729
+ {
730
+ UInt32 dicSize = GetUi32(_inByteBack->GetPtr() + 1);
731
+ if (folders.ParsedMethods.LzmaDic < dicSize)
732
+ folders.ParsedMethods.LzmaDic = dicSize;
733
+ }
734
+ inByte->SkipDataNoCheck((size_t)propsSize);
735
+ }
736
+ }
737
+
738
+ if (numCoders == 1 && numInStreams == 1)
739
+ {
740
+ indexOfMainStream = 0;
741
+ numPackStreams = 1;
742
+ }
743
+ else
744
+ {
745
+ UInt32 i;
746
+ CNum numBonds = numCoders - 1;
747
+ if (numInStreams < numBonds)
748
+ ThrowUnsupported();
749
+
750
+ BoolVector_Fill_False(StreamUsed, numInStreams);
751
+ BoolVector_Fill_False(CoderUsed, numCoders);
752
+
753
+ for (i = 0; i < numBonds; i++)
754
+ {
755
+ CNum index = ReadNum();
756
+ if (index >= numInStreams || StreamUsed[index])
757
+ ThrowUnsupported();
758
+ StreamUsed[index] = true;
759
+
760
+ index = ReadNum();
761
+ if (index >= numCoders || CoderUsed[index])
762
+ ThrowUnsupported();
763
+ CoderUsed[index] = true;
764
+ }
765
+
766
+ numPackStreams = numInStreams - numBonds;
767
+
768
+ if (numPackStreams != 1)
769
+ for (i = 0; i < numPackStreams; i++)
770
+ {
771
+ CNum index = inByte->ReadNum(); // PackStreams
772
+ if (index >= numInStreams || StreamUsed[index])
773
+ ThrowUnsupported();
774
+ StreamUsed[index] = true;
775
+ }
776
+
777
+ for (i = 0; i < numCoders; i++)
778
+ if (!CoderUsed[i])
779
+ {
780
+ indexOfMainStream = i;
781
+ break;
782
+ }
783
+
784
+ if (i == numCoders)
785
+ ThrowUnsupported();
786
+ }
787
+
788
+ folders.FoToCoderUnpackSizes[fo] = numCodersOutStreams;
789
+ numCodersOutStreams += numCoders;
790
+ folders.FoStartPackStreamIndex[fo] = packStreamIndex;
791
+ if (numPackStreams > folders.NumPackStreams - packStreamIndex)
792
+ ThrowIncorrect();
793
+ packStreamIndex += numPackStreams;
794
+ folders.FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream;
795
+ }
796
+
797
+ size_t dataSize = _inByteBack->GetPtr() - startBufPtr;
798
+ folders.FoToCoderUnpackSizes[fo] = numCodersOutStreams;
799
+ folders.FoStartPackStreamIndex[fo] = packStreamIndex;
800
+ folders.FoCodersDataOffset[fo] = _inByteBack->GetPtr() - startBufPtr;
801
+ folders.CodersData.CopyFrom(startBufPtr, dataSize);
802
+
803
+ // if (folders.NumPackStreams != packStreamIndex) ThrowUnsupported();
804
+ }
805
+
806
+ WaitId(NID::kCodersUnpackSize);
807
+ folders.CoderUnpackSizes.Alloc(numCodersOutStreams);
808
+ for (CNum i = 0; i < numCodersOutStreams; i++)
809
+ folders.CoderUnpackSizes[i] = ReadNumber();
810
+
811
+ for (;;)
812
+ {
813
+ UInt64 type = ReadID();
814
+ if (type == NID::kEnd)
815
+ return;
816
+ if (type == NID::kCRC)
817
+ {
818
+ ReadHashDigests(numFolders, folders.FolderCRCs);
819
+ continue;
820
+ }
821
+ SkipData();
822
+ }
823
+ }
824
+
825
+ void CInArchive::ReadSubStreamsInfo(
826
+ CFolders &folders,
827
+ CRecordVector<UInt64> &unpackSizes,
828
+ CUInt32DefVector &digests)
829
+ {
830
+ folders.NumUnpackStreamsVector.Alloc(folders.NumFolders);
831
+ CNum i;
832
+ for (i = 0; i < folders.NumFolders; i++)
833
+ folders.NumUnpackStreamsVector[i] = 1;
834
+
835
+ UInt64 type;
836
+
837
+ for (;;)
838
+ {
839
+ type = ReadID();
840
+ if (type == NID::kNumUnpackStream)
841
+ {
842
+ for (i = 0; i < folders.NumFolders; i++)
843
+ folders.NumUnpackStreamsVector[i] = ReadNum();
844
+ continue;
845
+ }
846
+ if (type == NID::kCRC || type == NID::kSize || type == NID::kEnd)
847
+ break;
848
+ SkipData();
849
+ }
850
+
851
+ if (type == NID::kSize)
852
+ {
853
+ for (i = 0; i < folders.NumFolders; i++)
854
+ {
855
+ // v3.13 incorrectly worked with empty folders
856
+ // v4.07: we check that folder is empty
857
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
858
+ if (numSubstreams == 0)
859
+ continue;
860
+ UInt64 sum = 0;
861
+ for (CNum j = 1; j < numSubstreams; j++)
862
+ {
863
+ UInt64 size = ReadNumber();
864
+ unpackSizes.Add(size);
865
+ sum += size;
866
+ if (sum < size)
867
+ ThrowIncorrect();
868
+ }
869
+ UInt64 folderUnpackSize = folders.GetFolderUnpackSize(i);
870
+ if (folderUnpackSize < sum)
871
+ ThrowIncorrect();
872
+ unpackSizes.Add(folderUnpackSize - sum);
873
+ }
874
+ type = ReadID();
875
+ }
876
+ else
877
+ {
878
+ for (i = 0; i < folders.NumFolders; i++)
879
+ {
880
+ /* v9.26 - v9.29 incorrectly worked:
881
+ if (folders.NumUnpackStreamsVector[i] == 0), it threw error */
882
+ CNum val = folders.NumUnpackStreamsVector[i];
883
+ if (val > 1)
884
+ ThrowIncorrect();
885
+ if (val == 1)
886
+ unpackSizes.Add(folders.GetFolderUnpackSize(i));
887
+ }
888
+ }
889
+
890
+ unsigned numDigests = 0;
891
+ for (i = 0; i < folders.NumFolders; i++)
892
+ {
893
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
894
+ if (numSubstreams != 1 || !folders.FolderCRCs.ValidAndDefined(i))
895
+ numDigests += numSubstreams;
896
+ }
897
+
898
+ for (;;)
899
+ {
900
+ if (type == NID::kEnd)
901
+ break;
902
+ if (type == NID::kCRC)
903
+ {
904
+ // CUInt32DefVector digests2;
905
+ // ReadHashDigests(numDigests, digests2);
906
+ CBoolVector digests2;
907
+ ReadBoolVector2(numDigests, digests2);
908
+
909
+ digests.ClearAndSetSize(unpackSizes.Size());
910
+
911
+ unsigned k = 0;
912
+ unsigned k2 = 0;
913
+
914
+ for (i = 0; i < folders.NumFolders; i++)
915
+ {
916
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
917
+ if (numSubstreams == 1 && folders.FolderCRCs.ValidAndDefined(i))
918
+ {
919
+ digests.Defs[k] = true;
920
+ digests.Vals[k] = folders.FolderCRCs.Vals[i];
921
+ k++;
922
+ }
923
+ else for (CNum j = 0; j < numSubstreams; j++)
924
+ {
925
+ bool defined = digests2[k2++];
926
+ digests.Defs[k] = defined;
927
+ UInt32 crc = 0;
928
+ if (defined)
929
+ crc = ReadUInt32();
930
+ digests.Vals[k] = crc;
931
+ k++;
932
+ }
933
+ }
934
+ // if (k != unpackSizes.Size()) throw 1234567;
935
+ }
936
+ else
937
+ SkipData();
938
+
939
+ type = ReadID();
940
+ }
941
+
942
+ if (digests.Defs.Size() != unpackSizes.Size())
943
+ {
944
+ digests.ClearAndSetSize(unpackSizes.Size());
945
+ unsigned k = 0;
946
+ for (i = 0; i < folders.NumFolders; i++)
947
+ {
948
+ CNum numSubstreams = folders.NumUnpackStreamsVector[i];
949
+ if (numSubstreams == 1 && folders.FolderCRCs.ValidAndDefined(i))
950
+ {
951
+ digests.Defs[k] = true;
952
+ digests.Vals[k] = folders.FolderCRCs.Vals[i];
953
+ k++;
954
+ }
955
+ else for (CNum j = 0; j < numSubstreams; j++)
956
+ {
957
+ digests.Defs[k] = false;
958
+ digests.Vals[k] = 0;
959
+ k++;
960
+ }
961
+ }
962
+ }
963
+ }
964
+
965
+ void CInArchive::ReadStreamsInfo(
966
+ const CObjectVector<CByteBuffer> *dataVector,
967
+ UInt64 &dataOffset,
968
+ CFolders &folders,
969
+ CRecordVector<UInt64> &unpackSizes,
970
+ CUInt32DefVector &digests)
971
+ {
972
+ UInt64 type = ReadID();
973
+
974
+ if (type == NID::kPackInfo)
975
+ {
976
+ dataOffset = ReadNumber();
977
+ ReadPackInfo(folders);
978
+ type = ReadID();
979
+ }
980
+
981
+ if (type == NID::kUnpackInfo)
982
+ {
983
+ ReadUnpackInfo(dataVector, folders);
984
+ type = ReadID();
985
+ }
986
+
987
+ if (folders.NumFolders != 0 && !folders.PackPositions)
988
+ {
989
+ // if there are folders, we need PackPositions also
990
+ folders.PackPositions.Alloc(1);
991
+ folders.PackPositions[0] = 0;
992
+ }
993
+
994
+ if (type == NID::kSubStreamsInfo)
995
+ {
996
+ ReadSubStreamsInfo(folders, unpackSizes, digests);
997
+ type = ReadID();
998
+ }
999
+ else
1000
+ {
1001
+ folders.NumUnpackStreamsVector.Alloc(folders.NumFolders);
1002
+ /* If digests.Defs.Size() == 0, it means that there are no crcs.
1003
+ So we don't need to fill digests with values. */
1004
+ // digests.Vals.ClearAndSetSize(folders.NumFolders);
1005
+ // BoolVector_Fill_False(digests.Defs, folders.NumFolders);
1006
+ for (CNum i = 0; i < folders.NumFolders; i++)
1007
+ {
1008
+ folders.NumUnpackStreamsVector[i] = 1;
1009
+ unpackSizes.Add(folders.GetFolderUnpackSize(i));
1010
+ // digests.Vals[i] = 0;
1011
+ }
1012
+ }
1013
+
1014
+ if (type != NID::kEnd)
1015
+ ThrowIncorrect();
1016
+ }
1017
+
1018
+ void CInArchive::ReadBoolVector(unsigned numItems, CBoolVector &v)
1019
+ {
1020
+ v.ClearAndSetSize(numItems);
1021
+ Byte b = 0;
1022
+ Byte mask = 0;
1023
+ bool *p = &v[0];
1024
+ for (unsigned i = 0; i < numItems; i++)
1025
+ {
1026
+ if (mask == 0)
1027
+ {
1028
+ b = ReadByte();
1029
+ mask = 0x80;
1030
+ }
1031
+ p[i] = ((b & mask) != 0);
1032
+ mask >>= 1;
1033
+ }
1034
+ }
1035
+
1036
+ void CInArchive::ReadBoolVector2(unsigned numItems, CBoolVector &v)
1037
+ {
1038
+ Byte allAreDefined = ReadByte();
1039
+ if (allAreDefined == 0)
1040
+ {
1041
+ ReadBoolVector(numItems, v);
1042
+ return;
1043
+ }
1044
+ v.ClearAndSetSize(numItems);
1045
+ bool *p = &v[0];
1046
+ for (unsigned i = 0; i < numItems; i++)
1047
+ p[i] = true;
1048
+ }
1049
+
1050
+ void CInArchive::ReadUInt64DefVector(const CObjectVector<CByteBuffer> &dataVector,
1051
+ CUInt64DefVector &v, unsigned numItems)
1052
+ {
1053
+ ReadBoolVector2(numItems, v.Defs);
1054
+
1055
+ CStreamSwitch streamSwitch;
1056
+ streamSwitch.Set(this, &dataVector);
1057
+
1058
+ v.Vals.ClearAndSetSize(numItems);
1059
+ UInt64 *p = &v.Vals[0];
1060
+ const bool *defs = &v.Defs[0];
1061
+
1062
+ for (unsigned i = 0; i < numItems; i++)
1063
+ {
1064
+ UInt64 t = 0;
1065
+ if (defs[i])
1066
+ t = ReadUInt64();
1067
+ p[i] = t;
1068
+ }
1069
+ }
1070
+
1071
+ HRESULT CInArchive::ReadAndDecodePackedStreams(
1072
+ DECL_EXTERNAL_CODECS_LOC_VARS
1073
+ UInt64 baseOffset,
1074
+ UInt64 &dataOffset, CObjectVector<CByteBuffer> &dataVector
1075
+ _7Z_DECODER_CRYPRO_VARS_DECL
1076
+ )
1077
+ {
1078
+ CFolders folders;
1079
+ CRecordVector<UInt64> unpackSizes;
1080
+ CUInt32DefVector digests;
1081
+
1082
+ ReadStreamsInfo(NULL,
1083
+ dataOffset,
1084
+ folders,
1085
+ unpackSizes,
1086
+ digests);
1087
+
1088
+ CDecoder decoder(_useMixerMT);
1089
+
1090
+ for (CNum i = 0; i < folders.NumFolders; i++)
1091
+ {
1092
+ CByteBuffer &data = dataVector.AddNew();
1093
+ UInt64 unpackSize64 = folders.GetFolderUnpackSize(i);
1094
+ size_t unpackSize = (size_t)unpackSize64;
1095
+ if (unpackSize != unpackSize64)
1096
+ ThrowUnsupported();
1097
+ data.Alloc(unpackSize);
1098
+
1099
+ CBufPtrSeqOutStream *outStreamSpec = new CBufPtrSeqOutStream;
1100
+ CMyComPtr<ISequentialOutStream> outStream = outStreamSpec;
1101
+ outStreamSpec->Init(data, unpackSize);
1102
+
1103
+ bool dataAfterEnd_Error = false;
1104
+
1105
+ HRESULT result = decoder.Decode(
1106
+ EXTERNAL_CODECS_LOC_VARS
1107
+ _stream, baseOffset + dataOffset,
1108
+ folders, i,
1109
+ NULL, // *unpackSize
1110
+
1111
+ outStream,
1112
+ NULL, // *compressProgress
1113
+
1114
+ NULL // **inStreamMainRes
1115
+ , dataAfterEnd_Error
1116
+
1117
+ _7Z_DECODER_CRYPRO_VARS
1118
+ #if !defined(_7ZIP_ST)
1119
+ , false // mtMode
1120
+ , 1 // numThreads
1121
+ , 0 // memUsage
1122
+ #endif
1123
+ );
1124
+
1125
+ RINOK(result);
1126
+
1127
+ if (dataAfterEnd_Error)
1128
+ ThereIsHeaderError = true;
1129
+
1130
+ if (folders.FolderCRCs.ValidAndDefined(i))
1131
+ if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])
1132
+ ThrowIncorrect();
1133
+ }
1134
+
1135
+ if (folders.PackPositions)
1136
+ HeadersSize += folders.PackPositions[folders.NumPackStreams];
1137
+
1138
+ return S_OK;
1139
+ }
1140
+
1141
+ HRESULT CInArchive::ReadHeader(
1142
+ DECL_EXTERNAL_CODECS_LOC_VARS
1143
+ CDbEx &db
1144
+ _7Z_DECODER_CRYPRO_VARS_DECL
1145
+ )
1146
+ {
1147
+ UInt64 type = ReadID();
1148
+
1149
+ if (type == NID::kArchiveProperties)
1150
+ {
1151
+ ReadArchiveProperties(db.ArcInfo);
1152
+ type = ReadID();
1153
+ }
1154
+
1155
+ CObjectVector<CByteBuffer> dataVector;
1156
+
1157
+ if (type == NID::kAdditionalStreamsInfo)
1158
+ {
1159
+ HRESULT result = ReadAndDecodePackedStreams(
1160
+ EXTERNAL_CODECS_LOC_VARS
1161
+ db.ArcInfo.StartPositionAfterHeader,
1162
+ db.ArcInfo.DataStartPosition2,
1163
+ dataVector
1164
+ _7Z_DECODER_CRYPRO_VARS
1165
+ );
1166
+ RINOK(result);
1167
+ db.ArcInfo.DataStartPosition2 += db.ArcInfo.StartPositionAfterHeader;
1168
+ type = ReadID();
1169
+ }
1170
+
1171
+ CRecordVector<UInt64> unpackSizes;
1172
+ CUInt32DefVector digests;
1173
+
1174
+ if (type == NID::kMainStreamsInfo)
1175
+ {
1176
+ ReadStreamsInfo(&dataVector,
1177
+ db.ArcInfo.DataStartPosition,
1178
+ (CFolders &)db,
1179
+ unpackSizes,
1180
+ digests);
1181
+ db.ArcInfo.DataStartPosition += db.ArcInfo.StartPositionAfterHeader;
1182
+ type = ReadID();
1183
+ }
1184
+
1185
+ if (type == NID::kFilesInfo)
1186
+ {
1187
+
1188
+ const CNum numFiles = ReadNum();
1189
+
1190
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kSize);
1191
+ // if (!db.PackSizes.IsEmpty())
1192
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kPackInfo);
1193
+ if (numFiles > 0 && !digests.Defs.IsEmpty())
1194
+ db.ArcInfo.FileInfoPopIDs.Add(NID::kCRC);
1195
+
1196
+ CBoolVector emptyStreamVector;
1197
+ CBoolVector emptyFileVector;
1198
+ CBoolVector antiFileVector;
1199
+ CNum numEmptyStreams = 0;
1200
+
1201
+ for (;;)
1202
+ {
1203
+ const UInt64 type2 = ReadID();
1204
+ if (type2 == NID::kEnd)
1205
+ break;
1206
+ UInt64 size = ReadNumber();
1207
+ if (size > _inByteBack->GetRem())
1208
+ ThrowIncorrect();
1209
+ CStreamSwitch switchProp;
1210
+ switchProp.Set(this, _inByteBack->GetPtr(), (size_t)size, true);
1211
+ bool addPropIdToList = true;
1212
+ bool isKnownType = true;
1213
+ if (type2 > ((UInt32)1 << 30))
1214
+ isKnownType = false;
1215
+ else switch ((UInt32)type2)
1216
+ {
1217
+ case NID::kName:
1218
+ {
1219
+ CStreamSwitch streamSwitch;
1220
+ streamSwitch.Set(this, &dataVector);
1221
+ size_t rem = _inByteBack->GetRem();
1222
+ db.NamesBuf.Alloc(rem);
1223
+ ReadBytes(db.NamesBuf, rem);
1224
+ db.NameOffsets.Alloc(numFiles + 1);
1225
+ size_t pos = 0;
1226
+ unsigned i;
1227
+ for (i = 0; i < numFiles; i++)
1228
+ {
1229
+ size_t curRem = (rem - pos) / 2;
1230
+ const UInt16 *buf = (const UInt16 *)(db.NamesBuf + pos);
1231
+ size_t j;
1232
+ for (j = 0; j < curRem && buf[j] != 0; j++);
1233
+ if (j == curRem)
1234
+ ThrowEndOfData();
1235
+ db.NameOffsets[i] = pos / 2;
1236
+ pos += j * 2 + 2;
1237
+ }
1238
+ db.NameOffsets[i] = pos / 2;
1239
+ if (pos != rem)
1240
+ ThereIsHeaderError = true;
1241
+ break;
1242
+ }
1243
+
1244
+ case NID::kWinAttrib:
1245
+ {
1246
+ ReadBoolVector2(numFiles, db.Attrib.Defs);
1247
+ CStreamSwitch streamSwitch;
1248
+ streamSwitch.Set(this, &dataVector);
1249
+ Read_UInt32_Vector(db.Attrib);
1250
+ break;
1251
+ }
1252
+
1253
+ /*
1254
+ case NID::kIsAux:
1255
+ {
1256
+ ReadBoolVector(numFiles, db.IsAux);
1257
+ break;
1258
+ }
1259
+ case NID::kParent:
1260
+ {
1261
+ db.IsTree = true;
1262
+ // CBoolVector boolVector;
1263
+ // ReadBoolVector2(numFiles, boolVector);
1264
+ // CStreamSwitch streamSwitch;
1265
+ // streamSwitch.Set(this, &dataVector);
1266
+ CBoolVector boolVector;
1267
+ ReadBoolVector2(numFiles, boolVector);
1268
+
1269
+ db.ThereAreAltStreams = false;
1270
+ for (i = 0; i < numFiles; i++)
1271
+ {
1272
+ CFileItem &file = db.Files[i];
1273
+ // file.Parent = -1;
1274
+ // if (boolVector[i])
1275
+ file.Parent = (int)ReadUInt32();
1276
+ file.IsAltStream = !boolVector[i];
1277
+ if (file.IsAltStream)
1278
+ db.ThereAreAltStreams = true;
1279
+ }
1280
+ break;
1281
+ }
1282
+ */
1283
+ case NID::kEmptyStream:
1284
+ {
1285
+ ReadBoolVector(numFiles, emptyStreamVector);
1286
+ numEmptyStreams = BoolVector_CountSum(emptyStreamVector);
1287
+ emptyFileVector.Clear();
1288
+ antiFileVector.Clear();
1289
+ break;
1290
+ }
1291
+ case NID::kEmptyFile: ReadBoolVector(numEmptyStreams, emptyFileVector); break;
1292
+ case NID::kAnti: ReadBoolVector(numEmptyStreams, antiFileVector); break;
1293
+ case NID::kStartPos: ReadUInt64DefVector(dataVector, db.StartPos, (unsigned)numFiles); break;
1294
+ case NID::kCTime: ReadUInt64DefVector(dataVector, db.CTime, (unsigned)numFiles); break;
1295
+ case NID::kATime: ReadUInt64DefVector(dataVector, db.ATime, (unsigned)numFiles); break;
1296
+ case NID::kMTime: ReadUInt64DefVector(dataVector, db.MTime, (unsigned)numFiles); break;
1297
+ case NID::kDummy:
1298
+ {
1299
+ for (UInt64 j = 0; j < size; j++)
1300
+ if (ReadByte() != 0)
1301
+ ThereIsHeaderError = true;
1302
+ addPropIdToList = false;
1303
+ break;
1304
+ }
1305
+ /*
1306
+ case NID::kNtSecure:
1307
+ {
1308
+ try
1309
+ {
1310
+ {
1311
+ CStreamSwitch streamSwitch;
1312
+ streamSwitch.Set(this, &dataVector);
1313
+ UInt32 numDescriptors = ReadUInt32();
1314
+ size_t offset = 0;
1315
+ db.SecureOffsets.Clear();
1316
+ for (i = 0; i < numDescriptors; i++)
1317
+ {
1318
+ UInt32 size = ReadUInt32();
1319
+ db.SecureOffsets.Add(offset);
1320
+ offset += size;
1321
+ }
1322
+ // ThrowIncorrect();;
1323
+ db.SecureOffsets.Add(offset);
1324
+ db.SecureBuf.SetCapacity(offset);
1325
+ for (i = 0; i < numDescriptors; i++)
1326
+ {
1327
+ offset = db.SecureOffsets[i];
1328
+ ReadBytes(db.SecureBuf + offset, db.SecureOffsets[i + 1] - offset);
1329
+ }
1330
+ db.SecureIDs.Clear();
1331
+ for (unsigned i = 0; i < numFiles; i++)
1332
+ {
1333
+ db.SecureIDs.Add(ReadNum());
1334
+ // db.SecureIDs.Add(ReadUInt32());
1335
+ }
1336
+ // ReadUInt32();
1337
+ if (_inByteBack->GetRem() != 0)
1338
+ ThrowIncorrect();;
1339
+ }
1340
+ }
1341
+ catch(CInArchiveException &)
1342
+ {
1343
+ ThereIsHeaderError = true;
1344
+ addPropIdToList = isKnownType = false;
1345
+ db.ClearSecure();
1346
+ }
1347
+ break;
1348
+ }
1349
+ */
1350
+ default:
1351
+ addPropIdToList = isKnownType = false;
1352
+ }
1353
+ if (isKnownType)
1354
+ {
1355
+ if (addPropIdToList)
1356
+ db.ArcInfo.FileInfoPopIDs.Add(type2);
1357
+ }
1358
+ else
1359
+ {
1360
+ db.UnsupportedFeatureWarning = true;
1361
+ _inByteBack->SkipRem();
1362
+ }
1363
+ // SkipData worked incorrectly in some versions before v4.59 (7zVer <= 0.02)
1364
+ if (_inByteBack->GetRem() != 0)
1365
+ ThrowIncorrect();
1366
+ }
1367
+
1368
+ type = ReadID(); // Read (NID::kEnd) end of headers
1369
+
1370
+ if (numFiles - numEmptyStreams != unpackSizes.Size())
1371
+ ThrowUnsupported();
1372
+
1373
+ CNum emptyFileIndex = 0;
1374
+ CNum sizeIndex = 0;
1375
+
1376
+ const CNum numAntiItems = BoolVector_CountSum(antiFileVector);
1377
+
1378
+ if (numAntiItems != 0)
1379
+ db.IsAnti.ClearAndSetSize(numFiles);
1380
+
1381
+ db.Files.ClearAndSetSize(numFiles);
1382
+
1383
+ for (CNum i = 0; i < numFiles; i++)
1384
+ {
1385
+ CFileItem &file = db.Files[i];
1386
+ bool isAnti;
1387
+ file.Crc = 0;
1388
+ if (!BoolVector_Item_IsValidAndTrue(emptyStreamVector, i))
1389
+ {
1390
+ file.HasStream = true;
1391
+ file.IsDir = false;
1392
+ isAnti = false;
1393
+ file.Size = unpackSizes[sizeIndex];
1394
+ file.CrcDefined = digests.ValidAndDefined(sizeIndex);
1395
+ if (file.CrcDefined)
1396
+ file.Crc = digests.Vals[sizeIndex];
1397
+ sizeIndex++;
1398
+ }
1399
+ else
1400
+ {
1401
+ file.HasStream = false;
1402
+ file.IsDir = !BoolVector_Item_IsValidAndTrue(emptyFileVector, emptyFileIndex);
1403
+ isAnti = BoolVector_Item_IsValidAndTrue(antiFileVector, emptyFileIndex);
1404
+ emptyFileIndex++;
1405
+ file.Size = 0;
1406
+ file.CrcDefined = false;
1407
+ }
1408
+ if (numAntiItems != 0)
1409
+ db.IsAnti[i] = isAnti;
1410
+ }
1411
+
1412
+ }
1413
+
1414
+ db.FillLinks();
1415
+
1416
+ if (type != NID::kEnd || _inByteBack->GetRem() != 0)
1417
+ {
1418
+ db.UnsupportedFeatureWarning = true;
1419
+ // ThrowIncorrect();
1420
+ }
1421
+
1422
+ return S_OK;
1423
+ }
1424
+
1425
+
1426
+ void CDbEx::FillLinks()
1427
+ {
1428
+ FolderStartFileIndex.Alloc(NumFolders);
1429
+ FileIndexToFolderIndexMap.Alloc(Files.Size());
1430
+
1431
+ CNum folderIndex = 0;
1432
+ CNum indexInFolder = 0;
1433
+ unsigned i;
1434
+
1435
+ for (i = 0; i < Files.Size(); i++)
1436
+ {
1437
+ bool emptyStream = !Files[i].HasStream;
1438
+ if (indexInFolder == 0)
1439
+ {
1440
+ if (emptyStream)
1441
+ {
1442
+ FileIndexToFolderIndexMap[i] = kNumNoIndex;
1443
+ continue;
1444
+ }
1445
+ // v3.13 incorrectly worked with empty folders
1446
+ // v4.07: we skip empty folders
1447
+ for (;;)
1448
+ {
1449
+ if (folderIndex >= NumFolders)
1450
+ ThrowIncorrect();
1451
+ FolderStartFileIndex[folderIndex] = i;
1452
+ if (NumUnpackStreamsVector[folderIndex] != 0)
1453
+ break;
1454
+ folderIndex++;
1455
+ }
1456
+ }
1457
+ FileIndexToFolderIndexMap[i] = folderIndex;
1458
+ if (emptyStream)
1459
+ continue;
1460
+ if (++indexInFolder >= NumUnpackStreamsVector[folderIndex])
1461
+ {
1462
+ folderIndex++;
1463
+ indexInFolder = 0;
1464
+ }
1465
+ }
1466
+
1467
+ if (indexInFolder != 0)
1468
+ {
1469
+ folderIndex++;
1470
+ // 18.06
1471
+ ThereIsHeaderError = true;
1472
+ // ThrowIncorrect();
1473
+ }
1474
+
1475
+ for (;;)
1476
+ {
1477
+ if (folderIndex >= NumFolders)
1478
+ return;
1479
+ FolderStartFileIndex[folderIndex] = i;
1480
+ if (NumUnpackStreamsVector[folderIndex] != 0)
1481
+ {
1482
+ // 18.06
1483
+ ThereIsHeaderError = true;
1484
+ // ThrowIncorrect();
1485
+ }
1486
+ folderIndex++;
1487
+ }
1488
+ }
1489
+
1490
+
1491
+ HRESULT CInArchive::ReadDatabase2(
1492
+ DECL_EXTERNAL_CODECS_LOC_VARS
1493
+ CDbEx &db
1494
+ _7Z_DECODER_CRYPRO_VARS_DECL
1495
+ )
1496
+ {
1497
+ db.Clear();
1498
+ db.ArcInfo.StartPosition = _arhiveBeginStreamPosition;
1499
+
1500
+ db.ArcInfo.Version.Major = _header[6];
1501
+ db.ArcInfo.Version.Minor = _header[7];
1502
+
1503
+ if (db.ArcInfo.Version.Major != kMajorVersion)
1504
+ {
1505
+ // db.UnsupportedVersion = true;
1506
+ return S_FALSE;
1507
+ }
1508
+
1509
+ UInt64 nextHeaderOffset = Get64(_header + 12);
1510
+ UInt64 nextHeaderSize = Get64(_header + 20);
1511
+ UInt32 nextHeaderCRC = Get32(_header + 28);
1512
+
1513
+ #ifdef FORMAT_7Z_RECOVERY
1514
+ UInt32 crcFromArc = Get32(_header + 8);
1515
+ if (crcFromArc == 0 && nextHeaderOffset == 0 && nextHeaderSize == 0 && nextHeaderCRC == 0)
1516
+ {
1517
+ UInt64 cur, fileSize;
1518
+ RINOK(_stream->Seek(0, STREAM_SEEK_CUR, &cur));
1519
+ const unsigned kCheckSize = 512;
1520
+ Byte buf[kCheckSize];
1521
+ RINOK(_stream->Seek(0, STREAM_SEEK_END, &fileSize));
1522
+ UInt64 rem = fileSize - cur;
1523
+ unsigned checkSize = kCheckSize;
1524
+ if (rem < kCheckSize)
1525
+ checkSize = (unsigned)(rem);
1526
+ if (checkSize < 3)
1527
+ return S_FALSE;
1528
+ RINOK(_stream->Seek(fileSize - checkSize, STREAM_SEEK_SET, NULL));
1529
+ RINOK(ReadStream_FALSE(_stream, buf, (size_t)checkSize));
1530
+
1531
+ if (buf[checkSize - 1] != 0)
1532
+ return S_FALSE;
1533
+
1534
+ unsigned i;
1535
+ for (i = checkSize - 2;; i--)
1536
+ {
1537
+ if (buf[i] == NID::kEncodedHeader && buf[i + 1] == NID::kPackInfo ||
1538
+ buf[i] == NID::kHeader && buf[i + 1] == NID::kMainStreamsInfo)
1539
+ break;
1540
+ if (i == 0)
1541
+ return S_FALSE;
1542
+ }
1543
+ nextHeaderSize = checkSize - i;
1544
+ nextHeaderOffset = rem - nextHeaderSize;
1545
+ nextHeaderCRC = CrcCalc(buf + i, (size_t)nextHeaderSize);
1546
+ RINOK(_stream->Seek(cur, STREAM_SEEK_SET, NULL));
1547
+ db.StartHeaderWasRecovered = true;
1548
+ }
1549
+ else
1550
+ #endif
1551
+ {
1552
+ // Crc was tested already at signature check
1553
+ // if (CrcCalc(_header + 12, 20) != crcFromArchive) ThrowIncorrect();
1554
+ }
1555
+
1556
+ db.ArcInfo.StartPositionAfterHeader = _arhiveBeginStreamPosition + kHeaderSize;
1557
+ db.PhySize = kHeaderSize;
1558
+
1559
+ db.IsArc = false;
1560
+ if ((Int64)nextHeaderOffset < 0 ||
1561
+ nextHeaderSize > ((UInt64)1 << 62))
1562
+ return S_FALSE;
1563
+ if (nextHeaderSize == 0)
1564
+ {
1565
+ if (nextHeaderOffset != 0)
1566
+ return S_FALSE;
1567
+ db.IsArc = true;
1568
+ return S_OK;
1569
+ }
1570
+
1571
+ if (!db.StartHeaderWasRecovered)
1572
+ db.IsArc = true;
1573
+
1574
+ HeadersSize += kHeaderSize + nextHeaderSize;
1575
+ db.PhySize = kHeaderSize + nextHeaderOffset + nextHeaderSize;
1576
+ if (_fileEndPosition - db.ArcInfo.StartPositionAfterHeader < nextHeaderOffset + nextHeaderSize)
1577
+ {
1578
+ db.UnexpectedEnd = true;
1579
+ return S_FALSE;
1580
+ }
1581
+ RINOK(_stream->Seek(nextHeaderOffset, STREAM_SEEK_CUR, NULL));
1582
+
1583
+ size_t nextHeaderSize_t = (size_t)nextHeaderSize;
1584
+ if (nextHeaderSize_t != nextHeaderSize)
1585
+ return E_OUTOFMEMORY;
1586
+ CByteBuffer buffer2(nextHeaderSize_t);
1587
+
1588
+ RINOK(ReadStream_FALSE(_stream, buffer2, nextHeaderSize_t));
1589
+
1590
+ if (CrcCalc(buffer2, nextHeaderSize_t) != nextHeaderCRC)
1591
+ ThrowIncorrect();
1592
+
1593
+ if (!db.StartHeaderWasRecovered)
1594
+ db.PhySizeWasConfirmed = true;
1595
+
1596
+ CStreamSwitch streamSwitch;
1597
+ streamSwitch.Set(this, buffer2);
1598
+
1599
+ CObjectVector<CByteBuffer> dataVector;
1600
+
1601
+ UInt64 type = ReadID();
1602
+ if (type != NID::kHeader)
1603
+ {
1604
+ if (type != NID::kEncodedHeader)
1605
+ ThrowIncorrect();
1606
+ HRESULT result = ReadAndDecodePackedStreams(
1607
+ EXTERNAL_CODECS_LOC_VARS
1608
+ db.ArcInfo.StartPositionAfterHeader,
1609
+ db.ArcInfo.DataStartPosition2,
1610
+ dataVector
1611
+ _7Z_DECODER_CRYPRO_VARS
1612
+ );
1613
+ RINOK(result);
1614
+ if (dataVector.Size() == 0)
1615
+ return S_OK;
1616
+ if (dataVector.Size() > 1)
1617
+ ThrowIncorrect();
1618
+ streamSwitch.Remove();
1619
+ streamSwitch.Set(this, dataVector.Front());
1620
+ if (ReadID() != NID::kHeader)
1621
+ ThrowIncorrect();
1622
+ }
1623
+
1624
+ db.IsArc = true;
1625
+
1626
+ db.HeadersSize = HeadersSize;
1627
+
1628
+ return ReadHeader(
1629
+ EXTERNAL_CODECS_LOC_VARS
1630
+ db
1631
+ _7Z_DECODER_CRYPRO_VARS
1632
+ );
1633
+ }
1634
+
1635
+
1636
+ HRESULT CInArchive::ReadDatabase(
1637
+ DECL_EXTERNAL_CODECS_LOC_VARS
1638
+ CDbEx &db
1639
+ _7Z_DECODER_CRYPRO_VARS_DECL
1640
+ )
1641
+ {
1642
+ try
1643
+ {
1644
+ HRESULT res = ReadDatabase2(
1645
+ EXTERNAL_CODECS_LOC_VARS db
1646
+ _7Z_DECODER_CRYPRO_VARS
1647
+ );
1648
+ if (ThereIsHeaderError)
1649
+ db.ThereIsHeaderError = true;
1650
+ if (res == E_NOTIMPL)
1651
+ ThrowUnsupported();
1652
+ return res;
1653
+ }
1654
+ catch(CUnsupportedFeatureException &)
1655
+ {
1656
+ db.UnsupportedFeatureError = true;
1657
+ return S_FALSE;
1658
+ }
1659
+ catch(CInArchiveException &)
1660
+ {
1661
+ db.ThereIsHeaderError = true;
1662
+ return S_FALSE;
1663
+ }
1664
+ }
1665
+
1666
+ }}