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,1152 @@
1
+ //compress_plugin_demo.h
2
+ // compress plugin demo for HDiffz
3
+ /*
4
+ The MIT License (MIT)
5
+ Copyright (c) 2012-2017 HouSisong
6
+
7
+ Permission is hereby granted, free of charge, to any person
8
+ obtaining a copy of this software and associated documentation
9
+ files (the "Software"), to deal in the Software without
10
+ restriction, including without limitation the rights to use,
11
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the
13
+ Software is furnished to do so, subject to the following
14
+ conditions:
15
+
16
+ The above copyright notice and this permission notice shall be
17
+ included in all copies of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26
+ OTHER DEALINGS IN THE SOFTWARE.
27
+ */
28
+ #ifndef HDiff_compress_plugin_demo_h
29
+ #define HDiff_compress_plugin_demo_h
30
+ //compress plugin demo:
31
+ // zlibCompressPlugin
32
+ // pzlibCompressPlugin
33
+ // bz2CompressPlugin
34
+ // pbz2CompressPlugin
35
+ // lzmaCompressPlugin
36
+ // lzma2CompressPlugin
37
+ // lz4CompressPlugin
38
+ // lz4hcCompressPlugin
39
+ // zstdCompressPlugin
40
+ // brotliCompressPlugin
41
+ // lzhamCompressPlugin
42
+
43
+ #include "libHDiffPatch/HDiff/diff_types.h"
44
+ #include "compress_parallel.h"
45
+ #include <stdio.h>
46
+ #ifdef __cplusplus
47
+ extern "C" {
48
+ #endif
49
+
50
+ #ifndef kDefaultCompressThreadNumber
51
+ #if (_IS_USED_MULTITHREAD)
52
+ # define kDefaultCompressThreadNumber 4
53
+ #else
54
+ # define kDefaultCompressThreadNumber 1
55
+ #endif
56
+ #endif
57
+
58
+ #ifndef kCompressBufSize
59
+ # define kCompressBufSize (1024*32)
60
+ #endif
61
+ #ifndef _IsNeedIncludeDefaultCompressHead
62
+ # define _IsNeedIncludeDefaultCompressHead 1
63
+ #endif
64
+ #define kCompressFailResult 0
65
+ #define _compress_error_return(_errAt) do{ \
66
+ result=kCompressFailResult; \
67
+ if (strlen(errAt)==0) errAt=_errAt; \
68
+ goto clear; } while(0)
69
+
70
+ #ifndef IS_NOTICE_compress_canceled
71
+ # define IS_NOTICE_compress_canceled 1
72
+ #endif
73
+ #ifndef IS_REUSE_compress_handle
74
+ # define IS_REUSE_compress_handle 0
75
+ #endif
76
+
77
+
78
+ #define _check_compress_result(result,outStream_isCanceled,_at,_errAt) \
79
+ if ((result)==kCompressFailResult){ \
80
+ if (outStream_isCanceled){ \
81
+ if (IS_NOTICE_compress_canceled) \
82
+ printf(" (NOTICE: " _at " is canceled, warning.)\n"); \
83
+ }else{ \
84
+ printf(" (NOTICE: " _at " is canceled, %s ERROR!)\n",_errAt); \
85
+ } \
86
+ }
87
+
88
+ #define _stream_out_code_write(out_code,isCanceled,writePos,buf,len) { \
89
+ if (!out_code->write(out_code,writePos,buf,buf+len)){ \
90
+ isCanceled=1; \
91
+ _compress_error_return("out_code->write()");\
92
+ } \
93
+ writePos+=len; }
94
+
95
+ #define _def_fun_compressType(_fun_name,cstr) \
96
+ static const char* _fun_name(void){ \
97
+ static const char* kCompressType=cstr; \
98
+ return kCompressType; \
99
+ }
100
+
101
+ hpatch_inline static
102
+ hpatch_StreamPos_t _default_maxCompressedSize(hpatch_StreamPos_t dataSize){
103
+ hpatch_StreamPos_t result=dataSize+(dataSize>>3)+1024*2;
104
+ assert(result>dataSize);
105
+ return result;
106
+ }
107
+ hpatch_inline static
108
+ int _default_setParallelThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
109
+ return 1;
110
+ }
111
+
112
+ #ifdef _CompressPlugin_zlib
113
+ #if (_IsNeedIncludeDefaultCompressHead)
114
+ # include "zlib.h" // http://zlib.net/ https://github.com/madler/zlib
115
+ #endif
116
+ typedef struct{
117
+ hdiff_TCompress base;
118
+ int compress_level; //0..9
119
+ int mem_level;
120
+ signed char windowBits;
121
+ hpatch_BOOL isNeedSaveWindowBits;
122
+ int strategy;
123
+ } TCompressPlugin_zlib;
124
+ typedef struct _zlib_TCompress{
125
+ const hpatch_TStreamOutput* out_code;
126
+ unsigned char* c_buf;
127
+ size_t c_buf_size;
128
+ z_stream c_stream;
129
+ } _zlib_TCompress;
130
+
131
+ static _zlib_TCompress* _zlib_compress_open_by(const hdiff_TCompress* compressPlugin,
132
+ int compressLevel,int compressMemLevel,
133
+ const hpatch_TStreamOutput* out_code,
134
+ unsigned char* _mem_buf,size_t _mem_buf_size){
135
+ const TCompressPlugin_zlib* plugin=(const TCompressPlugin_zlib*)compressPlugin;
136
+ _zlib_TCompress* self=0;
137
+
138
+ self=(_zlib_TCompress*)_hpatch_align_upper(_mem_buf,sizeof(hpatch_StreamPos_t));
139
+ assert((_mem_buf+_mem_buf_size)>((unsigned char*)self+sizeof(_zlib_TCompress)));
140
+ _mem_buf_size=(_mem_buf+_mem_buf_size)-((unsigned char*)self+sizeof(_zlib_TCompress));
141
+ _mem_buf=(unsigned char*)self+sizeof(_zlib_TCompress);
142
+
143
+ memset(self,0,sizeof(_zlib_TCompress));
144
+ self->c_buf=_mem_buf;
145
+ self->c_buf_size=_mem_buf_size;
146
+ self->out_code=out_code;
147
+
148
+ self->c_stream.next_out = (Bytef*)_mem_buf;
149
+ self->c_stream.avail_out = (uInt)_mem_buf_size;
150
+ if (Z_OK!=deflateInit2(&self->c_stream,compressLevel,Z_DEFLATED,
151
+ plugin->windowBits,compressMemLevel,plugin->strategy))
152
+ return 0;
153
+ return self;
154
+ }
155
+ static int _zlib_compress_close_by(const hdiff_TCompress* compressPlugin,_zlib_TCompress* self){
156
+ int result=1;//true;
157
+ if (!self) return result;
158
+ if (self->c_stream.state!=0){
159
+ int ret=deflateEnd(&self->c_stream);
160
+ result=(Z_OK==ret);
161
+ }
162
+ memset(self,0,sizeof(_zlib_TCompress));
163
+ return result;
164
+ }
165
+ static int _zlib_compress_part(_zlib_TCompress* self,
166
+ const unsigned char* part_data,const unsigned char* part_data_end,
167
+ int is_data_end,hpatch_StreamPos_t* curWritedPos,int* outStream_isCanceled){
168
+ int result=1; //true
169
+ const char* errAt="";
170
+ int is_stream_end=0;
171
+ int is_eof=0;
172
+ assert(part_data<=part_data_end);
173
+ self->c_stream.next_in=(Bytef*)part_data;
174
+ self->c_stream.avail_in=(uInt)(part_data_end-part_data);
175
+ while (1) {
176
+ if ((self->c_stream.avail_out<self->c_buf_size)|is_stream_end){
177
+ size_t writeLen=self->c_buf_size-self->c_stream.avail_out;
178
+ if (writeLen>0){
179
+ _stream_out_code_write(self->out_code,*outStream_isCanceled,
180
+ (*curWritedPos),self->c_buf,writeLen);
181
+ }
182
+ self->c_stream.next_out=(Bytef*)self->c_buf;
183
+ self->c_stream.avail_out=(uInt)self->c_buf_size;
184
+ if (is_stream_end)
185
+ break;//end loop
186
+ }else{
187
+ if (self->c_stream.avail_in>0){
188
+ if (Z_OK!=deflate(&self->c_stream,Z_NO_FLUSH)) _compress_error_return("deflate()");
189
+ }else if (is_eof){
190
+ int ret=deflate(&self->c_stream,Z_FINISH);
191
+ is_stream_end= (ret==Z_STREAM_END);
192
+ if ((ret!=Z_STREAM_END)&&(ret!=Z_OK))
193
+ _compress_error_return("deflate() Z_FINISH");
194
+ }else{
195
+ if (!is_data_end)
196
+ break;//part ok
197
+ else
198
+ is_eof=1;
199
+ }
200
+ }
201
+ }
202
+ clear:
203
+ _check_compress_result(result,*outStream_isCanceled,"_zlib_compress_part()",errAt);
204
+ return result;
205
+ }
206
+
207
+ static hpatch_StreamPos_t _zlib_compress(const hdiff_TCompress* compressPlugin,
208
+ const hpatch_TStreamOutput* out_code,
209
+ const hpatch_TStreamInput* in_data){
210
+ const TCompressPlugin_zlib* plugin=(const TCompressPlugin_zlib*)compressPlugin;
211
+ hpatch_StreamPos_t result=0; //writedPos
212
+ hpatch_StreamPos_t readFromPos=0;
213
+ const char* errAt="";
214
+ int outStream_isCanceled=0;
215
+ unsigned char* _temp_buf=0;
216
+ unsigned char* data_buf=0;
217
+ _zlib_TCompress* self=0;
218
+ _temp_buf=(unsigned char*)malloc(sizeof(_zlib_TCompress)+kCompressBufSize*2);
219
+ if (!_temp_buf) _compress_error_return("memory alloc");
220
+ self=_zlib_compress_open_by(compressPlugin,plugin->compress_level,plugin->mem_level,
221
+ out_code,_temp_buf,sizeof(_zlib_TCompress)+kCompressBufSize);
222
+ data_buf=_temp_buf+sizeof(_zlib_TCompress)+kCompressBufSize;
223
+ if (!self) _compress_error_return("deflateInit2()");
224
+ if (plugin->isNeedSaveWindowBits){
225
+ unsigned char* pchar=(unsigned char*)&plugin->windowBits;
226
+ if (!out_code->write(out_code,0,pchar,pchar+1)) _compress_error_return("out_code->write()");
227
+ ++result;
228
+ }
229
+ do {
230
+ size_t readLen=kCompressBufSize;
231
+ if (readLen>(hpatch_StreamPos_t)(in_data->streamSize-readFromPos))
232
+ readLen=(size_t)(in_data->streamSize-readFromPos);
233
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+readLen))
234
+ _compress_error_return("in_data->read()");
235
+ readFromPos+=readLen;
236
+ if (!_zlib_compress_part(self,data_buf,data_buf+readLen,
237
+ (readFromPos==in_data->streamSize),&result,&outStream_isCanceled))
238
+ _compress_error_return("_zlib_compress_part()");
239
+ } while (readFromPos<in_data->streamSize);
240
+ clear:
241
+ if (!_zlib_compress_close_by(compressPlugin,self))
242
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="deflateEnd()"; }
243
+ _check_compress_result(result,outStream_isCanceled,"_zlib_compress()",errAt);
244
+ if (_temp_buf) free(_temp_buf);
245
+ return result;
246
+ }
247
+ _def_fun_compressType(_zlib_compressType,"zlib");
248
+ static const TCompressPlugin_zlib zlibCompressPlugin={
249
+ {_zlib_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_zlib_compress},
250
+ 9,8,-MAX_WBITS,hpatch_TRUE,Z_DEFAULT_STRATEGY};
251
+
252
+ # if (_IS_USED_MULTITHREAD)
253
+ //pzlib
254
+ typedef struct {
255
+ TCompressPlugin_zlib base;
256
+ int thread_num; // 1..
257
+ hdiff_TParallelCompress pc;
258
+ } TCompressPlugin_pzlib;
259
+ static int _pzlib_setThreadNum(hdiff_TCompress* compressPlugin,int threadNum){
260
+ TCompressPlugin_pzlib* plugin=(TCompressPlugin_pzlib*)compressPlugin;
261
+ plugin->thread_num=threadNum;
262
+ return threadNum;
263
+ }
264
+ static hdiff_compressBlockHandle _pzlib_openBlockCompressor(hdiff_TParallelCompress* pc){
265
+ return pc;
266
+ }
267
+ static void _pzlib_closeBlockCompressor(hdiff_TParallelCompress* pc,
268
+ hdiff_compressBlockHandle blockCompressor){
269
+ assert(blockCompressor==pc);
270
+ }
271
+ static int _pzlib_compress2(Bytef* dest,uLongf* destLen,const Bytef* source,uLong sourceLen,
272
+ int level,int mem_level,int windowBits){
273
+ z_stream stream;
274
+ int err;
275
+ stream.next_in = (Bytef *)source;
276
+ stream.avail_in = (uInt)sourceLen;
277
+ stream.next_out = dest;
278
+ stream.avail_out = (uInt)*destLen;
279
+ stream.zalloc = 0;
280
+ stream.zfree = 0;
281
+ stream.opaque = 0;
282
+ err = deflateInit2(&stream,level,Z_DEFLATED,windowBits,mem_level,Z_DEFAULT_STRATEGY);
283
+ if (err != Z_OK) return err;
284
+ err = deflate(&stream, Z_FINISH);
285
+ if (err != Z_STREAM_END){
286
+ deflateEnd(&stream);
287
+ return err == Z_OK ? Z_BUF_ERROR : err;
288
+ }
289
+ *destLen = stream.total_out;
290
+ err = deflateEnd(&stream);
291
+ return err;
292
+ }
293
+ static
294
+ size_t _pzlib_compressBlock(hdiff_TParallelCompress* pc,hdiff_compressBlockHandle blockCompressor,
295
+ hpatch_StreamPos_t blockIndex,unsigned char* out_code,unsigned char* out_codeEnd,
296
+ const unsigned char* block_data,const unsigned char* block_dataEnd){
297
+ const TCompressPlugin_pzlib* plugin=(const TCompressPlugin_pzlib*)pc->import;
298
+ hpatch_BOOL isAdding=(blockIndex==0)&&(plugin->base.isNeedSaveWindowBits);
299
+ if (isAdding){
300
+ if (out_code>=out_codeEnd) return 0;//error;
301
+ out_code[0]=plugin->base.windowBits;
302
+ ++out_code;
303
+ }
304
+ uLongf codeLen=(uLongf)(out_codeEnd-out_code);
305
+ if (Z_OK!=_pzlib_compress2(out_code,&codeLen,block_data,(uLong)(block_dataEnd-block_data),
306
+ plugin->base.compress_level,plugin->base.mem_level,plugin->base.windowBits))
307
+ return 0; //error
308
+ return codeLen+(isAdding?1:0);
309
+ }
310
+ static hpatch_StreamPos_t _pzlib_compress(const hdiff_TCompress* compressPlugin,
311
+ const hpatch_TStreamOutput* out_code,
312
+ const hpatch_TStreamInput* in_data){
313
+ TCompressPlugin_pzlib* plugin=(TCompressPlugin_pzlib*)compressPlugin;
314
+ const size_t blockSize=(plugin->base.compress_level>1)?
315
+ 1024*128*(plugin->base.compress_level-1):1024*128;
316
+ if ((plugin->thread_num<=1)||(plugin->base.compress_level==0)
317
+ ||(in_data->streamSize<blockSize*2)){ //same as "zlib"
318
+ return _zlib_compress(compressPlugin,out_code,in_data);
319
+ }else{
320
+ plugin->pc.import=plugin;
321
+ return parallel_compress_blocks(&plugin->pc,plugin->thread_num,blockSize,out_code,in_data);
322
+ }
323
+ }
324
+
325
+ _def_fun_compressType(_pzlib_compressType,"pzlib");
326
+ static const TCompressPlugin_pzlib pzlibCompressPlugin={
327
+ { {_pzlib_compressType,_default_maxCompressedSize,_pzlib_setThreadNum,_pzlib_compress},
328
+ 6,8,-MAX_WBITS,hpatch_TRUE,Z_DEFAULT_STRATEGY},
329
+ kDefaultCompressThreadNumber ,{0,_default_maxCompressedSize,_pzlib_openBlockCompressor,
330
+ _pzlib_closeBlockCompressor,_pzlib_compressBlock} };
331
+ # endif // _IS_USED_MULTITHREAD
332
+ #endif//_CompressPlugin_zlib
333
+
334
+ #ifdef _CompressPlugin_bz2
335
+ #if (_IsNeedIncludeDefaultCompressHead)
336
+ # include "bzlib.h" // http://www.bzip.org/ https://github.com/sisong/bzip2
337
+ #endif
338
+ typedef struct{
339
+ hdiff_TCompress base;
340
+ int compress_level; //0..9
341
+ } TCompressPlugin_bz2;
342
+ static hpatch_StreamPos_t _bz2_compress(const hdiff_TCompress* compressPlugin,
343
+ const hpatch_TStreamOutput* out_code,
344
+ const hpatch_TStreamInput* in_data){
345
+ const TCompressPlugin_bz2* plugin=(const TCompressPlugin_bz2*)compressPlugin;
346
+ hpatch_StreamPos_t result=0;
347
+ const char* errAt="";
348
+ unsigned char* _temp_buf=0;
349
+ bz_stream s;
350
+ unsigned char* code_buf,* data_buf;
351
+ int is_eof=0;
352
+ int is_stream_end=0;
353
+ hpatch_StreamPos_t readFromPos=0;
354
+ int outStream_isCanceled=0;
355
+ memset(&s,0,sizeof(s));
356
+
357
+ _temp_buf=(unsigned char*)malloc(kCompressBufSize*2);
358
+ if (!_temp_buf) _compress_error_return("memory alloc");
359
+ code_buf=_temp_buf;
360
+ data_buf=_temp_buf+kCompressBufSize;
361
+ s.next_out = (char*)code_buf;
362
+ s.avail_out = kCompressBufSize;
363
+ if (BZ_OK!=BZ2_bzCompressInit(&s,plugin->compress_level, 0, 0))
364
+ _compress_error_return("BZ2_bzCompressInit()");
365
+ while (1) {
366
+ if ((s.avail_out<kCompressBufSize)|is_stream_end){
367
+ size_t writeLen=kCompressBufSize-s.avail_out;
368
+ if (writeLen>0){
369
+ _stream_out_code_write(out_code,outStream_isCanceled,result,code_buf,writeLen);
370
+ }
371
+ s.next_out=(char*)code_buf;
372
+ s.avail_out=kCompressBufSize;
373
+ if (is_stream_end)
374
+ break;//end loop
375
+ }else{
376
+ if (s.avail_in>0){
377
+ if (BZ_RUN_OK!=BZ2_bzCompress(&s,BZ_RUN)) _compress_error_return("BZ2_bzCompress()");
378
+ }else if (is_eof){
379
+ int ret=BZ2_bzCompress(&s,BZ_FINISH);
380
+ is_stream_end= (ret==BZ_STREAM_END);
381
+ if ((ret!=BZ_STREAM_END)&&(ret!=BZ_FINISH_OK))
382
+ _compress_error_return("BZ2_bzCompress() BZ_FINISH");
383
+ }else{
384
+ size_t readLen=kCompressBufSize;
385
+ if (readFromPos+readLen>in_data->streamSize)
386
+ readLen=(size_t)(in_data->streamSize-readFromPos);
387
+ if (readLen==0){
388
+ is_eof=1;
389
+ }else{
390
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+readLen))
391
+ _compress_error_return("in_data->read()");
392
+ readFromPos+=readLen;
393
+ s.next_in=(char*)data_buf;
394
+ s.avail_in=(unsigned int)readLen;
395
+ }
396
+ }
397
+ }
398
+ }
399
+ clear:
400
+ if (BZ_OK!=BZ2_bzCompressEnd(&s))
401
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="BZ2_bzCompressEnd()"; }
402
+ _check_compress_result(result,outStream_isCanceled,"_bz2_compress()",errAt);
403
+ if (_temp_buf) free(_temp_buf);
404
+ return result;
405
+ }
406
+ _def_fun_compressType(_bz2_compressType,"bz2");
407
+ static const TCompressPlugin_bz2 bz2CompressPlugin={
408
+ {_bz2_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_bz2_compress}, 9};
409
+
410
+ # if (_IS_USED_MULTITHREAD)
411
+ //pbz2
412
+ typedef struct{
413
+ TCompressPlugin_bz2 base;
414
+ int thread_num; // 1..
415
+ hdiff_TParallelCompress pc;
416
+ } TCompressPlugin_pbz2;
417
+ static int _pbz2_setThreadNum(hdiff_TCompress* compressPlugin,int threadNum){
418
+ TCompressPlugin_pbz2* plugin=(TCompressPlugin_pbz2*)compressPlugin;
419
+ plugin->thread_num=threadNum;
420
+ return threadNum;
421
+ }
422
+ static hdiff_compressBlockHandle _pbz2_openBlockCompressor(hdiff_TParallelCompress* pc){
423
+ return pc;
424
+ }
425
+ static void _pbz2_closeBlockCompressor(hdiff_TParallelCompress* pc,
426
+ hdiff_compressBlockHandle blockCompressor){
427
+ assert(blockCompressor==pc);
428
+ }
429
+ static
430
+ size_t _pbz2_compressBlock(hdiff_TParallelCompress* pc,hdiff_compressBlockHandle blockCompressor,
431
+ hpatch_StreamPos_t blockIndex,unsigned char* out_code,unsigned char* out_codeEnd,
432
+ const unsigned char* block_data,const unsigned char* block_dataEnd){
433
+ const TCompressPlugin_pbz2* plugin=(const TCompressPlugin_pbz2*)pc->import;
434
+ unsigned int codeLen=(unsigned int)(out_codeEnd-out_code);
435
+ if (BZ_OK!=BZ2_bzBuffToBuffCompress((char*)out_code,&codeLen,(char*)block_data,
436
+ (unsigned int)(block_dataEnd-block_data),
437
+ plugin->base.compress_level,0,0)) return 0; //error
438
+ return codeLen;
439
+ }
440
+ static hpatch_StreamPos_t _pbz2_compress(const hdiff_TCompress* compressPlugin,
441
+ const hpatch_TStreamOutput* out_code,
442
+ const hpatch_TStreamInput* in_data){
443
+ TCompressPlugin_pbz2* plugin=(TCompressPlugin_pbz2*)compressPlugin;
444
+ const size_t blockSize=plugin->base.compress_level*100000;
445
+ if ((plugin->thread_num<=1)||(plugin->base.compress_level==0)
446
+ ||(in_data->streamSize<blockSize*2)){ //same as "bz2"
447
+ return _bz2_compress(compressPlugin,out_code,in_data);
448
+ }else{
449
+ plugin->pc.import=plugin;
450
+ return parallel_compress_blocks(&plugin->pc,plugin->thread_num,blockSize,out_code,in_data);
451
+ }
452
+ }
453
+
454
+ _def_fun_compressType(_pbz2_compressType,"pbz2");
455
+ static const TCompressPlugin_pbz2 pbz2CompressPlugin={
456
+ { {_pbz2_compressType,_default_maxCompressedSize,_pbz2_setThreadNum,_pbz2_compress}, 8},
457
+ kDefaultCompressThreadNumber ,{0,_default_maxCompressedSize,_pbz2_openBlockCompressor,
458
+ _pbz2_closeBlockCompressor,_pbz2_compressBlock} };
459
+ # endif // _IS_USED_MULTITHREAD
460
+ #endif//_CompressPlugin_bz2
461
+
462
+
463
+ #if (defined _CompressPlugin_lzma)||(defined _CompressPlugin_lzma2)
464
+ #if (_IsNeedIncludeDefaultCompressHead)
465
+ # include "LzmaEnc.h" // "lzma/C/LzmaEnc.h" https://github.com/sisong/lzma
466
+ # ifdef _CompressPlugin_lzma2
467
+ # include "Lzma2Enc.h"
468
+ # endif
469
+ #endif
470
+ static void * __lzma_enc_Alloc(ISzAllocPtr p, size_t size){
471
+ return malloc(size);
472
+ }
473
+ static void __lzma_enc_Free(ISzAllocPtr p, void *address){
474
+ free(address);
475
+ }
476
+ static ISzAlloc __lzma_enc_alloc={__lzma_enc_Alloc,__lzma_enc_Free};
477
+
478
+ struct __lzma_SeqOutStream_t{
479
+ ISeqOutStream base;
480
+ const hpatch_TStreamOutput* out_code;
481
+ hpatch_StreamPos_t writeToPos;
482
+ int isCanceled;
483
+ };
484
+ static size_t __lzma_SeqOutStream_Write(const ISeqOutStream *p, const void *buf, size_t size){
485
+ __lzma_SeqOutStream_t* self=(__lzma_SeqOutStream_t*)p;
486
+ const unsigned char* pdata=(const unsigned char*)buf;
487
+ if (size>0){
488
+ if (!self->out_code->write(self->out_code,self->writeToPos,pdata,pdata+size)){
489
+ self->isCanceled=1;
490
+ return 0;
491
+ }
492
+ }
493
+ self->writeToPos+=size;
494
+ return size;
495
+ }
496
+ struct __lzma_SeqInStream_t{
497
+ ISeqInStream base;
498
+ const hpatch_TStreamInput* in_data;
499
+ hpatch_StreamPos_t readFromPos;
500
+ };
501
+ static SRes __lzma_SeqInStream_Read(const ISeqInStream *p, void *buf, size_t *size){
502
+ __lzma_SeqInStream_t* self=(__lzma_SeqInStream_t*)p;
503
+ size_t readLen=*size;
504
+ if (readLen+self->readFromPos>self->in_data->streamSize)
505
+ readLen=(size_t)(self->in_data->streamSize-self->readFromPos);
506
+ if (readLen>0){
507
+ unsigned char* pdata=(unsigned char*)buf;
508
+ if (!self->in_data->read(self->in_data,self->readFromPos,pdata,pdata+readLen)){
509
+ *size=0;
510
+ return SZ_ERROR_READ;
511
+ }
512
+ }
513
+ self->readFromPos+=readLen;
514
+ *size=readLen;
515
+ return SZ_OK;
516
+ }
517
+ #endif
518
+
519
+ #ifdef _CompressPlugin_lzma
520
+ typedef struct{
521
+ hdiff_TCompress base;
522
+ int compress_level; //0..9
523
+ UInt32 dict_size; //patch decompress need 4*lzma_dictSize memroy
524
+ int thread_num; //1..2
525
+ } TCompressPlugin_lzma;
526
+ static int _lzma_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
527
+ TCompressPlugin_lzma* plugin=(TCompressPlugin_lzma*)compressPlugin;
528
+ if (threadNum>2) threadNum=2;
529
+ plugin->thread_num=threadNum;
530
+ return threadNum;
531
+ }
532
+ static hpatch_StreamPos_t _lzma_compress(const hdiff_TCompress* compressPlugin,
533
+ const hpatch_TStreamOutput* out_code,
534
+ const hpatch_TStreamInput* in_data){
535
+ const TCompressPlugin_lzma* plugin=(const TCompressPlugin_lzma*)compressPlugin;
536
+ struct __lzma_SeqOutStream_t outStream={{__lzma_SeqOutStream_Write},out_code,0,0};
537
+ struct __lzma_SeqInStream_t inStream={{__lzma_SeqInStream_Read},in_data,0};
538
+ hpatch_StreamPos_t result=0;
539
+ const char* errAt="";
540
+ #if (IS_REUSE_compress_handle)
541
+ static CLzmaEncHandle s=0;
542
+ #else
543
+ CLzmaEncHandle s=0;
544
+ #endif
545
+ CLzmaEncProps props;
546
+ unsigned char properties_buf[LZMA_PROPS_SIZE+1];
547
+ SizeT properties_size=LZMA_PROPS_SIZE;
548
+ SRes ret;
549
+ hpatch_uint32_t dictSize=plugin->dict_size;
550
+ if (!s) s=LzmaEnc_Create(&__lzma_enc_alloc);
551
+ if (!s) _compress_error_return("LzmaEnc_Create()");
552
+ LzmaEncProps_Init(&props);
553
+ props.level=plugin->compress_level;
554
+ props.dictSize=dictSize;
555
+ props.reduceSize=in_data->streamSize;
556
+ props.numThreads=plugin->thread_num;
557
+ LzmaEncProps_Normalize(&props);
558
+ if (SZ_OK!=LzmaEnc_SetProps(s,&props)) _compress_error_return("LzmaEnc_SetProps()");
559
+ # if (IS_NOTICE_compress_canceled)
560
+ printf(" (used one lzma dictSize: %" PRIu64 " (input data: %" PRIu64 "))\n",
561
+ (hpatch_StreamPos_t)props.dictSize,in_data->streamSize);
562
+ # endif
563
+
564
+ //save properties_size+properties
565
+ assert(LZMA_PROPS_SIZE<256);
566
+ if (SZ_OK!=LzmaEnc_WriteProperties(s,properties_buf+1,&properties_size))
567
+ _compress_error_return("LzmaEnc_WriteProperties()");
568
+ properties_buf[0]=(unsigned char)properties_size;
569
+
570
+ if (1+properties_size!=__lzma_SeqOutStream_Write(&outStream.base,properties_buf,1+properties_size))
571
+ _compress_error_return("out_code->write()");
572
+
573
+ ret=LzmaEnc_Encode(s,&outStream.base,&inStream.base,0,&__lzma_enc_alloc,&__lzma_enc_alloc);
574
+ if (SZ_OK==ret){
575
+ result=outStream.writeToPos;
576
+ }else{//fail
577
+ if (ret==SZ_ERROR_READ)
578
+ _compress_error_return("in_data->read()");
579
+ else if (ret==SZ_ERROR_WRITE)
580
+ _compress_error_return("out_code->write()");
581
+ else
582
+ _compress_error_return("LzmaEnc_Encode()");
583
+ }
584
+ clear:
585
+ #if (!IS_REUSE_compress_handle)
586
+ if (s) LzmaEnc_Destroy(s,&__lzma_enc_alloc,&__lzma_enc_alloc);
587
+ #endif
588
+ _check_compress_result(result,outStream.isCanceled,"_lzma_compress()",errAt);
589
+ return result;
590
+ }
591
+ _def_fun_compressType(_lzma_compressType,"lzma");
592
+ static const TCompressPlugin_lzma lzmaCompressPlugin={
593
+ {_lzma_compressType,_default_maxCompressedSize,_lzma_setThreadNumber,_lzma_compress},
594
+ 7,(1<<23),(kDefaultCompressThreadNumber>=2)?2:kDefaultCompressThreadNumber};
595
+ #endif//_CompressPlugin_lzma
596
+
597
+ #ifdef _CompressPlugin_lzma2
598
+ #if (_IsNeedIncludeDefaultCompressHead)
599
+ # include "MtCoder.h" // // "lzma/C/MtCoder.h" for MTCODER__THREADS_MAX
600
+ #endif
601
+ struct TCompressPlugin_lzma2{
602
+ hdiff_TCompress base;
603
+ int compress_level; //0..9
604
+ UInt32 dict_size; //patch decompress need 4*lzma_dictSize memroy
605
+ int thread_num; //1..(64?)
606
+ };
607
+ static int _lzma2_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
608
+ TCompressPlugin_lzma2* plugin=(TCompressPlugin_lzma2*)compressPlugin;
609
+ if (threadNum>MTCODER__THREADS_MAX) threadNum=MTCODER__THREADS_MAX;
610
+ plugin->thread_num=threadNum;
611
+ return threadNum;
612
+ }
613
+ static hpatch_StreamPos_t _lzma2_compress(const hdiff_TCompress* compressPlugin,
614
+ const hpatch_TStreamOutput* out_code,
615
+ const hpatch_TStreamInput* in_data){
616
+ const TCompressPlugin_lzma2* plugin=(const TCompressPlugin_lzma2*)compressPlugin;
617
+ struct __lzma_SeqOutStream_t outStream={{__lzma_SeqOutStream_Write},out_code,0,0};
618
+ struct __lzma_SeqInStream_t inStream={{__lzma_SeqInStream_Read},in_data,0};
619
+ hpatch_StreamPos_t result=0;
620
+ const char* errAt="";
621
+ #if (IS_REUSE_compress_handle)
622
+ static CLzma2EncHandle s=0;
623
+ #else
624
+ CLzma2EncHandle s=0;
625
+ #endif
626
+ CLzma2EncProps props;
627
+ Byte properties_size=0;
628
+ SRes ret;
629
+ hpatch_uint32_t dictSize=plugin->dict_size;
630
+ if (!s) s=Lzma2Enc_Create(&__lzma_enc_alloc,&__lzma_enc_alloc);
631
+ if (!s) _compress_error_return("LzmaEnc_Create()");
632
+ Lzma2EncProps_Init(&props);
633
+ props.lzmaProps.level=plugin->compress_level;
634
+ props.lzmaProps.dictSize=dictSize;
635
+ props.lzmaProps.reduceSize=in_data->streamSize;
636
+ props.blockSize=LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO;
637
+ props.numTotalThreads=plugin->thread_num;
638
+ Lzma2EncProps_Normalize(&props);
639
+ if (SZ_OK!=Lzma2Enc_SetProps(s,&props)) _compress_error_return("Lzma2Enc_SetProps()");
640
+ # if (IS_NOTICE_compress_canceled)
641
+ printf(" (used one lzma2 dictSize: %" PRIu64 " (input data: %" PRIu64 "))\n",
642
+ (hpatch_StreamPos_t)props.lzmaProps.dictSize,in_data->streamSize);
643
+ # endif
644
+
645
+ //save properties_size+properties
646
+ assert(LZMA_PROPS_SIZE<256);
647
+ properties_size=Lzma2Enc_WriteProperties(s);
648
+
649
+ if (1!=__lzma_SeqOutStream_Write(&outStream.base,&properties_size,1))
650
+ _compress_error_return("out_code->write()");
651
+
652
+ ret=Lzma2Enc_Encode2(s,&outStream.base,0,0,&inStream.base,0,0,0);
653
+ if (SZ_OK==ret){
654
+ result=outStream.writeToPos;
655
+ }else{//fail
656
+ if (ret==SZ_ERROR_READ)
657
+ _compress_error_return("in_data->read()");
658
+ else if (ret==SZ_ERROR_WRITE)
659
+ _compress_error_return("out_code->write()");
660
+ else
661
+ _compress_error_return("Lzma2Enc_Encode2()");
662
+ }
663
+ clear:
664
+ #if (!IS_REUSE_compress_handle)
665
+ if (s) Lzma2Enc_Destroy(s);
666
+ #endif
667
+ _check_compress_result(result,outStream.isCanceled,"_lzma2_compress()",errAt);
668
+ return result;
669
+ }
670
+ _def_fun_compressType(_lzma2_compressType,"lzma2");
671
+ static const TCompressPlugin_lzma2 lzma2CompressPlugin={
672
+ {_lzma2_compressType,_default_maxCompressedSize,_lzma2_setThreadNumber,_lzma2_compress},
673
+ 7,(1<<23),kDefaultCompressThreadNumber};
674
+ #endif//_CompressPlugin_lzma2
675
+
676
+
677
+ #if (defined(_CompressPlugin_lz4) || defined(_CompressPlugin_lz4hc))
678
+ #if (_IsNeedIncludeDefaultCompressHead)
679
+ # include "lz4.h" // "lz4/lib/lz4.h" https://github.com/lz4/lz4
680
+ # include "lz4hc.h"
681
+ #endif
682
+ struct TCompressPlugin_lz4{
683
+ hdiff_TCompress base;
684
+ int compress_level; //1..50 default 50
685
+ };
686
+ struct TCompressPlugin_lz4hc{
687
+ hdiff_TCompress base;
688
+ int compress_level; //3..12
689
+ };
690
+
691
+ #define _lz4_write_len4(out_code,isCanceled,writePos,len) { \
692
+ unsigned char _temp_buf4[4]; \
693
+ _temp_buf4[0]=(unsigned char)(len); \
694
+ _temp_buf4[1]=(unsigned char)((len)>>8); \
695
+ _temp_buf4[2]=(unsigned char)((len)>>16);\
696
+ _temp_buf4[3]=(unsigned char)((len)>>24);\
697
+ _stream_out_code_write(out_code,isCanceled,writePos,_temp_buf4,4); \
698
+ }
699
+ static hpatch_StreamPos_t _lz4_compress(const hdiff_TCompress* compressPlugin,
700
+ const hpatch_TStreamOutput* out_code,
701
+ const hpatch_TStreamInput* in_data){
702
+ const TCompressPlugin_lz4* plugin=(const TCompressPlugin_lz4*)compressPlugin;
703
+ const int kLZ4DefaultAcceleration=50-(plugin->compress_level-1);
704
+ hpatch_StreamPos_t result=0;
705
+ const char* errAt="";
706
+ unsigned char* _temp_buf=0;
707
+ unsigned char* code_buf,* data_buf,* data_buf_back;
708
+ LZ4_stream_t* s=0;
709
+ hpatch_StreamPos_t readFromPos=0;
710
+ int outStream_isCanceled=0;
711
+ int kLz4CompressBufSize =1024*510; //patch decompress need 4*2*0.5MB memroy
712
+ int code_buf_size;
713
+ if ((size_t)kLz4CompressBufSize>in_data->streamSize)
714
+ kLz4CompressBufSize=(int)in_data->streamSize;
715
+ code_buf_size=LZ4_compressBound(kLz4CompressBufSize);
716
+
717
+ _temp_buf=(unsigned char*)malloc(kLz4CompressBufSize*2+code_buf_size);
718
+ if (!_temp_buf) _compress_error_return("memory alloc");
719
+ data_buf_back=_temp_buf;
720
+ data_buf=_temp_buf+kLz4CompressBufSize;
721
+ code_buf=_temp_buf+kLz4CompressBufSize*2;
722
+
723
+ s=LZ4_createStream();
724
+ if (!s) _compress_error_return("LZ4_createStream()");
725
+ //out kLz4CompressBufSize
726
+ _lz4_write_len4(out_code,outStream_isCanceled,result,kLz4CompressBufSize);
727
+
728
+ while (1) {
729
+ int codeLen;
730
+ unsigned char* _swap=data_buf;
731
+ data_buf=data_buf_back;
732
+ data_buf_back=_swap;
733
+ int dataLen=kLz4CompressBufSize;
734
+ if ((size_t)dataLen>(in_data->streamSize-readFromPos))
735
+ dataLen=(int)(in_data->streamSize-readFromPos);
736
+ if (dataLen==0)
737
+ break;//finish
738
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+dataLen))
739
+ _compress_error_return("in_data->read()");
740
+ readFromPos+=dataLen;
741
+
742
+ codeLen=LZ4_compress_fast_continue(s,(const char*)data_buf,(char*)code_buf,
743
+ dataLen,code_buf_size,kLZ4DefaultAcceleration);
744
+ if (codeLen<=0) _compress_error_return("LZ4_compress_fast_continue()");
745
+ //out step codeLen
746
+ _lz4_write_len4(out_code,outStream_isCanceled,result,codeLen);
747
+ //out code
748
+ _stream_out_code_write(out_code,outStream_isCanceled,result,code_buf,codeLen);
749
+ }
750
+ clear:
751
+ if (0!=LZ4_freeStream(s))
752
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="LZ4_freeStream()"; }
753
+ _check_compress_result(result,outStream_isCanceled,"_lz4_compress()",errAt);
754
+ if (_temp_buf) free(_temp_buf);
755
+ return result;
756
+ }
757
+
758
+ static hpatch_StreamPos_t _lz4hc_compress(const hdiff_TCompress* compressPlugin,
759
+ const hpatch_TStreamOutput* out_code,
760
+ const hpatch_TStreamInput* in_data){
761
+ const TCompressPlugin_lz4hc* plugin=(const TCompressPlugin_lz4hc*)compressPlugin;
762
+ hpatch_StreamPos_t result=0;
763
+ const char* errAt="";
764
+ unsigned char* _temp_buf=0;
765
+ unsigned char* code_buf,* data_buf,* data_buf_back;
766
+ LZ4_streamHC_t* s=0;
767
+ hpatch_StreamPos_t readFromPos=0;
768
+ int outStream_isCanceled=0;
769
+ int kLz4CompressBufSize =1024*510; //patch decompress need 4*2*0.5MB memroy
770
+ int code_buf_size;
771
+ if ((size_t)kLz4CompressBufSize>in_data->streamSize)
772
+ kLz4CompressBufSize=(int)in_data->streamSize;
773
+ code_buf_size=LZ4_compressBound(kLz4CompressBufSize);
774
+
775
+ _temp_buf=(unsigned char*)malloc(kLz4CompressBufSize*2+code_buf_size);
776
+ if (!_temp_buf) _compress_error_return("memory alloc");
777
+ data_buf_back=_temp_buf;
778
+ data_buf=_temp_buf+kLz4CompressBufSize;
779
+ code_buf=_temp_buf+kLz4CompressBufSize*2;
780
+
781
+ s=LZ4_createStreamHC();
782
+ if (!s) _compress_error_return("LZ4_createStreamHC()");
783
+ LZ4_resetStreamHC(s,plugin->compress_level);
784
+ //out kLz4CompressBufSize
785
+ _lz4_write_len4(out_code,outStream_isCanceled,result,kLz4CompressBufSize);
786
+
787
+ while (1) {
788
+ int codeLen;
789
+ unsigned char* _swap=data_buf;
790
+ data_buf=data_buf_back;
791
+ data_buf_back=_swap;
792
+ int dataLen=kLz4CompressBufSize;
793
+ if ((size_t)dataLen>(in_data->streamSize-readFromPos))
794
+ dataLen=(int)(in_data->streamSize-readFromPos);
795
+ if (dataLen==0)
796
+ break;//finish
797
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+dataLen))
798
+ _compress_error_return("in_data->read()");
799
+ readFromPos+=dataLen;
800
+
801
+ codeLen=LZ4_compress_HC_continue(s,(const char*)data_buf,(char*)code_buf,
802
+ dataLen,code_buf_size);
803
+ if (codeLen<=0) _compress_error_return("LZ4_compress_HC_continue()");
804
+ //out step codeLen
805
+ _lz4_write_len4(out_code,outStream_isCanceled,result,codeLen);
806
+ //out code
807
+ _stream_out_code_write(out_code,outStream_isCanceled,result,code_buf,codeLen);
808
+ }
809
+ clear:
810
+ if (0!=LZ4_freeStreamHC(s))
811
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="LZ4_freeStreamHC()"; }
812
+ _check_compress_result(result,outStream_isCanceled,"_lz4hc_compress()",errAt);
813
+ if (_temp_buf) free(_temp_buf);
814
+ return result;
815
+ }
816
+
817
+ _def_fun_compressType(_lz4_compressType,"lz4");
818
+ static TCompressPlugin_lz4 lz4CompressPlugin={
819
+ {_lz4_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_lz4_compress}, 50};
820
+ static TCompressPlugin_lz4hc lz4hcCompressPlugin ={
821
+ {_lz4_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_lz4hc_compress}, 11};
822
+ #endif//_CompressPlugin_lz4 or _CompressPlugin_lz4hc
823
+
824
+
825
+ #ifdef _CompressPlugin_zstd
826
+ #if (_IsNeedIncludeDefaultCompressHead)
827
+ # include "zstd.h" // "zstd/lib/zstd.h" https://github.com/facebook/zstd
828
+ #endif
829
+ struct TCompressPlugin_zstd{
830
+ hdiff_TCompress base;
831
+ int compress_level; //0..22
832
+ int dict_bits; // 10..(30 or 31)
833
+ int thread_num; //1..(200?)
834
+ };
835
+ static int _zstd_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
836
+ TCompressPlugin_zstd* plugin=(TCompressPlugin_zstd*)compressPlugin;
837
+ #define ZSTDMT_NBWORKERS_MAX 200
838
+ if (threadNum>ZSTDMT_NBWORKERS_MAX) threadNum=ZSTDMT_NBWORKERS_MAX;
839
+ plugin->thread_num=threadNum;
840
+ return threadNum;
841
+ }
842
+ static hpatch_StreamPos_t _zstd_compress(const hdiff_TCompress* compressPlugin,
843
+ const hpatch_TStreamOutput* out_code,
844
+ const hpatch_TStreamInput* in_data){
845
+ const TCompressPlugin_zstd* plugin=(const TCompressPlugin_zstd*)compressPlugin;
846
+ hpatch_StreamPos_t result=0;
847
+ const char* errAt="";
848
+ unsigned char* _temp_buf=0;
849
+ ZSTD_inBuffer s_input;
850
+ ZSTD_outBuffer s_output;
851
+ #if (IS_REUSE_compress_handle)
852
+ static ZSTD_CStream* s=0;
853
+ #else
854
+ ZSTD_CStream* s=0;
855
+ #endif
856
+ hpatch_StreamPos_t readFromPos=0;
857
+ int outStream_isCanceled=0;
858
+ int dict_bits;
859
+ size_t ret;
860
+
861
+ s_input.size=ZSTD_CStreamInSize();
862
+ s_output.size=ZSTD_CStreamOutSize();
863
+ _temp_buf=(unsigned char*)malloc(s_input.size+s_output.size);
864
+ if (!_temp_buf) _compress_error_return("memory alloc");
865
+ s_input.src=_temp_buf;
866
+ s_output.dst=_temp_buf+s_input.size;
867
+
868
+ if (!s) s=ZSTD_createCStream();
869
+ if (!s) _compress_error_return("ZSTD_createCStream()");
870
+ ret=ZSTD_initCStream(s,plugin->compress_level);
871
+ if (ZSTD_isError(ret)) _compress_error_return("ZSTD_initCStream()");
872
+
873
+ #define _ZSTD_WINDOWLOG_MIN 10
874
+ dict_bits=plugin->dict_bits;
875
+ while (((((hpatch_StreamPos_t)1)<<(dict_bits-1)) >= in_data->streamSize)
876
+ &&((dict_bits-1)>=_ZSTD_WINDOWLOG_MIN)) {
877
+ --dict_bits;
878
+ }
879
+ ret=ZSTD_CCtx_setParameter(s, ZSTD_c_windowLog,plugin->dict_bits);
880
+ if (ZSTD_isError(ret)) _compress_error_return("ZSTD_CCtx_setParameter(,ZSTD_c_windowLog)");
881
+ if (plugin->thread_num>1){
882
+ ret=ZSTD_CCtx_setParameter(s, ZSTD_c_nbWorkers,plugin->thread_num);
883
+ //if (ZSTD_isError(ret)) printf(" (NOTICE: zstd unsupport multi-threading, warning.)\n");
884
+ }
885
+
886
+ while (readFromPos<in_data->streamSize) {
887
+ s_input.pos=0;
888
+ if (s_input.size>(in_data->streamSize-readFromPos))
889
+ s_input.size=(size_t)(in_data->streamSize-readFromPos);
890
+ if (!in_data->read(in_data,readFromPos,(unsigned char*)s_input.src,
891
+ (unsigned char*)s_input.src+s_input.size))
892
+ _compress_error_return("in_data->read()");
893
+ readFromPos+=s_input.size;
894
+ while (s_input.pos<s_input.size) {
895
+ s_output.pos=0;
896
+ ret=ZSTD_compressStream(s,&s_output,&s_input);
897
+ if (ZSTD_isError(ret)) _compress_error_return("ZSTD_compressStream()");
898
+ if (s_output.pos>0){
899
+ _stream_out_code_write(out_code,outStream_isCanceled,result,
900
+ (const unsigned char*)s_output.dst,s_output.pos);
901
+ }
902
+ }
903
+ }
904
+ while (1) {
905
+ s_output.pos=0;
906
+ ret=ZSTD_endStream(s,&s_output);
907
+ if (s_output.pos>0){
908
+ _stream_out_code_write(out_code,outStream_isCanceled,result,
909
+ (const unsigned char*)s_output.dst,s_output.pos);
910
+ }
911
+ if (ret==0) break;
912
+ }
913
+ clear:
914
+ #if (!IS_REUSE_compress_handle)
915
+ if (0!=ZSTD_freeCStream(s))
916
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="ZSTD_freeCStream()"; }
917
+ #endif
918
+ _check_compress_result(result,outStream_isCanceled,"_zstd_compress()",errAt);
919
+ if (_temp_buf) free(_temp_buf);
920
+ return result;
921
+ }
922
+ _def_fun_compressType(_zstd_compressType,"zstd");
923
+ static TCompressPlugin_zstd zstdCompressPlugin={
924
+ {_zstd_compressType,_default_maxCompressedSize,_zstd_setThreadNumber,_zstd_compress},
925
+ 20,24,kDefaultCompressThreadNumber};
926
+ #endif//_CompressPlugin_zstd
927
+
928
+
929
+ #ifdef _CompressPlugin_brotli
930
+ #if (_IsNeedIncludeDefaultCompressHead)
931
+ # include "brotli/encode.h" // "brotli/c/include/brotli/encode.h" https://github.com/google/brotli
932
+ #endif
933
+ struct TCompressPlugin_brotli{
934
+ hdiff_TCompress base;
935
+ int compress_level; //0..11
936
+ int dict_bits; // 10..30
937
+ };
938
+ static hpatch_StreamPos_t _brotli_compress(const hdiff_TCompress* compressPlugin,
939
+ const hpatch_TStreamOutput* out_code,
940
+ const hpatch_TStreamInput* in_data){
941
+ const TCompressPlugin_brotli* plugin=(const TCompressPlugin_brotli*)compressPlugin;
942
+ hpatch_StreamPos_t result=0;
943
+ const char* errAt="";
944
+ BrotliEncoderState* s=0;
945
+ hpatch_StreamPos_t readFromPos=0;
946
+ int outStream_isCanceled=0;
947
+ uint8_t* _temp_buf=0;
948
+ const size_t kBufSize=kCompressBufSize;
949
+ uint8_t* input;
950
+ uint8_t* output;
951
+ size_t available_in;
952
+ size_t available_out;
953
+ const uint8_t* next_in;
954
+ uint8_t* next_out;
955
+
956
+ _temp_buf=(uint8_t*)malloc(kBufSize*2);
957
+ if (!_temp_buf) _compress_error_return("memory alloc");
958
+ input=_temp_buf;
959
+ output=_temp_buf+kBufSize;
960
+ available_in=0;
961
+ available_out=kBufSize;
962
+ next_out=output;
963
+ next_in=input;
964
+
965
+ if (!s) s=BrotliEncoderCreateInstance(0,0,0);
966
+ if (!s) _compress_error_return("BrotliEncoderCreateInstance()");
967
+ if (!BrotliEncoderSetParameter(s,BROTLI_PARAM_QUALITY,plugin->compress_level))
968
+ _compress_error_return("BrotliEncoderSetParameter()");
969
+ {
970
+ uint32_t lgwin = plugin->dict_bits;
971
+ #define BROTLI_WINDOW_GAP 16
972
+ #define BROTLI_MAX_BACKWARD_LIMIT(W) (((hpatch_StreamPos_t)1 << (W)) - BROTLI_WINDOW_GAP)
973
+ while ((BROTLI_MAX_BACKWARD_LIMIT(lgwin-1) >= in_data->streamSize)
974
+ &&((lgwin-1)>= BROTLI_MIN_WINDOW_BITS)) {
975
+ --lgwin;
976
+ }
977
+ if (lgwin > BROTLI_MAX_WINDOW_BITS)
978
+ BrotliEncoderSetParameter(s, BROTLI_PARAM_LARGE_WINDOW, 1u);
979
+ BrotliEncoderSetParameter(s, BROTLI_PARAM_LGWIN, lgwin);
980
+ }
981
+ if (in_data->streamSize > 0) {
982
+ uint32_t size_hint = in_data->streamSize < (1 << 30) ?
983
+ (uint32_t)in_data->streamSize : (1u << 30);
984
+ BrotliEncoderSetParameter(s, BROTLI_PARAM_SIZE_HINT, size_hint);
985
+ }
986
+
987
+ while (1) {
988
+ int s_isFinished;
989
+ if ((available_in==0)&&(readFromPos<in_data->streamSize)){
990
+ available_in=kBufSize;
991
+ if (available_in>(in_data->streamSize-readFromPos))
992
+ available_in=(size_t)(in_data->streamSize-readFromPos);
993
+ if (!in_data->read(in_data,readFromPos,input,input+available_in))
994
+ _compress_error_return("in_data->read()");
995
+ readFromPos+=available_in;
996
+ next_in=input;
997
+ }
998
+
999
+ if (!BrotliEncoderCompressStream(s,
1000
+ (readFromPos==in_data->streamSize) ? BROTLI_OPERATION_FINISH : BROTLI_OPERATION_PROCESS,
1001
+ &available_in, &next_in, &available_out, &next_out, 0))
1002
+ _compress_error_return("BrotliEncoderCompressStream()");
1003
+
1004
+ s_isFinished=BrotliEncoderIsFinished(s);
1005
+ if ((available_out == 0)||s_isFinished) {
1006
+ _stream_out_code_write(out_code,outStream_isCanceled,result,
1007
+ output,kBufSize-available_out);
1008
+ next_out=output;
1009
+ available_out=kBufSize;
1010
+ }
1011
+
1012
+ if (s_isFinished)
1013
+ break;
1014
+ }
1015
+ clear:
1016
+ BrotliEncoderDestroyInstance(s);
1017
+ _check_compress_result(result,outStream_isCanceled,"_brotli_compress()",errAt);
1018
+ if (_temp_buf) free(_temp_buf);
1019
+ return result;
1020
+ }
1021
+ _def_fun_compressType(_brotli_compressType,"brotli");
1022
+ static TCompressPlugin_brotli brotliCompressPlugin={
1023
+ {_brotli_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_brotli_compress}, 9,24};
1024
+ #endif//_CompressPlugin_brotli
1025
+
1026
+
1027
+ #ifdef _CompressPlugin_lzham
1028
+ #if (_IsNeedIncludeDefaultCompressHead)
1029
+ # include "lzham.h" // "lzham_codec/include/lzham.h" https://github.com/richgel999/lzham_codec
1030
+ #endif
1031
+ struct TCompressPlugin_lzham{
1032
+ hdiff_TCompress base;
1033
+ int compress_level; //0..5
1034
+ int dict_bits; // 15..(26 or 29)
1035
+ int thread_num; //1..(64?)
1036
+ };
1037
+
1038
+ static int _lzham_setParallelThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
1039
+ TCompressPlugin_lzham* plugin=(TCompressPlugin_lzham*)compressPlugin;
1040
+ if (threadNum>LZHAM_MAX_HELPER_THREADS) threadNum=LZHAM_MAX_HELPER_THREADS;
1041
+ plugin->thread_num=threadNum;
1042
+ return threadNum;
1043
+ }
1044
+
1045
+ static hpatch_StreamPos_t _lzham_compress(const hdiff_TCompress* compressPlugin,
1046
+ const hpatch_TStreamOutput* out_code,
1047
+ const hpatch_TStreamInput* in_data){
1048
+ const TCompressPlugin_lzham* plugin=(const TCompressPlugin_lzham*)compressPlugin;
1049
+ hpatch_StreamPos_t result=0;
1050
+ const char* errAt="";
1051
+ lzham_compress_params params;
1052
+ unsigned char dict_bits;
1053
+ lzham_compress_state_ptr s=0;
1054
+ hpatch_StreamPos_t readFromPos=0;
1055
+ int outStream_isCanceled=0;
1056
+ unsigned char* _temp_buf=0;
1057
+ const size_t kBufSize=kCompressBufSize;
1058
+ unsigned char* input;
1059
+ unsigned char* output;
1060
+ size_t available_in;
1061
+ size_t available_out;
1062
+ const unsigned char* next_in;
1063
+ unsigned char* next_out;
1064
+
1065
+ _temp_buf=(unsigned char*)malloc(kBufSize*2);
1066
+ if (!_temp_buf) _compress_error_return("memory alloc");
1067
+ input=_temp_buf;
1068
+ output=_temp_buf+kBufSize;
1069
+ available_in=0;
1070
+ available_out=kBufSize;
1071
+ next_out=output;
1072
+ next_in=input;
1073
+
1074
+ memset(&params, 0, sizeof(params));
1075
+ params.m_struct_size=sizeof(params);
1076
+ dict_bits= (unsigned char)plugin->dict_bits;
1077
+ while (((((hpatch_StreamPos_t)1)<<(dict_bits-1)) >= in_data->streamSize)
1078
+ &&((dict_bits-1)>=LZHAM_MIN_DICT_SIZE_LOG2)) {
1079
+ --dict_bits;
1080
+ }
1081
+ params.m_dict_size_log2 = dict_bits;
1082
+ if (plugin->compress_level<=LZHAM_COMP_LEVEL_UBER){
1083
+ params.m_level=(lzham_compress_level)plugin->compress_level;
1084
+ }else{
1085
+ params.m_level = LZHAM_COMP_LEVEL_UBER;
1086
+ params.m_compress_flags |= LZHAM_COMP_FLAG_EXTREME_PARSING;
1087
+ }
1088
+ if (plugin->thread_num>1)
1089
+ params.m_max_helper_threads = plugin->thread_num;
1090
+
1091
+ if (!s) s=lzham_compress_init(&params);
1092
+ if (!s) _compress_error_return("lzham_compress_init()");
1093
+
1094
+ {//save head
1095
+ if (!out_code->write(out_code,0,(&dict_bits),(&dict_bits)+1))
1096
+ _compress_error_return("out_code->write()");
1097
+ ++result;
1098
+ }
1099
+
1100
+ while (1) {
1101
+ lzham_compress_status_t ret;
1102
+ int s_isFinished;
1103
+ if ((available_in==0)&&(readFromPos<in_data->streamSize)){
1104
+ available_in=kBufSize;
1105
+ if (available_in>(in_data->streamSize-readFromPos))
1106
+ available_in=(size_t)(in_data->streamSize-readFromPos);
1107
+ if (!in_data->read(in_data,readFromPos,input,input+available_in))
1108
+ _compress_error_return("in_data->read()");
1109
+ readFromPos+=available_in;
1110
+ next_in=input;
1111
+ }
1112
+
1113
+ {
1114
+ size_t available_in_back=available_in;
1115
+ size_t available_out_back=available_out;
1116
+ ret=lzham_compress2(s,next_in,&available_in,next_out,&available_out,
1117
+ (readFromPos==in_data->streamSize) ? LZHAM_FINISH : LZHAM_NO_FLUSH);
1118
+ next_out+=available_out;
1119
+ next_in+=available_in;
1120
+ available_in=available_in_back-available_in;
1121
+ available_out=available_out_back-available_out;
1122
+ }
1123
+ if (ret>=LZHAM_COMP_STATUS_FIRST_FAILURE_CODE)
1124
+ _compress_error_return("lzham_compress2()");
1125
+
1126
+ s_isFinished=(ret==LZHAM_COMP_STATUS_SUCCESS);
1127
+ if ((ret==LZHAM_COMP_STATUS_HAS_MORE_OUTPUT)||(available_out == 0)||s_isFinished) {
1128
+ _stream_out_code_write(out_code,outStream_isCanceled,result,
1129
+ output,kBufSize-available_out);
1130
+ next_out=output;
1131
+ available_out=kBufSize;
1132
+ }
1133
+
1134
+ if (s_isFinished)
1135
+ break;
1136
+ }
1137
+ clear:
1138
+ lzham_compress_deinit(s);
1139
+ _check_compress_result(result,outStream_isCanceled,"_lzham_compress()",errAt);
1140
+ if (_temp_buf) free(_temp_buf);
1141
+ return result;
1142
+ }
1143
+ _def_fun_compressType(_lzham_compressType,"lzham");
1144
+ static TCompressPlugin_lzham lzhamCompressPlugin={
1145
+ {_lzham_compressType,_default_maxCompressedSize,_lzham_setParallelThreadNumber,_lzham_compress},
1146
+ LZHAM_COMP_LEVEL_BETTER,24,kDefaultCompressThreadNumber};
1147
+ #endif//_CompressPlugin_lzham
1148
+
1149
+ #ifdef __cplusplus
1150
+ }
1151
+ #endif
1152
+ #endif