react-native-update 10.34.1 → 10.34.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (908) hide show
  1. package/.gitmodules +6 -0
  2. package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +291 -0
  3. package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +48 -0
  4. package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +473 -0
  5. package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +552 -0
  6. package/harmony/pushy/src/main/cpp/HDiffPatch/README_cn.md +547 -0
  7. package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +127 -0
  8. package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +59 -0
  9. package/harmony/pushy/src/main/cpp/HDiffPatch/_dir_ignore.h +191 -0
  10. package/harmony/pushy/src/main/cpp/HDiffPatch/_hextobytes.h +112 -0
  11. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +389 -0
  12. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +73 -0
  13. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +266 -0
  14. package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +58 -0
  15. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +190 -0
  16. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +8 -0
  17. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +1 -0
  18. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +1 -0
  19. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +1 -0
  20. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +1 -0
  21. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +49 -0
  22. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +31 -0
  23. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +38 -0
  24. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +26 -0
  25. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +155 -0
  26. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +364 -0
  27. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +348 -0
  28. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/bzip2.vcxproj +228 -0
  29. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/hpatchz_test.vcxproj +215 -0
  30. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/libdeflate.vcxproj +256 -0
  31. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/longPathAware.exe.manifest +7 -0
  32. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/lzma.vcxproj +271 -0
  33. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/testHashClash.vcxproj +228 -0
  34. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +296 -0
  35. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zlib.vcxproj +242 -0
  36. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zstd.vcxproj +287 -0
  37. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +39 -0
  38. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  39. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  40. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +447 -0
  41. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +703 -0
  42. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +463 -0
  43. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +286 -0
  44. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +268 -0
  45. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +585 -0
  46. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +301 -0
  47. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +591 -0
  48. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +308 -0
  49. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +524 -0
  50. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +33 -0
  51. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +33 -0
  52. package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +774 -0
  53. package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +799 -0
  54. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +201 -0
  55. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +59 -0
  56. package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +1526 -0
  57. package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +1637 -0
  58. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +846 -0
  59. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +79 -0
  60. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +339 -0
  61. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +190 -0
  62. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +339 -0
  63. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +87 -0
  64. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +43 -0
  65. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +836 -0
  66. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +246 -0
  67. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +47 -0
  68. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +112 -0
  69. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +69 -0
  70. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +65 -0
  71. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +346 -0
  72. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +149 -0
  73. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +176 -0
  74. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +84 -0
  75. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +146 -0
  76. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +61 -0
  77. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +152 -0
  78. package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +76 -0
  79. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +735 -0
  80. package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +240 -0
  81. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +1971 -0
  82. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.c +31 -0
  83. package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.h +42 -0
  84. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +307 -0
  85. package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +1786 -0
  86. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +1746 -0
  87. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +201 -0
  88. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +74 -0
  89. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +187 -0
  90. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +478 -0
  91. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.h +222 -0
  92. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +383 -0
  93. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +73 -0
  94. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +184 -0
  95. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +88 -0
  96. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +89 -0
  97. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +325 -0
  98. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.cpp +10 -0
  99. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +97 -0
  100. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +14 -0
  101. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +108 -0
  102. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +186 -0
  103. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +780 -0
  104. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +579 -0
  105. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +415 -0
  106. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +144 -0
  107. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +164 -0
  108. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +148 -0
  109. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +769 -0
  110. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +97 -0
  111. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +954 -0
  112. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +299 -0
  113. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.cpp +168 -0
  114. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.h +44 -0
  115. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +72 -0
  116. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +130 -0
  117. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +125 -0
  118. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +428 -0
  119. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +133 -0
  120. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +52 -0
  121. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.c +243 -0
  122. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.h +51 -0
  123. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.c +153 -0
  124. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.h +54 -0
  125. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.c +158 -0
  126. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.h +49 -0
  127. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.c +294 -0
  128. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.h +59 -0
  129. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_patch_private_mt.h +217 -0
  130. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.c +349 -0
  131. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.h +110 -0
  132. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +2643 -0
  133. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +253 -0
  134. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +245 -0
  135. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +361 -0
  136. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +366 -0
  137. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +91 -0
  138. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +31 -0
  139. package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +106 -0
  140. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +170 -0
  141. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +250 -0
  142. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +67 -0
  143. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.c +497 -0
  144. package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.h +106 -0
  145. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.cpp +254 -0
  146. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.h +39 -0
  147. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_sign_diff_type.h +37 -0
  148. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.cpp +62 -0
  149. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.h +44 -0
  150. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +156 -0
  151. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +440 -0
  152. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.h +88 -0
  153. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.cpp +332 -0
  154. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.h +48 -0
  155. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_types.h +198 -0
  156. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.cpp +697 -0
  157. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.h +74 -0
  158. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_private.h +262 -0
  159. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type.h +174 -0
  160. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +174 -0
  161. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +252 -0
  162. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.h +67 -0
  163. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +680 -0
  164. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.h +137 -0
  165. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +83 -0
  166. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +125 -0
  167. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.h +56 -0
  168. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +55 -0
  169. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.cpp +147 -0
  170. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.h +38 -0
  171. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +354 -0
  172. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.h +76 -0
  173. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.cpp +521 -0
  174. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.h +69 -0
  175. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +122 -0
  176. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_private.h +66 -0
  177. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type.h +36 -0
  178. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type_private.h +81 -0
  179. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.cpp +247 -0
  180. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.h +71 -0
  181. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.cpp +351 -0
  182. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.h +42 -0
  183. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.cpp +124 -0
  184. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.h +38 -0
  185. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.cpp +203 -0
  186. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.h +55 -0
  187. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.cpp +79 -0
  188. package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.h +66 -0
  189. package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +301 -0
  190. package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +291 -0
  191. package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +630 -0
  192. package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +889 -0
  193. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +628 -0
  194. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +95 -0
  195. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +78 -0
  196. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +950 -0
  197. package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +72 -0
  198. package/harmony/pushy/src/main/cpp/lzma/Asm/arm/7zCrcOpt.asm +100 -0
  199. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/7zAsm.S +181 -0
  200. package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/LzmaDecOpt.S +1487 -0
  201. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +341 -0
  202. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +258 -0
  203. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +742 -0
  204. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzFindOpt.asm +540 -0
  205. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +1339 -0
  206. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sha256Opt.asm +275 -0
  207. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sort.asm +860 -0
  208. package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +523 -0
  209. package/harmony/pushy/src/main/cpp/lzma/C/7z.h +204 -0
  210. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +89 -0
  211. package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +19 -0
  212. package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +1786 -0
  213. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.c +36 -0
  214. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +35 -0
  215. package/harmony/pushy/src/main/cpp/lzma/C/7zBuf2.c +52 -0
  216. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +464 -0
  217. package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +28 -0
  218. package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +199 -0
  219. package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +673 -0
  220. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +443 -0
  221. package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +92 -0
  222. package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +199 -0
  223. package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +597 -0
  224. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +27 -0
  225. package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.rc +55 -0
  226. package/harmony/pushy/src/main/cpp/lzma/C/7zWindows.h +101 -0
  227. package/harmony/pushy/src/main/cpp/lzma/C/7zip_gcc_c.mak +360 -0
  228. package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +429 -0
  229. package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +60 -0
  230. package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +1002 -0
  231. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +605 -0
  232. package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +76 -0
  233. package/harmony/pushy/src/main/cpp/lzma/C/Asm_c.mak +12 -0
  234. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +290 -0
  235. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +332 -0
  236. package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +506 -0
  237. package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +709 -0
  238. package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +105 -0
  239. package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +187 -0
  240. package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +14 -0
  241. package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +246 -0
  242. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +970 -0
  243. package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +686 -0
  244. package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +169 -0
  245. package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +19 -0
  246. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +99 -0
  247. package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +20 -0
  248. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +1746 -0
  249. package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +160 -0
  250. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +1422 -0
  251. package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +114 -0
  252. package/harmony/pushy/src/main/cpp/lzma/C/LzFindOpt.c +578 -0
  253. package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +34 -0
  254. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +493 -0
  255. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +121 -0
  256. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +1095 -0
  257. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +81 -0
  258. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +807 -0
  259. package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +58 -0
  260. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +111 -0
  261. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +53 -0
  262. package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +103 -0
  263. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +1363 -0
  264. package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +237 -0
  265. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +3150 -0
  266. package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +85 -0
  267. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +42 -0
  268. package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +138 -0
  269. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +604 -0
  270. package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +144 -0
  271. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +1124 -0
  272. package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +202 -0
  273. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +169 -0
  274. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +1131 -0
  275. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +181 -0
  276. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +312 -0
  277. package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +337 -0
  278. package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +127 -0
  279. package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +50 -0
  280. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +492 -0
  281. package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +86 -0
  282. package/harmony/pushy/src/main/cpp/lzma/C/Sha256Opt.c +451 -0
  283. package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +268 -0
  284. package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +15 -0
  285. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.c +835 -0
  286. package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.h +17 -0
  287. package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +812 -0
  288. package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +260 -0
  289. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +249 -0
  290. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsw +29 -0
  291. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +889 -0
  292. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.c +4 -0
  293. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +13 -0
  294. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +44 -0
  295. package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +32 -0
  296. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +313 -0
  297. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +192 -0
  298. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsw +29 -0
  299. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/Precomp.h +13 -0
  300. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +30 -0
  301. package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +21 -0
  302. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.def +4 -0
  303. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +206 -0
  304. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsw +29 -0
  305. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +15 -0
  306. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.c +4 -0
  307. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.h +13 -0
  308. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +59 -0
  309. package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/resource.rc +3 -0
  310. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.c +4 -0
  311. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +13 -0
  312. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +657 -0
  313. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsp +231 -0
  314. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsw +29 -0
  315. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +44 -0
  316. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +40 -0
  317. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/resource.rc +5 -0
  318. package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/setup.ico +0 -0
  319. package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +92 -0
  320. package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +542 -0
  321. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +140 -0
  322. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +26 -0
  323. package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +261 -0
  324. package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +2876 -0
  325. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +1384 -0
  326. package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +64 -0
  327. package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +385 -0
  328. package/harmony/pushy/src/main/cpp/lzma/C/var_clang.mak +11 -0
  329. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_arm64.mak +12 -0
  330. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x64.mak +11 -0
  331. package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x86.mak +11 -0
  332. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc.mak +12 -0
  333. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_arm64.mak +12 -0
  334. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x64.mak +10 -0
  335. package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x86.mak +10 -0
  336. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_arm64.mak +11 -0
  337. package/harmony/pushy/src/main/cpp/lzma/C/var_mac_x64.mak +11 -0
  338. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang.mak +1 -0
  339. package/harmony/pushy/src/main/cpp/lzma/C/warn_clang_mac.mak +1 -0
  340. package/harmony/pushy/src/main/cpp/lzma/C/warn_gcc.mak +51 -0
  341. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +240 -0
  342. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip_gcc.mak +1370 -0
  343. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +10 -0
  344. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
  345. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +92 -0
  346. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
  347. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +73 -0
  348. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +721 -0
  349. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +95 -0
  350. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
  351. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
  352. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
  353. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +795 -0
  354. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +178 -0
  355. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1162 -0
  356. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
  357. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +156 -0
  358. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +1764 -0
  359. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +454 -0
  360. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +207 -0
  361. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
  362. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +346 -0
  363. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
  364. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +26 -0
  365. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
  366. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
  367. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
  368. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +3088 -0
  369. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
  370. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
  371. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +11 -0
  372. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +14 -0
  373. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +21 -0
  374. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
  375. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
  376. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
  377. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
  378. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
  379. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +315 -0
  380. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +169 -0
  381. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
  382. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
  383. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +140 -0
  384. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +33 -0
  385. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
  386. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +86 -0
  387. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
  388. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
  389. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
  390. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
  391. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +11 -0
  392. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +175 -0
  393. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +754 -0
  394. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
  395. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +608 -0
  396. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +353 -0
  397. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +11 -0
  398. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +1452 -0
  399. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +11 -0
  400. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +12 -0
  401. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
  402. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
  403. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
  404. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
  405. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +168 -0
  406. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +279 -0
  407. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
  408. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
  409. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
  410. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
  411. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
  412. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
  413. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
  414. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +121 -0
  415. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
  416. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +817 -0
  417. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
  418. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
  419. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
  420. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
  421. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
  422. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
  423. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
  424. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +715 -0
  425. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  426. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
  427. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
  428. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
  429. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
  430. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
  431. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +137 -0
  432. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
  433. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
  434. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
  435. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
  436. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
  437. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
  438. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
  439. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
  440. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +371 -0
  441. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
  442. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
  443. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
  444. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
  445. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
  446. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  447. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  448. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
  449. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
  450. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
  451. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
  452. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
  453. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +159 -0
  454. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
  455. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
  456. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +358 -0
  457. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +182 -0
  458. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +548 -0
  459. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +200 -0
  460. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
  461. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +10 -0
  462. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +923 -0
  463. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +205 -0
  464. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +577 -0
  465. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +201 -0
  466. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +182 -0
  467. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +121 -0
  468. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
  469. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +45 -0
  470. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +393 -0
  471. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +221 -0
  472. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.cpp +3 -0
  473. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +6 -0
  474. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.cpp +3 -0
  475. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +10 -0
  476. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +765 -0
  477. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +349 -0
  478. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.cpp +855 -0
  479. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.h +160 -0
  480. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +37 -0
  481. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +22 -0
  482. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +111 -0
  483. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +133 -0
  484. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +51 -0
  485. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +33 -0
  486. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +117 -0
  487. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +80 -0
  488. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +106 -0
  489. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +11 -0
  490. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +151 -0
  491. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +78 -0
  492. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +290 -0
  493. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +146 -0
  494. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +101 -0
  495. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +31 -0
  496. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +57 -0
  497. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +41 -0
  498. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +47 -0
  499. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +24 -0
  500. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
  501. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +127 -0
  502. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
  503. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +24 -0
  504. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +37 -0
  505. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +17 -0
  506. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +106 -0
  507. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +59 -0
  508. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +58 -0
  509. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +91 -0
  510. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +378 -0
  511. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +153 -0
  512. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +34 -0
  513. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyRegister.cpp +15 -0
  514. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
  515. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
  516. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
  517. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +134 -0
  518. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
  519. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
  520. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
  521. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +113 -0
  522. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +374 -0
  523. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +45 -0
  524. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
  525. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
  526. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +87 -0
  527. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
  528. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +49 -0
  529. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
  530. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +11 -0
  531. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +151 -0
  532. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +86 -0
  533. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +243 -0
  534. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +35 -0
  535. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +8 -0
  536. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +8 -0
  537. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +315 -0
  538. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +130 -0
  539. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
  540. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +277 -0
  541. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +122 -0
  542. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
  543. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +241 -0
  544. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +41 -0
  545. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +11 -0
  546. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +119 -0
  547. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +243 -0
  548. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +480 -0
  549. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +76 -0
  550. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +54 -0
  551. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +20 -0
  552. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +210 -0
  553. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzFindOpt.mak +7 -0
  554. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +7 -0
  555. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec_gcc.mak +14 -0
  556. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersion.h +2 -0
  557. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +2 -0
  558. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +178 -0
  559. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sha256.mak +13 -0
  560. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sort.mak +6 -0
  561. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/SubBuild.mak +3 -0
  562. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
  563. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
  564. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
  565. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
  566. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
  567. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +29 -0
  568. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
  569. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/resource.rc +3 -0
  570. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1799 -0
  571. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
  572. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +3077 -0
  573. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +641 -0
  574. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
  575. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +16 -0
  576. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +398 -0
  577. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
  578. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +5026 -0
  579. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +121 -0
  580. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
  581. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +11 -0
  582. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +407 -0
  583. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +1637 -0
  584. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
  585. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +27 -0
  586. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +575 -0
  587. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +107 -0
  588. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +44 -0
  589. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +296 -0
  590. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
  591. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +2273 -0
  592. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +322 -0
  593. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
  594. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +1337 -0
  595. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
  596. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +3702 -0
  597. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +469 -0
  598. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +745 -0
  599. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
  600. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +14 -0
  601. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
  602. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +10 -0
  603. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
  604. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +10 -0
  605. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +11 -0
  606. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
  607. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +19 -0
  608. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +1931 -0
  609. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +221 -0
  610. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
  611. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +66 -0
  612. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +1069 -0
  613. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
  614. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +302 -0
  615. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +27 -0
  616. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +74 -0
  617. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
  618. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
  619. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +30 -0
  620. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
  621. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
  622. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +14 -0
  623. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +46 -0
  624. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +16 -0
  625. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
  626. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
  627. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +946 -0
  628. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
  629. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +426 -0
  630. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +58 -0
  631. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +1417 -0
  632. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +42 -0
  633. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +1635 -0
  634. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +235 -0
  635. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
  636. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
  637. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
  638. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
  639. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
  640. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +11 -0
  641. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +998 -0
  642. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
  643. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
  644. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
  645. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +68 -0
  646. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile.gcc +187 -0
  647. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/resource.rc +7 -0
  648. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
  649. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
  650. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
  651. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
  652. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
  653. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
  654. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
  655. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
  656. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
  657. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1272 -0
  658. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
  659. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
  660. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
  661. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
  662. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
  663. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
  664. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
  665. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
  666. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
  667. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
  668. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
  669. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
  670. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
  671. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
  672. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
  673. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
  674. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
  675. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
  676. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
  677. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1483 -0
  678. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
  679. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
  680. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
  681. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
  682. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
  683. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
  684. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
  685. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
  686. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
  687. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +351 -0
  688. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
  689. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +199 -0
  690. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
  691. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
  692. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +59 -0
  693. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +421 -0
  694. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
  695. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
  696. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
  697. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
  698. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
  699. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
  700. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +27 -0
  701. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/resource2.h +2 -0
  702. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang.mak +3 -0
  703. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_arm64.mak +3 -0
  704. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x64.mak +3 -0
  705. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x86.mak +3 -0
  706. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc.mak +3 -0
  707. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
  708. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x64.mak +3 -0
  709. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x86.mak +3 -0
  710. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_arm64.mak +3 -0
  711. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_x64.mak +3 -0
  712. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang.mak +11 -0
  713. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_arm64.mak +19 -0
  714. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x64.mak +11 -0
  715. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x86.mak +11 -0
  716. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc.mak +12 -0
  717. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_arm64.mak +12 -0
  718. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x64.mak +11 -0
  719. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x86.mak +10 -0
  720. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_arm64.mak +13 -0
  721. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_x64.mak +11 -0
  722. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang.mak +3 -0
  723. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang_mac.mak +9 -0
  724. package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_gcc.mak +55 -0
  725. package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +252 -0
  726. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +46 -0
  727. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +7 -0
  728. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +3 -0
  729. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +6 -0
  730. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +21 -0
  731. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +231 -0
  732. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +63 -0
  733. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +28 -0
  734. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common0.h +330 -0
  735. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +77 -0
  736. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +16 -0
  737. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.cpp +93 -0
  738. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.h +41 -0
  739. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +76 -0
  740. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +215 -0
  741. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +54 -0
  742. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +30 -0
  743. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +150 -0
  744. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +18 -0
  745. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/LzFindPrepare.cpp +7 -0
  746. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +297 -0
  747. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +185 -0
  748. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +693 -0
  749. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +14 -0
  750. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +63 -0
  751. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +57 -0
  752. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +75 -0
  753. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +1842 -0
  754. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +1079 -0
  755. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +38 -0
  756. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +8 -0
  757. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.cpp +3 -0
  758. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +724 -0
  759. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +292 -0
  760. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +325 -0
  761. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +340 -0
  762. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +121 -0
  763. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Prepare.cpp +7 -0
  764. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +67 -0
  765. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +8 -0
  766. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +98 -0
  767. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +46 -0
  768. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +248 -0
  769. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +87 -0
  770. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +762 -0
  771. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +110 -0
  772. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +154 -0
  773. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +38 -0
  774. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +123 -0
  775. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +19 -0
  776. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +863 -0
  777. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +384 -0
  778. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +789 -0
  779. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +231 -0
  780. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Init.cpp +7 -0
  781. package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +39 -0
  782. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +86 -0
  783. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.cpp +130 -0
  784. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.h +28 -0
  785. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +269 -0
  786. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +43 -0
  787. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +66 -0
  788. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +77 -0
  789. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +52 -0
  790. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +446 -0
  791. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +213 -0
  792. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +19 -0
  793. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.cpp +10 -0
  794. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +87 -0
  795. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +162 -0
  796. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +156 -0
  797. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +35 -0
  798. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +165 -0
  799. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +50 -0
  800. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +34 -0
  801. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +28 -0
  802. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +42 -0
  803. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +11 -0
  804. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +43 -0
  805. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +27 -0
  806. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +202 -0
  807. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +53 -0
  808. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +178 -0
  809. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +103 -0
  810. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +17 -0
  811. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +133 -0
  812. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +16 -0
  813. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +1362 -0
  814. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +172 -0
  815. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +1449 -0
  816. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +347 -0
  817. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +954 -0
  818. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +467 -0
  819. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +697 -0
  820. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.cpp +12 -0
  821. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +66 -0
  822. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +911 -0
  823. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +142 -0
  824. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +187 -0
  825. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +31 -0
  826. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +39 -0
  827. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.cpp +36 -0
  828. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.h +55 -0
  829. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +127 -0
  830. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +40 -0
  831. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +58 -0
  832. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +393 -0
  833. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +173 -0
  834. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +274 -0
  835. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +47 -0
  836. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +474 -0
  837. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +96 -0
  838. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +103 -0
  839. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +17 -0
  840. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +186 -0
  841. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +150 -0
  842. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +839 -0
  843. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +129 -0
  844. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +11 -0
  845. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +87 -0
  846. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +386 -0
  847. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +421 -0
  848. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +189 -0
  849. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.cpp +1251 -0
  850. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.h +19 -0
  851. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +46 -0
  852. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +467 -0
  853. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +146 -0
  854. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +179 -0
  855. package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +363 -0
  856. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CRC.cs +55 -0
  857. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CommandLineParser.cs +274 -0
  858. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/InBuffer.cs +72 -0
  859. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/OutBuffer.cs +47 -0
  860. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +24 -0
  861. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +367 -0
  862. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +132 -0
  863. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +110 -0
  864. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +76 -0
  865. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +398 -0
  866. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +1480 -0
  867. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +364 -0
  868. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +20 -0
  869. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +340 -0
  870. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +29 -0
  871. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +70 -0
  872. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +42 -0
  873. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +234 -0
  874. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +117 -0
  875. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +157 -0
  876. package/harmony/pushy/src/main/cpp/lzma/CS/7zip/ICoder.cs +157 -0
  877. package/harmony/pushy/src/main/cpp/lzma/DOC/7zC.txt +187 -0
  878. package/harmony/pushy/src/main/cpp/lzma/DOC/7zFormat.txt +469 -0
  879. package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +177 -0
  880. package/harmony/pushy/src/main/cpp/lzma/DOC/installer.txt +166 -0
  881. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +651 -0
  882. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +437 -0
  883. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-specification.txt +1176 -0
  884. package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +345 -0
  885. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/CRC.java +52 -0
  886. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/BinTree.java +382 -0
  887. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/InWindow.java +131 -0
  888. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +85 -0
  889. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Base.java +88 -0
  890. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +329 -0
  891. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +1416 -0
  892. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +55 -0
  893. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +99 -0
  894. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +88 -0
  895. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +151 -0
  896. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/ICodeProgress.java +6 -0
  897. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaAlone.java +253 -0
  898. package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaBench.java +392 -0
  899. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2.sfx +0 -0
  900. package/harmony/pushy/src/main/cpp/lzma/bin/7zS2con.sfx +0 -0
  901. package/harmony/pushy/src/main/cpp/lzma/bin/7zSD.sfx +0 -0
  902. package/harmony/pushy/src/main/cpp/lzma/bin/7zdec.exe +0 -0
  903. package/harmony/pushy/src/main/cpp/lzma/bin/7zr.exe +0 -0
  904. package/harmony/pushy/src/main/cpp/lzma/bin/installer/config.txt +5 -0
  905. package/harmony/pushy/src/main/cpp/lzma/bin/installer/cr.bat +5 -0
  906. package/harmony/pushy/src/main/cpp/lzma/bin/lzma.exe +0 -0
  907. package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
  908. package/package.json +1 -1
@@ -0,0 +1,1526 @@
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 // zlib's deflate encoding
32
+ // pzlibCompressPlugin // compatible with zlib's deflate encoding
33
+ // ldefCompressPlugin // compatible with zlib's deflate encoding
34
+ // pldefCompressPlugin // compatible with zlib's deflate encoding
35
+ // bz2CompressPlugin
36
+ // pbz2CompressPlugin
37
+ // lzmaCompressPlugin
38
+ // lzma2CompressPlugin
39
+ // lz4CompressPlugin
40
+ // lz4hcCompressPlugin
41
+ // zstdCompressPlugin
42
+ // brotliCompressPlugin
43
+ // lzhamCompressPlugin
44
+ // tuzCompressPlugin
45
+
46
+ // _7zXZCompressPlugin : support for create_vcdiff(), compatible with "xdelta3 -S lzma ..."
47
+
48
+ #include "libHDiffPatch/HDiff/diff_types.h"
49
+ #include "compress_parallel.h"
50
+ #include <stdio.h>
51
+ #ifdef __cplusplus
52
+ extern "C" {
53
+ #endif
54
+
55
+ #ifndef kDefaultCompressThreadNumber
56
+ #if (_IS_USED_MULTITHREAD)
57
+ # define kDefaultCompressThreadNumber 4
58
+ #else
59
+ # define kDefaultCompressThreadNumber 1
60
+ #endif
61
+ #endif
62
+
63
+ #ifndef kCompressBufSize
64
+ # define kCompressBufSize (1024*32)
65
+ #endif
66
+ #ifndef _IsNeedIncludeDefaultCompressHead
67
+ # define _IsNeedIncludeDefaultCompressHead 1
68
+ #endif
69
+ #define kCompressFailResult 0
70
+ #define _compress_error_return(_errAt) do{ \
71
+ result=kCompressFailResult; \
72
+ if (strlen(errAt)==0) errAt=_errAt; \
73
+ goto clear; } while(0)
74
+
75
+ #ifndef IS_NOTICE_compress_canceled
76
+ # define IS_NOTICE_compress_canceled 1
77
+ #endif
78
+ #ifndef IS_REUSE_compress_handle
79
+ # define IS_REUSE_compress_handle 0
80
+ #endif
81
+
82
+
83
+ #define _check_compress_result(result,outStream_isCanceled,_at,_errAt) \
84
+ if ((result)==kCompressFailResult){ \
85
+ if (outStream_isCanceled){ \
86
+ if (IS_NOTICE_compress_canceled) \
87
+ printf(" (NOTICE: " _at " is canceled, warning.)\n"); \
88
+ }else{ \
89
+ printf(" (NOTICE: " _at " is canceled, %s ERROR!)\n",_errAt); \
90
+ } \
91
+ }
92
+
93
+ #define _stream_out_code_write(out_code,isCanceled,writePos,buf,len) { \
94
+ if (!out_code->write(out_code,writePos,buf,buf+len)){ \
95
+ isCanceled=1; \
96
+ _compress_error_return("out_code->write()");\
97
+ } \
98
+ writePos+=len; }
99
+
100
+ #define _def_fun_compressType(_fun_name,cstr) \
101
+ static const char* _fun_name(void){ \
102
+ static const char* kCompressType=cstr; \
103
+ return kCompressType; \
104
+ }
105
+
106
+ #ifndef __DEF_default_maxCompressedSize
107
+ #define __DEF_default_maxCompressedSize
108
+ static hpatch_StreamPos_t _default_maxCompressedSize(hpatch_StreamPos_t dataSize){
109
+ hpatch_StreamPos_t result=dataSize+(dataSize>>3)+256;
110
+ assert(result>dataSize);
111
+ return result;
112
+ }
113
+ #endif
114
+
115
+ static
116
+ int _default_setParallelThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
117
+ return 1;
118
+ }
119
+
120
+ #ifdef _CompressPlugin_zlib
121
+ #if (_IsNeedIncludeDefaultCompressHead)
122
+ # include "zlib.h" // http://zlib.net/ https://github.com/madler/zlib
123
+ #endif
124
+ typedef struct{
125
+ hdiff_TCompress base;
126
+ int compress_level; //0..9
127
+ int mem_level;
128
+ signed char windowBits; // -9..-15
129
+ hpatch_BOOL isNeedSaveWindowBits;
130
+ int strategy;
131
+ } TCompressPlugin_zlib;
132
+ typedef struct _zlib_TCompress{
133
+ const hpatch_TStreamOutput* out_code;
134
+ unsigned char* c_buf;
135
+ size_t c_buf_size;
136
+ z_stream c_stream;
137
+ } _zlib_TCompress;
138
+
139
+ static _zlib_TCompress* _zlib_compress_open_at(const hdiff_TCompress* compressPlugin,
140
+ int compressLevel,int compressMemLevel,
141
+ const hpatch_TStreamOutput* out_code,
142
+ _zlib_TCompress* self,size_t _self_and_buf_size){
143
+ const TCompressPlugin_zlib* plugin=(const TCompressPlugin_zlib*)compressPlugin;
144
+ assert(_self_and_buf_size>sizeof(_zlib_TCompress));
145
+ memset(self,0,sizeof(_zlib_TCompress));
146
+ self->c_buf=((unsigned char*)self)+sizeof(_zlib_TCompress);;
147
+ self->c_buf_size=_self_and_buf_size-sizeof(_zlib_TCompress);
148
+ self->out_code=out_code;
149
+
150
+ self->c_stream.next_out = (Bytef*)self->c_buf;
151
+ self->c_stream.avail_out = (uInt)self->c_buf_size;
152
+ if (Z_OK!=deflateInit2(&self->c_stream,compressLevel,Z_DEFLATED,
153
+ plugin->windowBits,compressMemLevel,plugin->strategy))
154
+ return 0;
155
+ return self;
156
+ }
157
+ static _zlib_TCompress* _zlib_compress_open_by(const hdiff_TCompress* compressPlugin,
158
+ int compressLevel,int compressMemLevel,
159
+ const hpatch_TStreamOutput* out_code,
160
+ unsigned char* _mem_buf,size_t _mem_buf_size){
161
+ #define __MAX_TS(a,b) ((a)>=(b)?(a):(b))
162
+ const hpatch_size_t kZlibAlign=__MAX_TS(__MAX_TS(sizeof(hpatch_StreamPos_t),sizeof(void*)),sizeof(uLongf));
163
+ #undef __MAX_TS
164
+ unsigned char* _mem_buf_end=_mem_buf+_mem_buf_size;
165
+ unsigned char* self_at=(unsigned char*)_hpatch_align_upper(_mem_buf,kZlibAlign);
166
+ if (self_at>=_mem_buf_end) return 0;
167
+ return _zlib_compress_open_at(compressPlugin,compressLevel,compressMemLevel,out_code,
168
+ (_zlib_TCompress*)self_at,_mem_buf_end-self_at);
169
+ }
170
+ static hpatch_BOOL _zlib_compress_close_by(const hdiff_TCompress* compressPlugin,_zlib_TCompress* self){
171
+ hpatch_BOOL result=hpatch_TRUE;
172
+ if (!self) return result;
173
+ if (self->c_stream.state!=0){
174
+ int ret=deflateEnd(&self->c_stream);
175
+ result=(Z_OK==ret)|(Z_DATA_ERROR==ret);
176
+ }
177
+ memset(self,0,sizeof(_zlib_TCompress));
178
+ return result;
179
+ }
180
+ static int _zlib_compress_part(_zlib_TCompress* self,
181
+ const unsigned char* part_data,const unsigned char* part_data_end,
182
+ int is_data_end,hpatch_StreamPos_t* curWritedPos,int* outStream_isCanceled){
183
+ int result=1; //true
184
+ const char* errAt="";
185
+ int is_stream_end=0;
186
+ int is_eof=0;
187
+ assert(part_data<=part_data_end);
188
+ self->c_stream.next_in=(Bytef*)part_data;
189
+ self->c_stream.avail_in=(uInt)(part_data_end-part_data);
190
+ while (1) {
191
+ if ((self->c_stream.avail_out<self->c_buf_size)|is_stream_end){
192
+ size_t writeLen=self->c_buf_size-self->c_stream.avail_out;
193
+ if (writeLen>0){
194
+ _stream_out_code_write(self->out_code,*outStream_isCanceled,
195
+ (*curWritedPos),self->c_buf,writeLen);
196
+ }
197
+ self->c_stream.next_out=(Bytef*)self->c_buf;
198
+ self->c_stream.avail_out=(uInt)self->c_buf_size;
199
+ if (is_stream_end)
200
+ break;//end loop
201
+ }else{
202
+ if (self->c_stream.avail_in>0){
203
+ if (Z_OK!=deflate(&self->c_stream,Z_NO_FLUSH)) _compress_error_return("deflate()");
204
+ }else if (is_eof){
205
+ int ret=deflate(&self->c_stream,Z_FINISH);
206
+ is_stream_end= (ret==Z_STREAM_END);
207
+ if ((ret!=Z_STREAM_END)&&(ret!=Z_OK))
208
+ _compress_error_return("deflate() Z_FINISH");
209
+ }else{
210
+ if (!is_data_end)
211
+ break;//part ok
212
+ else
213
+ is_eof=1;
214
+ }
215
+ }
216
+ }
217
+ clear:
218
+ _check_compress_result(result,*outStream_isCanceled,"_zlib_compress_part()",errAt);
219
+ return result;
220
+ }
221
+
222
+ static hpatch_StreamPos_t _zlib_compress(const hdiff_TCompress* compressPlugin,
223
+ const hpatch_TStreamOutput* out_code,
224
+ const hpatch_TStreamInput* in_data){
225
+ const TCompressPlugin_zlib* plugin=(const TCompressPlugin_zlib*)compressPlugin;
226
+ hpatch_StreamPos_t result=0; //writedPos
227
+ hpatch_StreamPos_t readFromPos=0;
228
+ const char* errAt="";
229
+ int outStream_isCanceled=0;
230
+ unsigned char* _temp_buf=0;
231
+ unsigned char* data_buf=0;
232
+ _zlib_TCompress* self=0;
233
+ _temp_buf=(unsigned char*)malloc(sizeof(_zlib_TCompress)+kCompressBufSize*2);
234
+ if (!_temp_buf) _compress_error_return("memory alloc");
235
+ self=_zlib_compress_open_by(compressPlugin,plugin->compress_level,plugin->mem_level,
236
+ out_code,_temp_buf,sizeof(_zlib_TCompress)+kCompressBufSize);
237
+ data_buf=_temp_buf+sizeof(_zlib_TCompress)+kCompressBufSize;
238
+ if (!self) _compress_error_return("deflateInit2()");
239
+ if (plugin->isNeedSaveWindowBits){
240
+ const unsigned char* pchar=(const unsigned char*)&plugin->windowBits;
241
+ if (!out_code->write(out_code,0,pchar,pchar+1)) _compress_error_return("out_code->write()");
242
+ ++result;
243
+ }
244
+ while (readFromPos<in_data->streamSize){
245
+ size_t readLen=kCompressBufSize;
246
+ if (readLen>(hpatch_StreamPos_t)(in_data->streamSize-readFromPos))
247
+ readLen=(size_t)(in_data->streamSize-readFromPos);
248
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+readLen))
249
+ _compress_error_return("in_data->read()");
250
+ readFromPos+=readLen;
251
+ if (!_zlib_compress_part(self,data_buf,data_buf+readLen,
252
+ (readFromPos==in_data->streamSize),&result,&outStream_isCanceled))
253
+ _compress_error_return("_zlib_compress_part()");
254
+ }
255
+ clear:
256
+ if (!_zlib_compress_close_by(compressPlugin,self))
257
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="deflateEnd()"; }
258
+ _check_compress_result(result,outStream_isCanceled,"_zlib_compress()",errAt);
259
+ if (_temp_buf) free(_temp_buf);
260
+ return result;
261
+ }
262
+ _def_fun_compressType(_zlib_compressType,"zlib");
263
+ static const TCompressPlugin_zlib zlibCompressPlugin={
264
+ {_zlib_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_zlib_compress},
265
+ 9,8,-MAX_WBITS,hpatch_TRUE,Z_DEFAULT_STRATEGY};
266
+
267
+ # if (_IS_USED_MULTITHREAD)
268
+ //pzlib
269
+ typedef struct {
270
+ TCompressPlugin_zlib base;
271
+ int thread_num; // 1..
272
+ hdiff_TParallelCompress pc;
273
+ } TCompressPlugin_pzlib;
274
+ static int _pzlib_setThreadNum(hdiff_TCompress* compressPlugin,int threadNum){
275
+ TCompressPlugin_pzlib* plugin=(TCompressPlugin_pzlib*)compressPlugin;
276
+ plugin->thread_num=threadNum;
277
+ return threadNum;
278
+ }
279
+ static void _pzlib_closeBlockCompressor(hdiff_TParallelCompress* pc,
280
+ hdiff_compressBlockHandle blockCompressor){
281
+ z_stream* stream=(z_stream*)blockCompressor;
282
+ if (!stream) return;
283
+ if (stream->state!=0){
284
+ int ret=deflateEnd(stream);
285
+ assert((Z_OK==ret)|(Z_DATA_ERROR==ret));
286
+ }
287
+ free(stream);
288
+ }
289
+ static hdiff_compressBlockHandle _pzlib_openBlockCompressor(hdiff_TParallelCompress* pc){
290
+ const TCompressPlugin_pzlib* plugin=(const TCompressPlugin_pzlib*)pc->import;
291
+ z_stream* stream=(z_stream*)malloc(sizeof(z_stream));
292
+ if (!stream) return 0;
293
+ memset(stream,0,sizeof(z_stream));
294
+ int err = deflateInit2(stream,plugin->base.compress_level,Z_DEFLATED,
295
+ plugin->base.windowBits,plugin->base.mem_level,Z_DEFAULT_STRATEGY);
296
+ if (err!=Z_OK){//error
297
+ _pzlib_closeBlockCompressor(pc,stream);
298
+ return 0;
299
+ }
300
+ return stream;
301
+ }
302
+ static int _pzlib_compress2(Bytef* dest,uLongf* destLen,const unsigned char* block_data,
303
+ const unsigned char* block_dictEnd,const unsigned char* block_dataEnd,
304
+ int isEndBlock,z_stream* stream){
305
+ int err;
306
+ #define _check_zlib_err(_must_V) { if (err!=(_must_V)) goto _errorReturn; }
307
+ err=deflateReset(stream);
308
+ _check_zlib_err(Z_OK);
309
+ stream->next_in = (Bytef*)block_dictEnd;
310
+ stream->avail_in = (uInt)(block_dataEnd-block_dictEnd);
311
+ stream->next_out = dest;
312
+ stream->avail_out = (uInt)*destLen;
313
+ stream->total_out = 0;
314
+ if (block_data<block_dictEnd){
315
+ err=deflateSetDictionary(stream,(Bytef*)block_data,(uInt)(block_dictEnd-block_data));
316
+ _check_zlib_err(Z_OK);
317
+ }
318
+ if (!isEndBlock){
319
+ int bits;
320
+ err = deflate(stream,Z_BLOCK);
321
+ _check_zlib_err(Z_OK);
322
+ // add enough empty blocks to get to a byte boundary
323
+ err = deflatePending(stream,Z_NULL,&bits);
324
+ _check_zlib_err(Z_OK);
325
+ if (bits & 1){
326
+ err = deflate(stream,Z_SYNC_FLUSH);
327
+ _check_zlib_err(Z_OK);
328
+ } else if (bits & 7) {
329
+ do { // add static empty blocks
330
+ err = deflatePrime(stream, 10, 2);
331
+ _check_zlib_err(Z_OK);
332
+ err = deflatePending(stream,Z_NULL,&bits);
333
+ _check_zlib_err(Z_OK);
334
+ } while (bits & 7);
335
+ err = deflate(stream,Z_BLOCK);
336
+ _check_zlib_err(Z_OK);
337
+ }
338
+ }else{
339
+ err = deflate(stream,Z_FINISH);
340
+ _check_zlib_err(Z_STREAM_END);
341
+ err=Z_OK;
342
+ }
343
+ *destLen = stream->total_out;
344
+ return err;
345
+ _errorReturn:
346
+ return err == Z_OK ? Z_BUF_ERROR : err;
347
+ #undef _check_zlib_err
348
+ }
349
+ static
350
+ size_t _pzlib_compressBlock(hdiff_TParallelCompress* pc,hdiff_compressBlockHandle blockCompressor,
351
+ hpatch_StreamPos_t blockIndex,hpatch_StreamPos_t blockCount,unsigned char* out_code,unsigned char* out_codeEnd,
352
+ const unsigned char* block_data,const unsigned char* block_dictEnd,const unsigned char* block_dataEnd){
353
+ const TCompressPlugin_pzlib* plugin=(const TCompressPlugin_pzlib*)pc->import;
354
+ const hpatch_BOOL isAdding=(blockIndex==0)&&(plugin->base.isNeedSaveWindowBits);
355
+ if (isAdding){
356
+ if (out_code>=out_codeEnd) return 0;//error;
357
+ out_code[0]=plugin->base.windowBits;
358
+ ++out_code;
359
+ }
360
+ uLongf codeLen=(uLongf)(out_codeEnd-out_code);
361
+ if (Z_OK!=_pzlib_compress2(out_code,&codeLen,block_data,block_dictEnd,block_dataEnd,
362
+ blockIndex+1==blockCount?1:0,(z_stream*)blockCompressor))
363
+ return 0; //error
364
+ return codeLen+(isAdding?1:0);
365
+ }
366
+ static hpatch_StreamPos_t _pzlib_compress(const hdiff_TCompress* compressPlugin,
367
+ const hpatch_TStreamOutput* out_code,
368
+ const hpatch_TStreamInput* in_data){
369
+ TCompressPlugin_pzlib* plugin=(TCompressPlugin_pzlib*)compressPlugin;
370
+ const size_t blockSize=256*1024;
371
+ if ((plugin->thread_num<=1)||(plugin->base.compress_level==0)
372
+ ||(in_data->streamSize<blockSize*2)){ //same as "zlib"
373
+ return _zlib_compress(compressPlugin,out_code,in_data);
374
+ }else{
375
+ int dictBits=plugin->base.windowBits;
376
+ if (dictBits<0) dictBits=-dictBits;
377
+ if (dictBits>15) dictBits-=16;
378
+ if (dictBits<9) dictBits=9;
379
+ else if (dictBits>15) dictBits=15;
380
+ plugin->pc.import=plugin;
381
+ return parallel_compress_blocks(&plugin->pc,plugin->thread_num,((size_t)1<<dictBits),blockSize,out_code,in_data);
382
+ }
383
+ }
384
+
385
+ static const TCompressPlugin_pzlib pzlibCompressPlugin={
386
+ { {_zlib_compressType,_default_maxCompressedSize,_pzlib_setThreadNum,_pzlib_compress},
387
+ 6,8,-MAX_WBITS,hpatch_TRUE,Z_DEFAULT_STRATEGY},
388
+ kDefaultCompressThreadNumber ,{0,_default_maxCompressedSize,_pzlib_openBlockCompressor,
389
+ _pzlib_closeBlockCompressor,_pzlib_compressBlock} };
390
+ # endif // _IS_USED_MULTITHREAD
391
+ #endif//_CompressPlugin_zlib
392
+
393
+
394
+ #ifdef _CompressPlugin_ldef
395
+ #if (_IsNeedIncludeDefaultCompressHead)
396
+ # include "libdeflate.h" // "libdeflate/libdeflate.h" https://github.com/sisong/libdeflate/tree/stream-mt based on https://github.com/ebiggers/libdeflate
397
+ #endif
398
+ static const signed char _ldef_kWindowBits=-15; //always as zlib's windowBits -15
399
+ static const size_t _ldef_kDictSize=(1<<15);
400
+ static const size_t _ldef_kMax_in_border_nbytes=258;//deflate max match len
401
+ static size_t _ldef_getBestWorkStepSize(hpatch_StreamPos_t data_size,size_t compress_level,size_t thread_num){
402
+ const size_t _kMinBaseStep=600000;
403
+ size_t base_step_size=1024*1024*2;
404
+ hpatch_StreamPos_t work_count=(data_size+base_step_size-1)/base_step_size;
405
+ if (work_count>=thread_num) return base_step_size;
406
+ size_t step_size=(size_t)((data_size+thread_num-1)/thread_num);
407
+ const size_t minStep=_kMinBaseStep;
408
+ step_size=(step_size>minStep)?step_size:minStep;
409
+ return step_size;
410
+ }
411
+ typedef struct{
412
+ hdiff_TCompress base;
413
+ int compress_level; //0..12
414
+ hpatch_BOOL isNeedSaveWindowBits;
415
+ } TCompressPlugin_ldef;
416
+
417
+ static hpatch_StreamPos_t _ldef_compress(const hdiff_TCompress* compressPlugin,
418
+ const hpatch_TStreamOutput* out_code,
419
+ const hpatch_TStreamInput* in_data){
420
+ const TCompressPlugin_ldef* plugin=(const TCompressPlugin_ldef*)compressPlugin;
421
+ hpatch_StreamPos_t result=0; //writedPos
422
+ hpatch_StreamPos_t readFromPos=0;
423
+ const char* errAt="";
424
+ int outStream_isCanceled=0;
425
+ unsigned char* data_buf=0;
426
+ unsigned char* code_buf=0;
427
+ struct libdeflate_compressor* c=0;
428
+ size_t in_border_nbytes=0;
429
+ const size_t in_step_size=_ldef_getBestWorkStepSize(in_data->streamSize,plugin->compress_level,1);
430
+ const size_t _in_buf_size=_ldef_kDictSize+in_step_size+_ldef_kMax_in_border_nbytes;
431
+ const size_t block_bound=libdeflate_deflate_compress_bound_block(in_step_size);
432
+
433
+ data_buf=(unsigned char*)malloc(_in_buf_size+block_bound);
434
+ if (!data_buf) _compress_error_return("memory alloc");
435
+ code_buf=data_buf+_in_buf_size;
436
+
437
+ c=libdeflate_alloc_compressor(plugin->compress_level);
438
+ if (!c) _compress_error_return("libdeflate_alloc_compressor()");
439
+
440
+ if (plugin->isNeedSaveWindowBits){//save deflate windowBits
441
+ const unsigned char* pchar=(const unsigned char*)&_ldef_kWindowBits;
442
+ if (!out_code->write(out_code,0,pchar,pchar+1)) _compress_error_return("out_code->write()");
443
+ ++result;
444
+ }
445
+ while (readFromPos<in_data->streamSize){
446
+ const size_t curDictSize=(readFromPos>0)?_ldef_kDictSize:0;
447
+ size_t readLen=in_step_size;
448
+ size_t codeLen;
449
+ if (readLen>(hpatch_StreamPos_t)(in_data->streamSize-readFromPos))
450
+ readLen=(size_t)(in_data->streamSize-readFromPos);
451
+ {
452
+ unsigned char* dst_buf=data_buf+curDictSize+in_border_nbytes;
453
+ size_t cur_in_border_nbytes=_ldef_kMax_in_border_nbytes;
454
+ if (readLen+cur_in_border_nbytes>(hpatch_StreamPos_t)(in_data->streamSize-readFromPos))
455
+ cur_in_border_nbytes=(size_t)(in_data->streamSize-readFromPos-readLen);
456
+ if (!in_data->read(in_data,readFromPos+in_border_nbytes,dst_buf,
457
+ dst_buf+readLen+cur_in_border_nbytes-in_border_nbytes))
458
+ _compress_error_return("in_data->read()");
459
+ in_border_nbytes=cur_in_border_nbytes;
460
+ }
461
+ readFromPos+=readLen;
462
+
463
+ codeLen=libdeflate_deflate_compress_block_continue(c,data_buf,curDictSize,readLen,in_border_nbytes,
464
+ (readFromPos==in_data->streamSize),code_buf,block_bound,hpatch_FALSE);
465
+
466
+ if (codeLen>0){
467
+ _stream_out_code_write(out_code,outStream_isCanceled,result,code_buf,codeLen);
468
+ }else
469
+ _compress_error_return("libdeflate_deflate_compress_block_continue()");
470
+ if (readFromPos<in_data->streamSize){
471
+ memmove(data_buf,data_buf+readLen+curDictSize-_ldef_kDictSize,_ldef_kDictSize+in_border_nbytes);
472
+ }
473
+ }
474
+ clear:
475
+ if (c) libdeflate_free_compressor(c);
476
+ _check_compress_result(result,outStream_isCanceled,"_ldef_compress()",errAt);
477
+ if (data_buf) free(data_buf);
478
+ return result;
479
+ }
480
+ _def_fun_compressType(_ldef_compressType,"zlib");
481
+ _def_fun_compressType(_ldef_compressTypeForDisplay,"ldef (zlib compatible)");
482
+ static const TCompressPlugin_ldef ldefCompressPlugin={
483
+ {_ldef_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,
484
+ _ldef_compress,_ldef_compressTypeForDisplay}, 12,hpatch_TRUE};
485
+
486
+ # if (_IS_USED_MULTITHREAD)
487
+ //pldef
488
+ typedef struct {
489
+ TCompressPlugin_ldef base;
490
+ int thread_num; // 1..
491
+ hdiff_TParallelCompress pc;
492
+ } TCompressPlugin_pldef;
493
+ static int _pldef_setThreadNum(hdiff_TCompress* compressPlugin,int threadNum){
494
+ TCompressPlugin_pldef* plugin=(TCompressPlugin_pldef*)compressPlugin;
495
+ plugin->thread_num=threadNum;
496
+ return threadNum;
497
+ }
498
+ static hdiff_compressBlockHandle _pldef_openBlockCompressor(hdiff_TParallelCompress* pc){
499
+ const TCompressPlugin_pldef* plugin=(const TCompressPlugin_pldef*)pc->import;
500
+ return libdeflate_alloc_compressor(plugin->base.compress_level);
501
+ }
502
+ static void _pldef_closeBlockCompressor(hdiff_TParallelCompress* pc,
503
+ hdiff_compressBlockHandle blockCompressor){
504
+ libdeflate_free_compressor((struct libdeflate_compressor*)blockCompressor);
505
+ }
506
+ static
507
+ size_t _pldef_compressBlock(hdiff_TParallelCompress* pc,hdiff_compressBlockHandle blockCompressor,
508
+ hpatch_StreamPos_t blockIndex,hpatch_StreamPos_t blockCount,unsigned char* out_code,unsigned char* out_codeEnd,
509
+ const unsigned char* block_data,const unsigned char* block_dictEnd,const unsigned char* block_dataEnd){
510
+ const TCompressPlugin_pldef* plugin=(const TCompressPlugin_pldef*)pc->import;
511
+ struct libdeflate_compressor* c=(struct libdeflate_compressor*)blockCompressor;
512
+ const hpatch_BOOL isAdding=(blockIndex==0)&&plugin->base.isNeedSaveWindowBits;
513
+ if (isAdding){
514
+ if (out_code>=out_codeEnd) return 0;//error;
515
+ out_code[0]=_ldef_kWindowBits;
516
+ ++out_code;
517
+ }
518
+
519
+ size_t codeLen=libdeflate_deflate_compress_block(c,block_data,block_dictEnd-block_data,block_dataEnd-block_dictEnd,
520
+ blockIndex+1==blockCount,out_code,out_codeEnd-out_code,1);
521
+ if (codeLen==0)
522
+ return 0; //error
523
+ return codeLen+(isAdding?1:0);
524
+ }
525
+ static hpatch_StreamPos_t _pldef_compress(const hdiff_TCompress* compressPlugin,
526
+ const hpatch_TStreamOutput* out_code,
527
+ const hpatch_TStreamInput* in_data){
528
+ TCompressPlugin_pldef* plugin=(TCompressPlugin_pldef*)compressPlugin;
529
+ const size_t blockSize=_ldef_getBestWorkStepSize(in_data->streamSize,plugin->base.compress_level,plugin->thread_num);
530
+ if ((plugin->thread_num<=1)||(plugin->base.compress_level==0)
531
+ ||(in_data->streamSize<blockSize*2)){ //same as "zlib"
532
+ return _ldef_compress(compressPlugin,out_code,in_data);
533
+ }else{
534
+ plugin->pc.import=plugin;
535
+ return parallel_compress_blocks(&plugin->pc,plugin->thread_num,_ldef_kDictSize,blockSize,out_code,in_data);
536
+ }
537
+ }
538
+
539
+
540
+ static const TCompressPlugin_pldef pldefCompressPlugin={
541
+ { {_ldef_compressType,_default_maxCompressedSize,_pldef_setThreadNum,
542
+ _pldef_compress,_ldef_compressTypeForDisplay}, 9,hpatch_TRUE},
543
+ kDefaultCompressThreadNumber ,{0,_default_maxCompressedSize,_pldef_openBlockCompressor,
544
+ _pldef_closeBlockCompressor,_pldef_compressBlock} };
545
+ # endif // _IS_USED_MULTITHREAD
546
+ #endif//_CompressPlugin_ldef
547
+
548
+
549
+ #ifdef _CompressPlugin_bz2
550
+ #if (_IsNeedIncludeDefaultCompressHead)
551
+ # include "bzlib.h" // http://www.bzip.org/ https://github.com/sisong/bzip2
552
+ #endif
553
+ typedef struct{
554
+ hdiff_TCompress base;
555
+ int compress_level; //0..9
556
+ } TCompressPlugin_bz2;
557
+ static hpatch_StreamPos_t _bz2_compress(const hdiff_TCompress* compressPlugin,
558
+ const hpatch_TStreamOutput* out_code,
559
+ const hpatch_TStreamInput* in_data){
560
+ const TCompressPlugin_bz2* plugin=(const TCompressPlugin_bz2*)compressPlugin;
561
+ hpatch_StreamPos_t result=0;
562
+ const char* errAt="";
563
+ unsigned char* _temp_buf=0;
564
+ bz_stream s;
565
+ unsigned char* code_buf,* data_buf;
566
+ int is_eof=0;
567
+ int is_stream_end=0;
568
+ hpatch_StreamPos_t readFromPos=0;
569
+ int outStream_isCanceled=0;
570
+ memset(&s,0,sizeof(s));
571
+
572
+ _temp_buf=(unsigned char*)malloc(kCompressBufSize*2);
573
+ if (!_temp_buf) _compress_error_return("memory alloc");
574
+ code_buf=_temp_buf;
575
+ data_buf=_temp_buf+kCompressBufSize;
576
+ s.next_out = (char*)code_buf;
577
+ s.avail_out = kCompressBufSize;
578
+ if (BZ_OK!=BZ2_bzCompressInit(&s,plugin->compress_level, 0, 0))
579
+ _compress_error_return("BZ2_bzCompressInit()");
580
+ while (1) {
581
+ if ((s.avail_out<kCompressBufSize)|is_stream_end){
582
+ size_t writeLen=kCompressBufSize-s.avail_out;
583
+ if (writeLen>0){
584
+ _stream_out_code_write(out_code,outStream_isCanceled,result,code_buf,writeLen);
585
+ }
586
+ s.next_out=(char*)code_buf;
587
+ s.avail_out=kCompressBufSize;
588
+ if (is_stream_end)
589
+ break;//end loop
590
+ }else{
591
+ if (s.avail_in>0){
592
+ if (BZ_RUN_OK!=BZ2_bzCompress(&s,BZ_RUN)) _compress_error_return("BZ2_bzCompress()");
593
+ }else if (is_eof){
594
+ int ret=BZ2_bzCompress(&s,BZ_FINISH);
595
+ is_stream_end= (ret==BZ_STREAM_END);
596
+ if ((ret!=BZ_STREAM_END)&&(ret!=BZ_FINISH_OK))
597
+ _compress_error_return("BZ2_bzCompress() BZ_FINISH");
598
+ }else{
599
+ size_t readLen=kCompressBufSize;
600
+ if (readFromPos+readLen>in_data->streamSize)
601
+ readLen=(size_t)(in_data->streamSize-readFromPos);
602
+ if (readLen==0){
603
+ is_eof=1;
604
+ }else{
605
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+readLen))
606
+ _compress_error_return("in_data->read()");
607
+ readFromPos+=readLen;
608
+ s.next_in=(char*)data_buf;
609
+ s.avail_in=(unsigned int)readLen;
610
+ }
611
+ }
612
+ }
613
+ }
614
+ clear:
615
+ if (BZ_OK!=BZ2_bzCompressEnd(&s))
616
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="BZ2_bzCompressEnd()"; }
617
+ _check_compress_result(result,outStream_isCanceled,"_bz2_compress()",errAt);
618
+ if (_temp_buf) free(_temp_buf);
619
+ return result;
620
+ }
621
+ _def_fun_compressType(_bz2_compressType,"bz2");
622
+ static const TCompressPlugin_bz2 bz2CompressPlugin={
623
+ {_bz2_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_bz2_compress}, 9};
624
+
625
+ # if (_IS_USED_MULTITHREAD)
626
+ //pbz2
627
+ typedef struct{
628
+ TCompressPlugin_bz2 base;
629
+ int thread_num; // 1..
630
+ hdiff_TParallelCompress pc;
631
+ } TCompressPlugin_pbz2;
632
+ static int _pbz2_setThreadNum(hdiff_TCompress* compressPlugin,int threadNum){
633
+ TCompressPlugin_pbz2* plugin=(TCompressPlugin_pbz2*)compressPlugin;
634
+ plugin->thread_num=threadNum;
635
+ return threadNum;
636
+ }
637
+ static hdiff_compressBlockHandle _pbz2_openBlockCompressor(hdiff_TParallelCompress* pc){
638
+ return pc;
639
+ }
640
+ static void _pbz2_closeBlockCompressor(hdiff_TParallelCompress* pc,
641
+ hdiff_compressBlockHandle blockCompressor){
642
+ assert(blockCompressor==pc);
643
+ }
644
+ static
645
+ size_t _pbz2_compressBlock(hdiff_TParallelCompress* pc,hdiff_compressBlockHandle blockCompressor,
646
+ hpatch_StreamPos_t blockIndex,hpatch_StreamPos_t blockCount,unsigned char* out_code,unsigned char* out_codeEnd,
647
+ const unsigned char* block_data,const unsigned char* block_dictEnd,const unsigned char* block_dataEnd){
648
+ const TCompressPlugin_pbz2* plugin=(const TCompressPlugin_pbz2*)pc->import;
649
+ unsigned int codeLen=(unsigned int)(out_codeEnd-out_code);
650
+ if (BZ_OK!=BZ2_bzBuffToBuffCompress((char*)out_code,&codeLen,(char*)block_data,
651
+ (unsigned int)(block_dataEnd-block_data),
652
+ plugin->base.compress_level,0,0)) return 0; //error
653
+ return codeLen;
654
+ }
655
+ static hpatch_StreamPos_t _pbz2_compress(const hdiff_TCompress* compressPlugin,
656
+ const hpatch_TStreamOutput* out_code,
657
+ const hpatch_TStreamInput* in_data){
658
+ TCompressPlugin_pbz2* plugin=(TCompressPlugin_pbz2*)compressPlugin;
659
+ const size_t blockSize=plugin->base.compress_level*100000;
660
+ if ((plugin->thread_num<=1)||(plugin->base.compress_level==0)
661
+ ||(in_data->streamSize<blockSize*2)){ //same as "bz2"
662
+ return _bz2_compress(compressPlugin,out_code,in_data);
663
+ }else{
664
+ plugin->pc.import=plugin;
665
+ return parallel_compress_blocks(&plugin->pc,plugin->thread_num,0,blockSize,out_code,in_data);
666
+ }
667
+ }
668
+
669
+ _def_fun_compressType(_pbz2_compressType,"pbz2");
670
+ static const TCompressPlugin_pbz2 pbz2CompressPlugin={
671
+ { {_pbz2_compressType,_default_maxCompressedSize,_pbz2_setThreadNum,_pbz2_compress}, 8},
672
+ kDefaultCompressThreadNumber ,{0,_default_maxCompressedSize,_pbz2_openBlockCompressor,
673
+ _pbz2_closeBlockCompressor,_pbz2_compressBlock} };
674
+ # endif // _IS_USED_MULTITHREAD
675
+ #endif//_CompressPlugin_bz2
676
+
677
+
678
+ #if (defined _CompressPlugin_lzma)||(defined _CompressPlugin_lzma2)||(defined _CompressPlugin_7zXZ)
679
+ #if (_IsNeedIncludeDefaultCompressHead)
680
+ # include "LzmaEnc.h" // "lzma/C/LzmaEnc.h" https://github.com/sisong/lzma
681
+ # ifdef _CompressPlugin_lzma2
682
+ # include "Lzma2Enc.h"
683
+ # endif
684
+ #endif
685
+ static void * __lzma_enc_Alloc(ISzAllocPtr p, size_t size){
686
+ return malloc(size);
687
+ }
688
+ static void __lzma_enc_Free(ISzAllocPtr p, void *address){
689
+ free(address);
690
+ }
691
+ static ISzAlloc __lzma_enc_alloc={__lzma_enc_Alloc,__lzma_enc_Free};
692
+
693
+ struct __lzma_SeqOutStream_t{
694
+ ISeqOutStream base;
695
+ const hpatch_TStreamOutput* out_code;
696
+ hpatch_StreamPos_t writeToPos;
697
+ int isCanceled;
698
+ };
699
+ static size_t __lzma_SeqOutStream_Write(const ISeqOutStream *p, const void *buf, size_t size){
700
+ __lzma_SeqOutStream_t* self=(__lzma_SeqOutStream_t*)p;
701
+ const unsigned char* pdata=(const unsigned char*)buf;
702
+ if (size>0){
703
+ if (!self->out_code->write(self->out_code,self->writeToPos,pdata,pdata+size)){
704
+ self->isCanceled=1;
705
+ return 0;
706
+ }
707
+ }
708
+ self->writeToPos+=size;
709
+ return size;
710
+ }
711
+ struct __lzma_SeqInStream_t{
712
+ ISeqInStream base;
713
+ const hpatch_TStreamInput* in_data;
714
+ hpatch_StreamPos_t readFromPos;
715
+ };
716
+ static SRes __lzma_SeqInStream_Read(const ISeqInStream *p, void *buf, size_t *size){
717
+ __lzma_SeqInStream_t* self=(__lzma_SeqInStream_t*)p;
718
+ size_t readLen=*size;
719
+ if (readLen+self->readFromPos>self->in_data->streamSize)
720
+ readLen=(size_t)(self->in_data->streamSize-self->readFromPos);
721
+ if (readLen>0){
722
+ unsigned char* pdata=(unsigned char*)buf;
723
+ if (!self->in_data->read(self->in_data,self->readFromPos,pdata,pdata+readLen)){
724
+ *size=0;
725
+ return SZ_ERROR_READ;
726
+ }
727
+ }
728
+ self->readFromPos+=readLen;
729
+ *size=readLen;
730
+ return SZ_OK;
731
+ }
732
+ #endif
733
+
734
+ #ifdef _CompressPlugin_lzma
735
+ typedef struct{
736
+ hdiff_TCompress base;
737
+ int compress_level; //0..9
738
+ UInt32 dict_size; //patch decompress need 4?*lzma_dictSize memory
739
+ int thread_num; //1..2
740
+ } TCompressPlugin_lzma;
741
+ static int _lzma_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
742
+ TCompressPlugin_lzma* plugin=(TCompressPlugin_lzma*)compressPlugin;
743
+ if (threadNum>2) threadNum=2;
744
+ plugin->thread_num=threadNum;
745
+ return threadNum;
746
+ }
747
+ static hpatch_StreamPos_t _lzma_compress(const hdiff_TCompress* compressPlugin,
748
+ const hpatch_TStreamOutput* out_code,
749
+ const hpatch_TStreamInput* in_data){
750
+ const TCompressPlugin_lzma* plugin=(const TCompressPlugin_lzma*)compressPlugin;
751
+ struct __lzma_SeqOutStream_t outStream={{__lzma_SeqOutStream_Write},out_code,0,0};
752
+ struct __lzma_SeqInStream_t inStream={{__lzma_SeqInStream_Read},in_data,0};
753
+ hpatch_StreamPos_t result=0;
754
+ const char* errAt="";
755
+ #if (IS_REUSE_compress_handle)
756
+ static CLzmaEncHandle s=0;
757
+ #else
758
+ CLzmaEncHandle s=0;
759
+ #endif
760
+ CLzmaEncProps props;
761
+ unsigned char properties_buf[LZMA_PROPS_SIZE+1];
762
+ SizeT properties_size=LZMA_PROPS_SIZE;
763
+ SRes ret;
764
+ hpatch_uint32_t dictSize=plugin->dict_size;
765
+ if (!s) s=LzmaEnc_Create(&__lzma_enc_alloc);
766
+ if (!s) _compress_error_return("LzmaEnc_Create()");
767
+ LzmaEncProps_Init(&props);
768
+ props.level=plugin->compress_level;
769
+ props.dictSize=dictSize;
770
+ props.reduceSize=in_data->streamSize;
771
+ props.numThreads=plugin->thread_num;
772
+ LzmaEncProps_Normalize(&props);
773
+ if (SZ_OK!=LzmaEnc_SetProps(s,&props)) _compress_error_return("LzmaEnc_SetProps()");
774
+ # if (IS_NOTICE_compress_canceled)
775
+ printf(" (used one lzma dictSize: %" PRIu64 " (input data: %" PRIu64 "))\n",
776
+ (hpatch_StreamPos_t)props.dictSize,in_data->streamSize);
777
+ # endif
778
+
779
+ //save properties_size+properties
780
+ assert(LZMA_PROPS_SIZE<256);
781
+ if (SZ_OK!=LzmaEnc_WriteProperties(s,properties_buf+1,&properties_size))
782
+ _compress_error_return("LzmaEnc_WriteProperties()");
783
+ properties_buf[0]=(unsigned char)properties_size;
784
+
785
+ if (1+properties_size!=__lzma_SeqOutStream_Write(&outStream.base,properties_buf,1+properties_size))
786
+ _compress_error_return("out_code->write()");
787
+
788
+ ret=LzmaEnc_Encode(s,&outStream.base,&inStream.base,0,&__lzma_enc_alloc,&__lzma_enc_alloc);
789
+ if (SZ_OK==ret){
790
+ result=outStream.writeToPos;
791
+ }else{//fail
792
+ if (ret==SZ_ERROR_READ)
793
+ _compress_error_return("in_data->read()");
794
+ else if (ret==SZ_ERROR_WRITE)
795
+ _compress_error_return("out_code->write()");
796
+ else
797
+ _compress_error_return("LzmaEnc_Encode()");
798
+ }
799
+ clear:
800
+ #if (!IS_REUSE_compress_handle)
801
+ if (s) { LzmaEnc_Destroy(s,&__lzma_enc_alloc,&__lzma_enc_alloc); s=0; }
802
+ #endif
803
+ _check_compress_result(result,outStream.isCanceled,"_lzma_compress()",errAt);
804
+ return result;
805
+ }
806
+ _def_fun_compressType(_lzma_compressType,"lzma");
807
+ static const TCompressPlugin_lzma lzmaCompressPlugin={
808
+ {_lzma_compressType,_default_maxCompressedSize,_lzma_setThreadNumber,_lzma_compress},
809
+ 7,(1<<23),(kDefaultCompressThreadNumber>=2)?2:kDefaultCompressThreadNumber};
810
+ #endif//_CompressPlugin_lzma
811
+
812
+ #ifdef _CompressPlugin_lzma2
813
+ #if (_IsNeedIncludeDefaultCompressHead)
814
+ # include "MtCoder.h" // "lzma/C/MtCoder.h" for MTCODER__THREADS_MAX
815
+ #endif
816
+ struct TCompressPlugin_lzma2{
817
+ hdiff_TCompress base;
818
+ int compress_level; //0..9
819
+ UInt32 dict_size; //patch decompress need 4?*lzma_dictSize memory
820
+ int thread_num; //1..(64?)
821
+ };
822
+ static int _lzma2_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
823
+ TCompressPlugin_lzma2* plugin=(TCompressPlugin_lzma2*)compressPlugin;
824
+ if (threadNum>MTCODER_THREADS_MAX) threadNum=MTCODER_THREADS_MAX;
825
+ plugin->thread_num=threadNum;
826
+ return threadNum;
827
+ }
828
+ static hpatch_StreamPos_t _lzma2_compress(const hdiff_TCompress* compressPlugin,
829
+ const hpatch_TStreamOutput* out_code,
830
+ const hpatch_TStreamInput* in_data){
831
+ const TCompressPlugin_lzma2* plugin=(const TCompressPlugin_lzma2*)compressPlugin;
832
+ struct __lzma_SeqOutStream_t outStream={{__lzma_SeqOutStream_Write},out_code,0,0};
833
+ struct __lzma_SeqInStream_t inStream={{__lzma_SeqInStream_Read},in_data,0};
834
+ hpatch_StreamPos_t result=0;
835
+ const char* errAt="";
836
+ #if (IS_REUSE_compress_handle)
837
+ static CLzma2EncHandle s=0;
838
+ #else
839
+ CLzma2EncHandle s=0;
840
+ #endif
841
+ CLzma2EncProps props;
842
+ Byte properties_size=0;
843
+ SRes ret;
844
+ hpatch_uint32_t dictSize=plugin->dict_size;
845
+ if (!s) s=Lzma2Enc_Create(&__lzma_enc_alloc,&__lzma_enc_alloc);
846
+ if (!s) _compress_error_return("LzmaEnc_Create()");
847
+ Lzma2EncProps_Init(&props);
848
+ props.lzmaProps.level=plugin->compress_level;
849
+ props.lzmaProps.dictSize=dictSize;
850
+ props.lzmaProps.reduceSize=in_data->streamSize;
851
+ props.blockSize=LZMA2_ENC_PROPS_BLOCK_SIZE_AUTO;
852
+ props.numTotalThreads=plugin->thread_num;
853
+ Lzma2EncProps_Normalize(&props);
854
+ if (SZ_OK!=Lzma2Enc_SetProps(s,&props)) _compress_error_return("Lzma2Enc_SetProps()");
855
+ # if (IS_NOTICE_compress_canceled)
856
+ printf(" (used one lzma2 dictSize: %" PRIu64 " (input data: %" PRIu64 "))\n",
857
+ (hpatch_StreamPos_t)props.lzmaProps.dictSize,in_data->streamSize);
858
+ # endif
859
+
860
+ //save properties_size+properties
861
+ assert(LZMA_PROPS_SIZE<256);
862
+ properties_size=Lzma2Enc_WriteProperties(s);
863
+
864
+ if (1!=__lzma_SeqOutStream_Write(&outStream.base,&properties_size,1))
865
+ _compress_error_return("out_code->write()");
866
+
867
+ ret=Lzma2Enc_Encode2(s,&outStream.base,0,0,&inStream.base,0,0,0);
868
+ if (SZ_OK==ret){
869
+ result=outStream.writeToPos;
870
+ }else{//fail
871
+ if (ret==SZ_ERROR_READ)
872
+ _compress_error_return("in_data->read()");
873
+ else if (ret==SZ_ERROR_WRITE)
874
+ _compress_error_return("out_code->write()");
875
+ else
876
+ _compress_error_return("Lzma2Enc_Encode2()");
877
+ }
878
+ clear:
879
+ #if (!IS_REUSE_compress_handle)
880
+ if (s) { Lzma2Enc_Destroy(s); s=0; }
881
+ #endif
882
+ _check_compress_result(result,outStream.isCanceled,"_lzma2_compress()",errAt);
883
+ return result;
884
+ }
885
+ _def_fun_compressType(_lzma2_compressType,"lzma2");
886
+ static const TCompressPlugin_lzma2 lzma2CompressPlugin={
887
+ {_lzma2_compressType,_default_maxCompressedSize,_lzma2_setThreadNumber,_lzma2_compress},
888
+ 7,(1<<23),kDefaultCompressThreadNumber};
889
+ #endif//_CompressPlugin_lzma2
890
+
891
+ #ifdef _CompressPlugin_7zXZ
892
+ #if (_IsNeedIncludeDefaultCompressHead)
893
+ # include "XzEnc.h" // "lzma/C/XzEnc.h" https://github.com/sisong/lzma
894
+ # include "MtCoder.h" // "lzma/C/MtCoder.h" for MTCODER__THREADS_MAX
895
+ # include "7zCrc.h" // CrcGenerateTable()
896
+ #endif
897
+
898
+ #ifndef _init_CompressPlugin_7zXZ_DEF
899
+ # define _init_CompressPlugin_7zXZ_DEF
900
+ static int _init_CompressPlugin_7zXZ(){
901
+ static hpatch_BOOL _isInit=hpatch_FALSE;
902
+ if (!_isInit){
903
+ CrcGenerateTable();
904
+ _isInit=hpatch_TRUE;
905
+ }
906
+ return 0;
907
+ }
908
+ #endif
909
+
910
+ typedef struct{
911
+ hdiff_TCompress base;
912
+ int compress_level; //0..9
913
+ UInt32 dict_size; //patch decompress need 3?*lzma_dictSize memory
914
+ int thread_num; //1..(64?)
915
+ } TCompressPlugin_7zXZ;
916
+ static int _7zXZ_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
917
+ TCompressPlugin_lzma2* plugin=(TCompressPlugin_lzma2*)compressPlugin;
918
+ if (threadNum>MTCODER_THREADS_MAX) threadNum=MTCODER_THREADS_MAX;
919
+ plugin->thread_num=threadNum;
920
+ return threadNum;
921
+ }
922
+
923
+ typedef void* _7zXZ_compressHandle;
924
+ static _7zXZ_compressHandle _7zXZ_compress_open(const hdiff_TCompress* compressPlugin){
925
+ const TCompressPlugin_7zXZ* plugin=(const TCompressPlugin_7zXZ*)compressPlugin;
926
+ _7zXZ_compressHandle result=0;
927
+ const char* errAt="";
928
+ #if (IS_REUSE_compress_handle)
929
+ static CXzEncHandle s=0;
930
+ #else
931
+ CXzEncHandle s=0;
932
+ #endif
933
+ CXzProps xzprops;
934
+ hpatch_uint32_t dictSize=plugin->dict_size;
935
+ if (!s) s=XzEnc_Create(&__lzma_enc_alloc,&__lzma_enc_alloc);
936
+ if (!s) _compress_error_return("XzEnc_Create()");
937
+ XzProps_Init(&xzprops);
938
+ xzprops.lzma2Props.lzmaProps.level=plugin->compress_level;
939
+ xzprops.lzma2Props.lzmaProps.dictSize=dictSize;
940
+ xzprops.lzma2Props.numTotalThreads=plugin->thread_num;
941
+ Lzma2EncProps_Normalize(&xzprops.lzma2Props);
942
+ xzprops.numTotalThreads=plugin->thread_num;
943
+ xzprops.checkId=XZ_CHECK_NO;
944
+ if (SZ_OK!=XzEnc_SetProps(s,&xzprops)) _compress_error_return("XzEnc_SetProps()");
945
+ return s;
946
+ clear:
947
+ #if (!IS_REUSE_compress_handle)
948
+ if (s) { XzEnc_Destroy(s); s=0; }
949
+ #endif
950
+ return result;
951
+ }
952
+ static hpatch_BOOL _7zXZ_compress_close(const hdiff_TCompress* compressPlugin,
953
+ _7zXZ_compressHandle compressHandle){
954
+ #if (!IS_REUSE_compress_handle)
955
+ CXzEncHandle s=(CXzEncHandle)compressHandle;
956
+ if (s) { XzEnc_Destroy(s); s=0; }
957
+ #endif
958
+ return hpatch_TRUE;
959
+ }
960
+
961
+ static hpatch_StreamPos_t _7zXZ_compress_encode(_7zXZ_compressHandle compressHandle,
962
+ const hpatch_TStreamOutput* out_code,
963
+ const hpatch_TStreamInput* in_data,
964
+ hpatch_BOOL isWriteHead,hpatch_BOOL isWriteEnd){
965
+ struct __lzma_SeqOutStream_t outStream={{__lzma_SeqOutStream_Write},out_code,0,0};
966
+ struct __lzma_SeqInStream_t inStream={{__lzma_SeqInStream_Read},in_data,0};
967
+ hpatch_StreamPos_t result=0;
968
+ const char* errAt="";
969
+ CXzEncHandle s=(CXzEncHandle)compressHandle;
970
+ SRes ret;
971
+ XzEnc_SetDataSize(s,in_data->streamSize);
972
+
973
+ ret=XzEnc_Encode_Part(s,&outStream.base,&inStream.base,0,isWriteHead,isWriteEnd);
974
+ if (SZ_OK==ret){
975
+ result=outStream.writeToPos;
976
+ }else{//fail
977
+ if (ret==SZ_ERROR_READ)
978
+ _compress_error_return("in_data->read()");
979
+ else if (ret==SZ_ERROR_WRITE)
980
+ _compress_error_return("out_code->write()");
981
+ else
982
+ _compress_error_return("XzEnc_Encode_Part()");
983
+ }
984
+ clear:
985
+ _check_compress_result(result,outStream.isCanceled,"_7zXZ_compress_encode()",errAt);
986
+ return result;
987
+ }
988
+
989
+ static hpatch_StreamPos_t _7zXZ_compress(const hdiff_TCompress* compressPlugin,
990
+ const hpatch_TStreamOutput* out_code,
991
+ const hpatch_TStreamInput* in_data){
992
+ const TCompressPlugin_7zXZ* plugin=(const TCompressPlugin_7zXZ*)compressPlugin;
993
+ hpatch_StreamPos_t result=0;
994
+ const char* errAt="";
995
+ _7zXZ_compressHandle s=_7zXZ_compress_open(compressPlugin);
996
+ if (!s) _compress_error_return("_7zXZ_compress_open()");
997
+ result=_7zXZ_compress_encode(s,out_code,in_data,hpatch_TRUE,hpatch_TRUE);
998
+ if (result==0)
999
+ _compress_error_return("_7zXZ_compress_encode()");
1000
+ clear:
1001
+ if (s) { _7zXZ_compress_close(compressPlugin,s); s=0; }
1002
+ return result;
1003
+ }
1004
+ _def_fun_compressType(_7zXZ_compressType,"7zXZ");
1005
+ static const TCompressPlugin_7zXZ _7zXZCompressPlugin={
1006
+ {_7zXZ_compressType,_default_maxCompressedSize,_7zXZ_setThreadNumber,_7zXZ_compress},
1007
+ 7,(1<<23),kDefaultCompressThreadNumber};
1008
+
1009
+ #endif //_CompressPlugin_7zXZ
1010
+
1011
+
1012
+ #if (defined(_CompressPlugin_lz4) || defined(_CompressPlugin_lz4hc))
1013
+ #if (_IsNeedIncludeDefaultCompressHead)
1014
+ # include "lz4.h" // "lz4/lib/lz4.h" https://github.com/lz4/lz4
1015
+ # include "lz4hc.h"
1016
+ #endif
1017
+ struct TCompressPlugin_lz4{
1018
+ hdiff_TCompress base;
1019
+ int compress_level; //1..50 default 50
1020
+ };
1021
+ struct TCompressPlugin_lz4hc{
1022
+ hdiff_TCompress base;
1023
+ int compress_level; //3..12
1024
+ };
1025
+
1026
+ #define _lz4_write_len4(out_code,isCanceled,writePos,len) { \
1027
+ unsigned char _temp_buf4[4]; \
1028
+ _temp_buf4[0]=(unsigned char)(len); \
1029
+ _temp_buf4[1]=(unsigned char)((len)>>8); \
1030
+ _temp_buf4[2]=(unsigned char)((len)>>16);\
1031
+ _temp_buf4[3]=(unsigned char)((len)>>24);\
1032
+ _stream_out_code_write(out_code,isCanceled,writePos,_temp_buf4,4); \
1033
+ }
1034
+ static hpatch_StreamPos_t _lz4_compress(const hdiff_TCompress* compressPlugin,
1035
+ const hpatch_TStreamOutput* out_code,
1036
+ const hpatch_TStreamInput* in_data){
1037
+ const TCompressPlugin_lz4* plugin=(const TCompressPlugin_lz4*)compressPlugin;
1038
+ const int kLZ4DefaultAcceleration=50-(plugin->compress_level-1);
1039
+ hpatch_StreamPos_t result=0;
1040
+ const char* errAt="";
1041
+ unsigned char* _temp_buf=0;
1042
+ unsigned char* code_buf,* data_buf,* data_buf_back;
1043
+ LZ4_stream_t* s=0;
1044
+ hpatch_StreamPos_t readFromPos=0;
1045
+ int outStream_isCanceled=0;
1046
+ int kLz4CompressBufSize =1024*510; //patch decompress need 4*2*0.5MB memory
1047
+ int code_buf_size;
1048
+ if ((size_t)kLz4CompressBufSize>in_data->streamSize)
1049
+ kLz4CompressBufSize=(int)in_data->streamSize;
1050
+ code_buf_size=LZ4_compressBound(kLz4CompressBufSize);
1051
+
1052
+ _temp_buf=(unsigned char*)malloc(kLz4CompressBufSize*2+code_buf_size);
1053
+ if (!_temp_buf) _compress_error_return("memory alloc");
1054
+ data_buf_back=_temp_buf;
1055
+ data_buf=_temp_buf+kLz4CompressBufSize;
1056
+ code_buf=_temp_buf+kLz4CompressBufSize*2;
1057
+
1058
+ s=LZ4_createStream();
1059
+ if (!s) _compress_error_return("LZ4_createStream()");
1060
+ //out kLz4CompressBufSize
1061
+ _lz4_write_len4(out_code,outStream_isCanceled,result,kLz4CompressBufSize);
1062
+
1063
+ while (1) {
1064
+ int codeLen;
1065
+ unsigned char* _swap=data_buf;
1066
+ data_buf=data_buf_back;
1067
+ data_buf_back=_swap;
1068
+ int dataLen=kLz4CompressBufSize;
1069
+ if ((size_t)dataLen>(in_data->streamSize-readFromPos))
1070
+ dataLen=(int)(in_data->streamSize-readFromPos);
1071
+ if (dataLen==0)
1072
+ break;//finish
1073
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+dataLen))
1074
+ _compress_error_return("in_data->read()");
1075
+ readFromPos+=dataLen;
1076
+
1077
+ codeLen=LZ4_compress_fast_continue(s,(const char*)data_buf,(char*)code_buf,
1078
+ dataLen,code_buf_size,kLZ4DefaultAcceleration);
1079
+ if (codeLen<=0) _compress_error_return("LZ4_compress_fast_continue()");
1080
+ //out step codeLen
1081
+ _lz4_write_len4(out_code,outStream_isCanceled,result,codeLen);
1082
+ //out code
1083
+ _stream_out_code_write(out_code,outStream_isCanceled,result,code_buf,codeLen);
1084
+ }
1085
+ clear:
1086
+ if (0!=LZ4_freeStream(s))
1087
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="LZ4_freeStream()"; }
1088
+ _check_compress_result(result,outStream_isCanceled,"_lz4_compress()",errAt);
1089
+ if (_temp_buf) free(_temp_buf);
1090
+ return result;
1091
+ }
1092
+
1093
+ static hpatch_StreamPos_t _lz4hc_compress(const hdiff_TCompress* compressPlugin,
1094
+ const hpatch_TStreamOutput* out_code,
1095
+ const hpatch_TStreamInput* in_data){
1096
+ const TCompressPlugin_lz4hc* plugin=(const TCompressPlugin_lz4hc*)compressPlugin;
1097
+ hpatch_StreamPos_t result=0;
1098
+ const char* errAt="";
1099
+ unsigned char* _temp_buf=0;
1100
+ unsigned char* code_buf,* data_buf,* data_buf_back;
1101
+ LZ4_streamHC_t* s=0;
1102
+ hpatch_StreamPos_t readFromPos=0;
1103
+ int outStream_isCanceled=0;
1104
+ int kLz4CompressBufSize =1024*510; //patch decompress need 4*2*0.5MB memory
1105
+ int code_buf_size;
1106
+ if ((size_t)kLz4CompressBufSize>in_data->streamSize)
1107
+ kLz4CompressBufSize=(int)in_data->streamSize;
1108
+ code_buf_size=LZ4_compressBound(kLz4CompressBufSize);
1109
+
1110
+ _temp_buf=(unsigned char*)malloc(kLz4CompressBufSize*2+code_buf_size);
1111
+ if (!_temp_buf) _compress_error_return("memory alloc");
1112
+ data_buf_back=_temp_buf;
1113
+ data_buf=_temp_buf+kLz4CompressBufSize;
1114
+ code_buf=_temp_buf+kLz4CompressBufSize*2;
1115
+
1116
+ s=LZ4_createStreamHC();
1117
+ if (!s) _compress_error_return("LZ4_createStreamHC()");
1118
+ LZ4_resetStreamHC(s,plugin->compress_level);
1119
+ //out kLz4CompressBufSize
1120
+ _lz4_write_len4(out_code,outStream_isCanceled,result,kLz4CompressBufSize);
1121
+
1122
+ while (1) {
1123
+ int codeLen;
1124
+ unsigned char* _swap=data_buf;
1125
+ data_buf=data_buf_back;
1126
+ data_buf_back=_swap;
1127
+ int dataLen=kLz4CompressBufSize;
1128
+ if ((size_t)dataLen>(in_data->streamSize-readFromPos))
1129
+ dataLen=(int)(in_data->streamSize-readFromPos);
1130
+ if (dataLen==0)
1131
+ break;//finish
1132
+ if (!in_data->read(in_data,readFromPos,data_buf,data_buf+dataLen))
1133
+ _compress_error_return("in_data->read()");
1134
+ readFromPos+=dataLen;
1135
+
1136
+ codeLen=LZ4_compress_HC_continue(s,(const char*)data_buf,(char*)code_buf,
1137
+ dataLen,code_buf_size);
1138
+ if (codeLen<=0) _compress_error_return("LZ4_compress_HC_continue()");
1139
+ //out step codeLen
1140
+ _lz4_write_len4(out_code,outStream_isCanceled,result,codeLen);
1141
+ //out code
1142
+ _stream_out_code_write(out_code,outStream_isCanceled,result,code_buf,codeLen);
1143
+ }
1144
+ clear:
1145
+ if (0!=LZ4_freeStreamHC(s))
1146
+ { result=kCompressFailResult; if (strlen(errAt)==0) errAt="LZ4_freeStreamHC()"; }
1147
+ _check_compress_result(result,outStream_isCanceled,"_lz4hc_compress()",errAt);
1148
+ if (_temp_buf) free(_temp_buf);
1149
+ return result;
1150
+ }
1151
+
1152
+ _def_fun_compressType(_lz4_compressType,"lz4");
1153
+ static TCompressPlugin_lz4 lz4CompressPlugin={
1154
+ {_lz4_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_lz4_compress}, 50};
1155
+ static TCompressPlugin_lz4hc lz4hcCompressPlugin ={
1156
+ {_lz4_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_lz4hc_compress}, 11};
1157
+ #endif//_CompressPlugin_lz4 or _CompressPlugin_lz4hc
1158
+
1159
+
1160
+ #ifdef _CompressPlugin_zstd
1161
+ #if (_IsNeedIncludeDefaultCompressHead)
1162
+ # include "zstd.h" // "zstd/lib/zstd.h" https://github.com/sisong/zstd
1163
+ #endif
1164
+ struct TCompressPlugin_zstd{
1165
+ hdiff_TCompress base;
1166
+ int compress_level; //0..22
1167
+ int dict_bits; // 10..(30 or 31)
1168
+ int thread_num; //1..(200?)
1169
+ };
1170
+ static int _zstd_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
1171
+ TCompressPlugin_zstd* plugin=(TCompressPlugin_zstd*)compressPlugin;
1172
+ #define ZSTDMT_NBWORKERS_MAX 200
1173
+ if (threadNum>ZSTDMT_NBWORKERS_MAX) threadNum=ZSTDMT_NBWORKERS_MAX;
1174
+ plugin->thread_num=threadNum;
1175
+ return threadNum;
1176
+ }
1177
+ static hpatch_StreamPos_t _zstd_compress(const hdiff_TCompress* compressPlugin,
1178
+ const hpatch_TStreamOutput* out_code,
1179
+ const hpatch_TStreamInput* in_data){
1180
+ const TCompressPlugin_zstd* plugin=(const TCompressPlugin_zstd*)compressPlugin;
1181
+ hpatch_StreamPos_t result=0;
1182
+ const char* errAt="";
1183
+ unsigned char* _temp_buf=0;
1184
+ ZSTD_inBuffer s_input;
1185
+ ZSTD_outBuffer s_output;
1186
+ #if (IS_REUSE_compress_handle)
1187
+ static ZSTD_CCtx* s=0;
1188
+ #else
1189
+ ZSTD_CCtx* s=0;
1190
+ #endif
1191
+ hpatch_StreamPos_t readFromPos=0;
1192
+ int outStream_isCanceled=0;
1193
+ int dict_bits;
1194
+ size_t ret;
1195
+
1196
+ s_input.size=ZSTD_CStreamInSize();
1197
+ s_output.size=ZSTD_CStreamOutSize();
1198
+ _temp_buf=(unsigned char*)malloc(s_input.size+s_output.size);
1199
+ if (!_temp_buf) _compress_error_return("memory alloc");
1200
+ s_input.src=_temp_buf;
1201
+ s_output.dst=_temp_buf+s_input.size;
1202
+
1203
+ if (!s) s=ZSTD_createCCtx();
1204
+ else ZSTD_CCtx_reset(s,ZSTD_reset_session_only);
1205
+ if (!s) _compress_error_return("ZSTD_createCCtx()");
1206
+ ret=ZSTD_CCtx_setParameter(s,ZSTD_c_compressionLevel,plugin->compress_level);
1207
+ if (ZSTD_isError(ret)) _compress_error_return("ZSTD_CCtx_setParameter(,ZSTD_c_compressionLevel)");
1208
+ ZSTD_CCtx_setPledgedSrcSize(s,in_data->streamSize);
1209
+ #define _ZSTD_WINDOWLOG_MIN 10
1210
+ dict_bits=plugin->dict_bits;
1211
+ while (((((hpatch_StreamPos_t)1)<<(dict_bits-1)) >= in_data->streamSize)
1212
+ &&((dict_bits-1)>=_ZSTD_WINDOWLOG_MIN)) {
1213
+ --dict_bits;
1214
+ }
1215
+ # if (IS_NOTICE_compress_canceled)
1216
+ printf(" (used one zstd dictSize: %" PRIu64 " (input data: %" PRIu64 "))\n",
1217
+ ((hpatch_StreamPos_t)1)<<dict_bits,in_data->streamSize);
1218
+ # endif
1219
+ ret=ZSTD_CCtx_setParameter(s,ZSTD_c_windowLog,dict_bits);
1220
+ if (ZSTD_isError(ret)) _compress_error_return("ZSTD_CCtx_setParameter(,ZSTD_c_windowLog)");
1221
+ if (plugin->thread_num>1){
1222
+ ret=ZSTD_CCtx_setParameter(s, ZSTD_c_nbWorkers,plugin->thread_num);
1223
+ //if (ZSTD_isError(ret)) printf(" (NOTICE: zstd unsupport multi-threading, warning.)\n");
1224
+ }
1225
+
1226
+ for (;;){
1227
+ if (readFromPos<in_data->streamSize){
1228
+ s_input.pos=0;
1229
+ if (s_input.size>(in_data->streamSize-readFromPos))
1230
+ s_input.size=(size_t)(in_data->streamSize-readFromPos);
1231
+ if (!in_data->read(in_data,readFromPos,(unsigned char*)s_input.src,
1232
+ (unsigned char*)s_input.src+s_input.size))
1233
+ _compress_error_return("in_data->read()");
1234
+ readFromPos+=s_input.size;
1235
+ }
1236
+ {
1237
+ const int lastChunk=(readFromPos==in_data->streamSize);
1238
+ const ZSTD_EndDirective mode=lastChunk?ZSTD_e_end:ZSTD_e_continue;
1239
+ int finished;
1240
+ do {
1241
+ s_output.pos=0;
1242
+ ret=ZSTD_compressStream2(s,&s_output,&s_input,mode);
1243
+ if (ZSTD_isError(ret)) _compress_error_return("ZSTD_compressStream2()");
1244
+ if (s_output.pos>0){
1245
+ _stream_out_code_write(out_code,outStream_isCanceled,result,
1246
+ (const unsigned char*)s_output.dst,s_output.pos);
1247
+ }
1248
+ finished=lastChunk?(ret==0):(s_input.pos==s_input.size);
1249
+ } while (!finished);
1250
+ //if (s_input.pos!=s_input.size) _compress_error_return("Impossible: zstd only returns 0 when the input is completely consumed!");
1251
+ if (lastChunk)
1252
+ break;
1253
+ }
1254
+ }
1255
+ clear:
1256
+ #if (!IS_REUSE_compress_handle)
1257
+ if (0!=ZSTD_freeCCtx(s))
1258
+ { s=0; result=kCompressFailResult; if (strlen(errAt)==0) errAt="ZSTD_freeCStream()"; }
1259
+ #endif
1260
+ _check_compress_result(result,outStream_isCanceled,"_zstd_compress()",errAt);
1261
+ if (_temp_buf) free(_temp_buf);
1262
+ return result;
1263
+ }
1264
+ _def_fun_compressType(_zstd_compressType,"zstd");
1265
+ static TCompressPlugin_zstd zstdCompressPlugin={
1266
+ {_zstd_compressType,_default_maxCompressedSize,_zstd_setThreadNumber,_zstd_compress},
1267
+ 20,24,kDefaultCompressThreadNumber};
1268
+ #endif//_CompressPlugin_zstd
1269
+
1270
+
1271
+ #ifdef _CompressPlugin_brotli
1272
+ #if (_IsNeedIncludeDefaultCompressHead)
1273
+ # include "brotli/encode.h" // "brotli/c/include/brotli/encode.h" https://github.com/google/brotli
1274
+ #endif
1275
+ struct TCompressPlugin_brotli{
1276
+ hdiff_TCompress base;
1277
+ int compress_level; //0..11
1278
+ int dict_bits; // 10..30
1279
+ };
1280
+ static hpatch_StreamPos_t _brotli_compress(const hdiff_TCompress* compressPlugin,
1281
+ const hpatch_TStreamOutput* out_code,
1282
+ const hpatch_TStreamInput* in_data){
1283
+ const TCompressPlugin_brotli* plugin=(const TCompressPlugin_brotli*)compressPlugin;
1284
+ hpatch_StreamPos_t result=0;
1285
+ const char* errAt="";
1286
+ BrotliEncoderState* s=0;
1287
+ hpatch_StreamPos_t readFromPos=0;
1288
+ int outStream_isCanceled=0;
1289
+ uint8_t* _temp_buf=0;
1290
+ const size_t kBufSize=kCompressBufSize;
1291
+ uint8_t* input;
1292
+ uint8_t* output;
1293
+ size_t available_in;
1294
+ size_t available_out;
1295
+ const uint8_t* next_in;
1296
+ uint8_t* next_out;
1297
+
1298
+ _temp_buf=(uint8_t*)malloc(kBufSize*2);
1299
+ if (!_temp_buf) _compress_error_return("memory alloc");
1300
+ input=_temp_buf;
1301
+ output=_temp_buf+kBufSize;
1302
+ available_in=0;
1303
+ available_out=kBufSize;
1304
+ next_out=output;
1305
+ next_in=input;
1306
+
1307
+ if (!s) s=BrotliEncoderCreateInstance(0,0,0);
1308
+ if (!s) _compress_error_return("BrotliEncoderCreateInstance()");
1309
+ if (!BrotliEncoderSetParameter(s,BROTLI_PARAM_QUALITY,plugin->compress_level))
1310
+ _compress_error_return("BrotliEncoderSetParameter()");
1311
+ {
1312
+ uint32_t lgwin = plugin->dict_bits;
1313
+ #define BROTLI_WINDOW_GAP 16
1314
+ #define BROTLI_MAX_BACKWARD_LIMIT(W) (((hpatch_StreamPos_t)1 << (W)) - BROTLI_WINDOW_GAP)
1315
+ while ((BROTLI_MAX_BACKWARD_LIMIT(lgwin-1) >= in_data->streamSize)
1316
+ &&((lgwin-1)>= BROTLI_MIN_WINDOW_BITS)) {
1317
+ --lgwin;
1318
+ }
1319
+ if (lgwin > BROTLI_MAX_WINDOW_BITS)
1320
+ BrotliEncoderSetParameter(s, BROTLI_PARAM_LARGE_WINDOW, 1u);
1321
+ BrotliEncoderSetParameter(s, BROTLI_PARAM_LGWIN, lgwin);
1322
+ }
1323
+ if (in_data->streamSize > 0) {
1324
+ uint32_t size_hint = in_data->streamSize < (1 << 30) ?
1325
+ (uint32_t)in_data->streamSize : (1u << 30);
1326
+ BrotliEncoderSetParameter(s, BROTLI_PARAM_SIZE_HINT, size_hint);
1327
+ }
1328
+
1329
+ while (1) {
1330
+ int s_isFinished;
1331
+ if ((available_in==0)&&(readFromPos<in_data->streamSize)){
1332
+ available_in=kBufSize;
1333
+ if (available_in>(in_data->streamSize-readFromPos))
1334
+ available_in=(size_t)(in_data->streamSize-readFromPos);
1335
+ if (!in_data->read(in_data,readFromPos,input,input+available_in))
1336
+ _compress_error_return("in_data->read()");
1337
+ readFromPos+=available_in;
1338
+ next_in=input;
1339
+ }
1340
+
1341
+ if (!BrotliEncoderCompressStream(s,
1342
+ (readFromPos==in_data->streamSize) ? BROTLI_OPERATION_FINISH : BROTLI_OPERATION_PROCESS,
1343
+ &available_in, &next_in, &available_out, &next_out, 0))
1344
+ _compress_error_return("BrotliEncoderCompressStream()");
1345
+
1346
+ s_isFinished=BrotliEncoderIsFinished(s);
1347
+ if ((available_out == 0)||s_isFinished) {
1348
+ _stream_out_code_write(out_code,outStream_isCanceled,result,
1349
+ output,kBufSize-available_out);
1350
+ next_out=output;
1351
+ available_out=kBufSize;
1352
+ }
1353
+
1354
+ if (s_isFinished)
1355
+ break;
1356
+ }
1357
+ clear:
1358
+ BrotliEncoderDestroyInstance(s);
1359
+ _check_compress_result(result,outStream_isCanceled,"_brotli_compress()",errAt);
1360
+ if (_temp_buf) free(_temp_buf);
1361
+ return result;
1362
+ }
1363
+ _def_fun_compressType(_brotli_compressType,"brotli");
1364
+ static TCompressPlugin_brotli brotliCompressPlugin={
1365
+ {_brotli_compressType,_default_maxCompressedSize,_default_setParallelThreadNumber,_brotli_compress}, 9,24};
1366
+ #endif//_CompressPlugin_brotli
1367
+
1368
+
1369
+ #ifdef _CompressPlugin_lzham
1370
+ #if (_IsNeedIncludeDefaultCompressHead)
1371
+ # include "lzham.h" // "lzham_codec/include/lzham.h" https://github.com/richgel999/lzham_codec
1372
+ #endif
1373
+ struct TCompressPlugin_lzham{
1374
+ hdiff_TCompress base;
1375
+ int compress_level; //0..5
1376
+ int dict_bits; // 15..(26 or 29)
1377
+ int thread_num; //1..(64?)
1378
+ };
1379
+
1380
+ static int _lzham_setParallelThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
1381
+ TCompressPlugin_lzham* plugin=(TCompressPlugin_lzham*)compressPlugin;
1382
+ if (threadNum>LZHAM_MAX_HELPER_THREADS) threadNum=LZHAM_MAX_HELPER_THREADS;
1383
+ plugin->thread_num=threadNum;
1384
+ return threadNum;
1385
+ }
1386
+
1387
+ static hpatch_StreamPos_t _lzham_compress(const hdiff_TCompress* compressPlugin,
1388
+ const hpatch_TStreamOutput* out_code,
1389
+ const hpatch_TStreamInput* in_data){
1390
+ const TCompressPlugin_lzham* plugin=(const TCompressPlugin_lzham*)compressPlugin;
1391
+ hpatch_StreamPos_t result=0;
1392
+ const char* errAt="";
1393
+ lzham_compress_params params;
1394
+ unsigned char dict_bits;
1395
+ lzham_compress_state_ptr s=0;
1396
+ hpatch_StreamPos_t readFromPos=0;
1397
+ int outStream_isCanceled=0;
1398
+ unsigned char* _temp_buf=0;
1399
+ const size_t kBufSize=kCompressBufSize;
1400
+ unsigned char* input;
1401
+ unsigned char* output;
1402
+ size_t available_in;
1403
+ size_t available_out;
1404
+ const unsigned char* next_in;
1405
+ unsigned char* next_out;
1406
+
1407
+ _temp_buf=(unsigned char*)malloc(kBufSize*2);
1408
+ if (!_temp_buf) _compress_error_return("memory alloc");
1409
+ input=_temp_buf;
1410
+ output=_temp_buf+kBufSize;
1411
+ available_in=0;
1412
+ available_out=kBufSize;
1413
+ next_out=output;
1414
+ next_in=input;
1415
+
1416
+ memset(&params, 0, sizeof(params));
1417
+ params.m_struct_size=sizeof(params);
1418
+ dict_bits= (unsigned char)plugin->dict_bits;
1419
+ while (((((hpatch_StreamPos_t)1)<<(dict_bits-1)) >= in_data->streamSize)
1420
+ &&((dict_bits-1)>=LZHAM_MIN_DICT_SIZE_LOG2)) {
1421
+ --dict_bits;
1422
+ }
1423
+ params.m_dict_size_log2 = dict_bits;
1424
+ if (plugin->compress_level<=LZHAM_COMP_LEVEL_UBER){
1425
+ params.m_level=(lzham_compress_level)plugin->compress_level;
1426
+ }else{
1427
+ params.m_level = LZHAM_COMP_LEVEL_UBER;
1428
+ params.m_compress_flags |= LZHAM_COMP_FLAG_EXTREME_PARSING;
1429
+ }
1430
+ if (plugin->thread_num>1)
1431
+ params.m_max_helper_threads = plugin->thread_num;
1432
+
1433
+ if (!s) s=lzham_compress_init(&params);
1434
+ if (!s) _compress_error_return("lzham_compress_init()");
1435
+
1436
+ {//save head
1437
+ if (!out_code->write(out_code,0,(&dict_bits),(&dict_bits)+1))
1438
+ _compress_error_return("out_code->write()");
1439
+ ++result;
1440
+ }
1441
+
1442
+ while (1) {
1443
+ lzham_compress_status_t ret;
1444
+ int s_isFinished;
1445
+ if ((available_in==0)&&(readFromPos<in_data->streamSize)){
1446
+ available_in=kBufSize;
1447
+ if (available_in>(in_data->streamSize-readFromPos))
1448
+ available_in=(size_t)(in_data->streamSize-readFromPos);
1449
+ if (!in_data->read(in_data,readFromPos,input,input+available_in))
1450
+ _compress_error_return("in_data->read()");
1451
+ readFromPos+=available_in;
1452
+ next_in=input;
1453
+ }
1454
+
1455
+ {
1456
+ size_t available_in_back=available_in;
1457
+ size_t available_out_back=available_out;
1458
+ ret=lzham_compress2(s,next_in,&available_in,next_out,&available_out,
1459
+ (readFromPos==in_data->streamSize) ? LZHAM_FINISH : LZHAM_NO_FLUSH);
1460
+ next_out+=available_out;
1461
+ next_in+=available_in;
1462
+ available_in=available_in_back-available_in;
1463
+ available_out=available_out_back-available_out;
1464
+ }
1465
+ if (ret>=LZHAM_COMP_STATUS_FIRST_FAILURE_CODE)
1466
+ _compress_error_return("lzham_compress2()");
1467
+
1468
+ s_isFinished=(ret==LZHAM_COMP_STATUS_SUCCESS);
1469
+ if ((ret==LZHAM_COMP_STATUS_HAS_MORE_OUTPUT)||(available_out == 0)||s_isFinished) {
1470
+ _stream_out_code_write(out_code,outStream_isCanceled,result,
1471
+ output,kBufSize-available_out);
1472
+ next_out=output;
1473
+ available_out=kBufSize;
1474
+ }
1475
+
1476
+ if (s_isFinished)
1477
+ break;
1478
+ }
1479
+ clear:
1480
+ lzham_compress_deinit(s);
1481
+ _check_compress_result(result,outStream_isCanceled,"_lzham_compress()",errAt);
1482
+ if (_temp_buf) free(_temp_buf);
1483
+ return result;
1484
+ }
1485
+ _def_fun_compressType(_lzham_compressType,"lzham");
1486
+ static TCompressPlugin_lzham lzhamCompressPlugin={
1487
+ {_lzham_compressType,_default_maxCompressedSize,_lzham_setParallelThreadNumber,_lzham_compress},
1488
+ LZHAM_COMP_LEVEL_BETTER,24,kDefaultCompressThreadNumber};
1489
+ #endif//_CompressPlugin_lzham
1490
+
1491
+ #ifdef _CompressPlugin_tuz
1492
+ #if (_IsNeedIncludeDefaultCompressHead)
1493
+ # include "tuz_enc.h" // "tinyuz/compress/tuz_enc.h" https://github.com/sisong/tinyuz
1494
+ #endif
1495
+ typedef struct TCompressPlugin_tuz{
1496
+ hdiff_TCompress base;
1497
+ tuz_TCompressProps props;
1498
+ } TCompressPlugin_tuz;
1499
+ static int _tuz_setParallelThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
1500
+ TCompressPlugin_tuz* plugin=(TCompressPlugin_tuz*)compressPlugin;
1501
+ plugin->props.threadNum=threadNum;
1502
+ return threadNum;
1503
+ }
1504
+ static hpatch_StreamPos_t _tuz_compress(const hdiff_TCompress* compressPlugin,
1505
+ const hpatch_TStreamOutput* out_code,
1506
+ const hpatch_TStreamInput* in_data){
1507
+ const TCompressPlugin_tuz* plugin=(const TCompressPlugin_tuz*)compressPlugin;
1508
+ tuz_TCompressProps props=plugin->props;
1509
+ if (props.dictSize>=in_data->streamSize)
1510
+ props.dictSize=(in_data->streamSize>1)?(tuz_size_t)(in_data->streamSize-1):1;
1511
+ # if (IS_NOTICE_compress_canceled)
1512
+ printf(" (used one tinyuz dictSize: %" PRIu64 " (input data: %" PRIu64 "))\n",
1513
+ (hpatch_StreamPos_t)props.dictSize,in_data->streamSize);
1514
+ # endif
1515
+ return tuz_compress(out_code,in_data,&props);
1516
+ }
1517
+ _def_fun_compressType(_tuz_compressType,"tuz");
1518
+ static const TCompressPlugin_tuz tuzCompressPlugin={
1519
+ {_tuz_compressType,_default_maxCompressedSize,_tuz_setParallelThreadNumber,_tuz_compress},
1520
+ {(1<<24),tuz_kMaxOfMaxSaveLength,kDefaultCompressThreadNumber}};
1521
+ #endif //_CompressPlugin_tuz
1522
+
1523
+ #ifdef __cplusplus
1524
+ }
1525
+ #endif
1526
+ #endif