hdiffpatch 1.0.0__cp310-cp310-win32.whl

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 (2254) hide show
  1. hdiffpatch/__init__.py +67 -0
  2. hdiffpatch/_base_config.py +56 -0
  3. hdiffpatch/_bzip2_config.py +102 -0
  4. hdiffpatch/_c_extension.cp310-win32.pyd +0 -0
  5. hdiffpatch/_c_extension.pyi +121 -0
  6. hdiffpatch/_c_extension.pyx +1068 -0
  7. hdiffpatch/_c_src/HDiffPatch/.git +1 -0
  8. hdiffpatch/_c_src/HDiffPatch/.github/workflows/ci.yml +134 -0
  9. hdiffpatch/_c_src/HDiffPatch/.gitignore +23 -0
  10. hdiffpatch/_c_src/HDiffPatch/CHANGELOG.md +244 -0
  11. hdiffpatch/_c_src/HDiffPatch/LICENSE +48 -0
  12. hdiffpatch/_c_src/HDiffPatch/Makefile +425 -0
  13. hdiffpatch/_c_src/HDiffPatch/README.md +528 -0
  14. hdiffpatch/_c_src/HDiffPatch/README_cn.md +525 -0
  15. hdiffpatch/_c_src/HDiffPatch/_atosize.h +83 -0
  16. hdiffpatch/_c_src/HDiffPatch/_clock_for_demo.h +55 -0
  17. hdiffpatch/_c_src/HDiffPatch/_dir_ignore.h +191 -0
  18. hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +380 -0
  19. hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +73 -0
  20. hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +275 -0
  21. hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +58 -0
  22. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +135 -0
  23. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +8 -0
  24. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +1 -0
  25. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +1 -0
  26. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +1 -0
  27. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +1 -0
  28. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +44 -0
  29. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +26 -0
  30. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +38 -0
  31. hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +21 -0
  32. hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +8 -0
  33. hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/HDiffZ.cbp +400 -0
  34. hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/HPatchZ.cbp +269 -0
  35. hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/unitTest.cbp +79 -0
  36. hdiffpatch/_c_src/HDiffPatch/builds/vc/HDiffPatch.sln +191 -0
  37. hdiffpatch/_c_src/HDiffPatch/builds/vc/HDiffZ.vcxproj +456 -0
  38. hdiffpatch/_c_src/HDiffPatch/builds/vc/HPatchZ.vcxproj +439 -0
  39. hdiffpatch/_c_src/HDiffPatch/builds/vc/bzip2.vcxproj +302 -0
  40. hdiffpatch/_c_src/HDiffPatch/builds/vc/hpatchz_test.vcxproj +216 -0
  41. hdiffpatch/_c_src/HDiffPatch/builds/vc/libdeflate.vcxproj +332 -0
  42. hdiffpatch/_c_src/HDiffPatch/builds/vc/longPathAware.exe.manifest +7 -0
  43. hdiffpatch/_c_src/HDiffPatch/builds/vc/lzma.vcxproj +350 -0
  44. hdiffpatch/_c_src/HDiffPatch/builds/vc/testHashClash.vcxproj +294 -0
  45. hdiffpatch/_c_src/HDiffPatch/builds/vc/unitTest.vcxproj +369 -0
  46. hdiffpatch/_c_src/HDiffPatch/builds/vc/zlib.vcxproj +315 -0
  47. hdiffpatch/_c_src/HDiffPatch/builds/vc/zstd.vcxproj +357 -0
  48. hdiffpatch/_c_src/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +39 -0
  49. hdiffpatch/_c_src/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  50. hdiffpatch/_c_src/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  51. hdiffpatch/_c_src/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +447 -0
  52. hdiffpatch/_c_src/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  53. hdiffpatch/_c_src/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +655 -0
  54. hdiffpatch/_c_src/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  55. hdiffpatch/_c_src/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  56. hdiffpatch/_c_src/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +410 -0
  57. hdiffpatch/_c_src/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  58. hdiffpatch/_c_src/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +286 -0
  59. hdiffpatch/_c_src/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  60. hdiffpatch/_c_src/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +268 -0
  61. hdiffpatch/_c_src/HDiffPatch/builds/xcode/lz4.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  62. hdiffpatch/_c_src/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +585 -0
  63. hdiffpatch/_c_src/HDiffPatch/builds/xcode/lzma.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  64. hdiffpatch/_c_src/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +301 -0
  65. hdiffpatch/_c_src/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  66. hdiffpatch/_c_src/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  67. hdiffpatch/_c_src/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +549 -0
  68. hdiffpatch/_c_src/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  69. hdiffpatch/_c_src/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +308 -0
  70. hdiffpatch/_c_src/HDiffPatch/builds/xcode/zlib.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  71. hdiffpatch/_c_src/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +515 -0
  72. hdiffpatch/_c_src/HDiffPatch/builds/xcode/zstd.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  73. hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +30 -0
  74. hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +32 -0
  75. hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +745 -0
  76. hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  77. hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  78. hdiffpatch/_c_src/HDiffPatch/checksum_plugin_demo.h +716 -0
  79. hdiffpatch/_c_src/HDiffPatch/compress_parallel.cpp +201 -0
  80. hdiffpatch/_c_src/HDiffPatch/compress_parallel.h +59 -0
  81. hdiffpatch/_c_src/HDiffPatch/compress_plugin_demo.h +1519 -0
  82. hdiffpatch/_c_src/HDiffPatch/decompress_plugin_demo.h +1634 -0
  83. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +867 -0
  84. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +79 -0
  85. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +226 -0
  86. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +190 -0
  87. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +357 -0
  88. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +87 -0
  89. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +151 -0
  90. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +814 -0
  91. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +241 -0
  92. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +47 -0
  93. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +114 -0
  94. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +53 -0
  95. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +65 -0
  96. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +340 -0
  97. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +144 -0
  98. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +176 -0
  99. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +84 -0
  100. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +146 -0
  101. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +61 -0
  102. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +152 -0
  103. hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +76 -0
  104. hdiffpatch/_c_src/HDiffPatch/file_for_patch.c +658 -0
  105. hdiffpatch/_c_src/HDiffPatch/file_for_patch.h +298 -0
  106. hdiffpatch/_c_src/HDiffPatch/hdiffz.cpp +2112 -0
  107. hdiffpatch/_c_src/HDiffPatch/hdiffz_import_patch.c +31 -0
  108. hdiffpatch/_c_src/HDiffPatch/hdiffz_import_patch.h +42 -0
  109. hdiffpatch/_c_src/HDiffPatch/hpatch_dir_listener.h +302 -0
  110. hdiffpatch/_c_src/HDiffPatch/hpatchz.c +1683 -0
  111. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +1709 -0
  112. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff.h +200 -0
  113. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +33 -0
  114. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +173 -0
  115. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +356 -0
  116. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/match_block.h +149 -0
  117. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +383 -0
  118. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +73 -0
  119. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +184 -0
  120. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +88 -0
  121. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +89 -0
  122. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +319 -0
  123. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.cpp +10 -0
  124. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +97 -0
  125. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +14 -0
  126. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +108 -0
  127. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +186 -0
  128. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +780 -0
  129. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +575 -0
  130. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +435 -0
  131. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +144 -0
  132. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +167 -0
  133. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +138 -0
  134. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +763 -0
  135. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +97 -0
  136. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +921 -0
  137. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +319 -0
  138. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +72 -0
  139. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +132 -0
  140. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +125 -0
  141. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +428 -0
  142. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +133 -0
  143. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +52 -0
  144. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch.c +2384 -0
  145. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch.h +229 -0
  146. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +213 -0
  147. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +342 -0
  148. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +186 -0
  149. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +48 -0
  150. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +31 -0
  151. hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +100 -0
  152. hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_channel.cpp +170 -0
  153. hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_channel.h +153 -0
  154. hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_import.cpp +367 -0
  155. hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_import.h +92 -0
  156. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +153 -0
  157. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +437 -0
  158. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/dir_sync_client.h +88 -0
  159. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/match_in_old.cpp +572 -0
  160. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/match_in_old.h +46 -0
  161. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client.cpp +610 -0
  162. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client.h +75 -0
  163. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client_private.h +49 -0
  164. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client_type.h +156 -0
  165. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +204 -0
  166. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +250 -0
  167. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_diff_data.h +67 -0
  168. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +674 -0
  169. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_info_client.h +121 -0
  170. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +83 -0
  171. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +131 -0
  172. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/dir_sync_make.h +56 -0
  173. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +55 -0
  174. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/match_in_new.cpp +147 -0
  175. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/match_in_new.h +38 -0
  176. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +328 -0
  177. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_info_make.h +65 -0
  178. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_make.cpp +478 -0
  179. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_make.h +68 -0
  180. hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +111 -0
  181. hdiffpatch/_c_src/HDiffPatch/test/_private_searchBestParams.cpp +301 -0
  182. hdiffpatch/_c_src/HDiffPatch/test/hpatchz_test.cpp +291 -0
  183. hdiffpatch/_c_src/HDiffPatch/test/testHashClash.cpp +538 -0
  184. hdiffpatch/_c_src/HDiffPatch/test/unit_test.cpp +861 -0
  185. hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +619 -0
  186. hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +95 -0
  187. hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +78 -0
  188. hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +950 -0
  189. hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +72 -0
  190. hdiffpatch/_c_src/bzip2/.git +1 -0
  191. hdiffpatch/_c_src/bzip2/.gitattributes +1 -0
  192. hdiffpatch/_c_src/bzip2/.gitignore +9 -0
  193. hdiffpatch/_c_src/bzip2/CHANGES +356 -0
  194. hdiffpatch/_c_src/bzip2/LICENSE +42 -0
  195. hdiffpatch/_c_src/bzip2/Makefile +223 -0
  196. hdiffpatch/_c_src/bzip2/Makefile-libbz2_so +59 -0
  197. hdiffpatch/_c_src/bzip2/README +196 -0
  198. hdiffpatch/_c_src/bzip2/README.COMPILATION.PROBLEMS +58 -0
  199. hdiffpatch/_c_src/bzip2/README.XML.STUFF +45 -0
  200. hdiffpatch/_c_src/bzip2/blocksort.c +1094 -0
  201. hdiffpatch/_c_src/bzip2/bz-common.xsl +39 -0
  202. hdiffpatch/_c_src/bzip2/bz-fo.xsl +276 -0
  203. hdiffpatch/_c_src/bzip2/bz-html.xsl +23 -0
  204. hdiffpatch/_c_src/bzip2/bzdiff +76 -0
  205. hdiffpatch/_c_src/bzip2/bzdiff.1 +52 -0
  206. hdiffpatch/_c_src/bzip2/bzgrep +85 -0
  207. hdiffpatch/_c_src/bzip2/bzgrep.1 +62 -0
  208. hdiffpatch/_c_src/bzip2/bzip.css +74 -0
  209. hdiffpatch/_c_src/bzip2/bzip2.1 +464 -0
  210. hdiffpatch/_c_src/bzip2/bzip2.c +2046 -0
  211. hdiffpatch/_c_src/bzip2/bzip2recover.c +516 -0
  212. hdiffpatch/_c_src/bzip2/bzlib.c +1572 -0
  213. hdiffpatch/_c_src/bzip2/bzlib.h +282 -0
  214. hdiffpatch/_c_src/bzip2/bzlib_private.h +509 -0
  215. hdiffpatch/_c_src/bzip2/bzmore +61 -0
  216. hdiffpatch/_c_src/bzip2/bzmore.1 +156 -0
  217. hdiffpatch/_c_src/bzip2/compress.c +672 -0
  218. hdiffpatch/_c_src/bzip2/crctable.c +104 -0
  219. hdiffpatch/_c_src/bzip2/decompress.c +652 -0
  220. hdiffpatch/_c_src/bzip2/dlltest.c +175 -0
  221. hdiffpatch/_c_src/bzip2/dlltest.dsp +93 -0
  222. hdiffpatch/_c_src/bzip2/entities.xml +10 -0
  223. hdiffpatch/_c_src/bzip2/format.pl +68 -0
  224. hdiffpatch/_c_src/bzip2/huffman.c +205 -0
  225. hdiffpatch/_c_src/bzip2/libbz2.def +27 -0
  226. hdiffpatch/_c_src/bzip2/libbz2.dsp +130 -0
  227. hdiffpatch/_c_src/bzip2/makefile.msc +63 -0
  228. hdiffpatch/_c_src/bzip2/manual.xml +2979 -0
  229. hdiffpatch/_c_src/bzip2/mk251.c +31 -0
  230. hdiffpatch/_c_src/bzip2/prepare-release.sh +82 -0
  231. hdiffpatch/_c_src/bzip2/randtable.c +84 -0
  232. hdiffpatch/_c_src/bzip2/release-update.sh +90 -0
  233. hdiffpatch/_c_src/bzip2/sample1.bz2 +0 -0
  234. hdiffpatch/_c_src/bzip2/sample1.ref +0 -0
  235. hdiffpatch/_c_src/bzip2/sample2.bz2 +0 -0
  236. hdiffpatch/_c_src/bzip2/sample2.ref +0 -0
  237. hdiffpatch/_c_src/bzip2/sample3.bz2 +0 -0
  238. hdiffpatch/_c_src/bzip2/sample3.ref +30007 -0
  239. hdiffpatch/_c_src/bzip2/spewG.c +54 -0
  240. hdiffpatch/_c_src/bzip2/unzcrash.c +141 -0
  241. hdiffpatch/_c_src/bzip2/words0 +9 -0
  242. hdiffpatch/_c_src/bzip2/words1 +4 -0
  243. hdiffpatch/_c_src/bzip2/words2 +5 -0
  244. hdiffpatch/_c_src/bzip2/words3 +30 -0
  245. hdiffpatch/_c_src/bzip2/xmlproc.sh +114 -0
  246. hdiffpatch/_c_src/foo.c +11 -0
  247. hdiffpatch/_c_src/foo.h +24 -0
  248. hdiffpatch/_c_src/libdeflate/.cirrus.yml +12 -0
  249. hdiffpatch/_c_src/libdeflate/.git +1 -0
  250. hdiffpatch/_c_src/libdeflate/.github/workflows/ci.yml +290 -0
  251. hdiffpatch/_c_src/libdeflate/.gitignore +6 -0
  252. hdiffpatch/_c_src/libdeflate/CMakeLists.txt +319 -0
  253. hdiffpatch/_c_src/libdeflate/COPYING +22 -0
  254. hdiffpatch/_c_src/libdeflate/NEWS.md +515 -0
  255. hdiffpatch/_c_src/libdeflate/README.md +341 -0
  256. hdiffpatch/_c_src/libdeflate/common_defs.h +747 -0
  257. hdiffpatch/_c_src/libdeflate/lib/adler32.c +162 -0
  258. hdiffpatch/_c_src/libdeflate/lib/arm/adler32_impl.h +365 -0
  259. hdiffpatch/_c_src/libdeflate/lib/arm/cpu_features.c +230 -0
  260. hdiffpatch/_c_src/libdeflate/lib/arm/cpu_features.h +216 -0
  261. hdiffpatch/_c_src/libdeflate/lib/arm/crc32_impl.h +596 -0
  262. hdiffpatch/_c_src/libdeflate/lib/arm/crc32_pmull_helpers.h +156 -0
  263. hdiffpatch/_c_src/libdeflate/lib/arm/crc32_pmull_wide.h +226 -0
  264. hdiffpatch/_c_src/libdeflate/lib/arm/matchfinder_impl.h +78 -0
  265. hdiffpatch/_c_src/libdeflate/lib/bt_matchfinder.h +342 -0
  266. hdiffpatch/_c_src/libdeflate/lib/cpu_features_common.h +93 -0
  267. hdiffpatch/_c_src/libdeflate/lib/crc32.c +262 -0
  268. hdiffpatch/_c_src/libdeflate/lib/crc32_multipliers.h +375 -0
  269. hdiffpatch/_c_src/libdeflate/lib/crc32_tables.h +587 -0
  270. hdiffpatch/_c_src/libdeflate/lib/decompress_template.h +849 -0
  271. hdiffpatch/_c_src/libdeflate/lib/deflate_compress.c +4394 -0
  272. hdiffpatch/_c_src/libdeflate/lib/deflate_compress.h +15 -0
  273. hdiffpatch/_c_src/libdeflate/lib/deflate_constants.h +56 -0
  274. hdiffpatch/_c_src/libdeflate/lib/deflate_decompress.c +1249 -0
  275. hdiffpatch/_c_src/libdeflate/lib/gzip_compress.c +112 -0
  276. hdiffpatch/_c_src/libdeflate/lib/gzip_constants.h +45 -0
  277. hdiffpatch/_c_src/libdeflate/lib/gzip_decompress.c +184 -0
  278. hdiffpatch/_c_src/libdeflate/lib/gzip_overhead.h +20 -0
  279. hdiffpatch/_c_src/libdeflate/lib/hc_matchfinder.h +401 -0
  280. hdiffpatch/_c_src/libdeflate/lib/ht_matchfinder.h +240 -0
  281. hdiffpatch/_c_src/libdeflate/lib/lib_common.h +108 -0
  282. hdiffpatch/_c_src/libdeflate/lib/matchfinder_common.h +224 -0
  283. hdiffpatch/_c_src/libdeflate/lib/riscv/matchfinder_impl.h +97 -0
  284. hdiffpatch/_c_src/libdeflate/lib/utils.c +141 -0
  285. hdiffpatch/_c_src/libdeflate/lib/x86/adler32_impl.h +136 -0
  286. hdiffpatch/_c_src/libdeflate/lib/x86/adler32_template.h +518 -0
  287. hdiffpatch/_c_src/libdeflate/lib/x86/cpu_features.c +212 -0
  288. hdiffpatch/_c_src/libdeflate/lib/x86/cpu_features.h +179 -0
  289. hdiffpatch/_c_src/libdeflate/lib/x86/crc32_impl.h +160 -0
  290. hdiffpatch/_c_src/libdeflate/lib/x86/crc32_pclmul_template.h +467 -0
  291. hdiffpatch/_c_src/libdeflate/lib/x86/decompress_impl.h +57 -0
  292. hdiffpatch/_c_src/libdeflate/lib/x86/matchfinder_impl.h +122 -0
  293. hdiffpatch/_c_src/libdeflate/lib/zlib_compress.c +82 -0
  294. hdiffpatch/_c_src/libdeflate/lib/zlib_constants.h +21 -0
  295. hdiffpatch/_c_src/libdeflate/lib/zlib_decompress.c +104 -0
  296. hdiffpatch/_c_src/libdeflate/libdeflate-config.cmake.in +3 -0
  297. hdiffpatch/_c_src/libdeflate/libdeflate.h +534 -0
  298. hdiffpatch/_c_src/libdeflate/libdeflate.pc.in +18 -0
  299. hdiffpatch/_c_src/libdeflate/pgzip/Makefile +74 -0
  300. hdiffpatch/_c_src/libdeflate/pgzip/vc/pgzip.sln +37 -0
  301. hdiffpatch/_c_src/libdeflate/pgzip/vc/pgzip.vcxproj +215 -0
  302. hdiffpatch/_c_src/libdeflate/pgzip/vc/pgzip.vcxproj.filters +46 -0
  303. hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/project.pbxproj +326 -0
  304. hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  305. hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  306. hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/xcshareddata/xcschemes/pgzip.xcscheme +78 -0
  307. hdiffpatch/_c_src/libdeflate/programs/CMakeLists.txt +105 -0
  308. hdiffpatch/_c_src/libdeflate/programs/benchmark.c +696 -0
  309. hdiffpatch/_c_src/libdeflate/programs/checksum.c +218 -0
  310. hdiffpatch/_c_src/libdeflate/programs/config.h.in +19 -0
  311. hdiffpatch/_c_src/libdeflate/programs/gzip.c +688 -0
  312. hdiffpatch/_c_src/libdeflate/programs/gzip_compress_by_stream_mt.cpp +336 -0
  313. hdiffpatch/_c_src/libdeflate/programs/gzip_compress_by_stream_mt.h +43 -0
  314. hdiffpatch/_c_src/libdeflate/programs/gzip_decompress_by_stream_mt.cpp +483 -0
  315. hdiffpatch/_c_src/libdeflate/programs/gzip_decompress_by_stream_mt.h +53 -0
  316. hdiffpatch/_c_src/libdeflate/programs/pgzip.c +523 -0
  317. hdiffpatch/_c_src/libdeflate/programs/prog_util.c +541 -0
  318. hdiffpatch/_c_src/libdeflate/programs/prog_util.h +226 -0
  319. hdiffpatch/_c_src/libdeflate/programs/test_checksums.c +200 -0
  320. hdiffpatch/_c_src/libdeflate/programs/test_custom_malloc.c +155 -0
  321. hdiffpatch/_c_src/libdeflate/programs/test_incomplete_codes.c +385 -0
  322. hdiffpatch/_c_src/libdeflate/programs/test_invalid_streams.c +130 -0
  323. hdiffpatch/_c_src/libdeflate/programs/test_litrunlen_overflow.c +72 -0
  324. hdiffpatch/_c_src/libdeflate/programs/test_overread.c +95 -0
  325. hdiffpatch/_c_src/libdeflate/programs/test_slow_decompression.c +472 -0
  326. hdiffpatch/_c_src/libdeflate/programs/test_trailing_bytes.c +151 -0
  327. hdiffpatch/_c_src/libdeflate/programs/test_util.c +237 -0
  328. hdiffpatch/_c_src/libdeflate/programs/test_util.h +61 -0
  329. hdiffpatch/_c_src/libdeflate/programs/tgetopt.c +118 -0
  330. hdiffpatch/_c_src/libdeflate/scripts/android_build.sh +118 -0
  331. hdiffpatch/_c_src/libdeflate/scripts/android_tests.sh +69 -0
  332. hdiffpatch/_c_src/libdeflate/scripts/benchmark.sh +10 -0
  333. hdiffpatch/_c_src/libdeflate/scripts/checksum.sh +10 -0
  334. hdiffpatch/_c_src/libdeflate/scripts/checksum_benchmarks.sh +253 -0
  335. hdiffpatch/_c_src/libdeflate/scripts/cmake-helper.sh +17 -0
  336. hdiffpatch/_c_src/libdeflate/scripts/deflate_benchmarks.sh +119 -0
  337. hdiffpatch/_c_src/libdeflate/scripts/exec_tests.sh +38 -0
  338. hdiffpatch/_c_src/libdeflate/scripts/gen-crc32-consts.py +158 -0
  339. hdiffpatch/_c_src/libdeflate/scripts/gen-release-archives.sh +37 -0
  340. hdiffpatch/_c_src/libdeflate/scripts/gen_bitreverse_tab.py +19 -0
  341. hdiffpatch/_c_src/libdeflate/scripts/gen_default_litlen_costs.py +44 -0
  342. hdiffpatch/_c_src/libdeflate/scripts/gen_offset_slot_map.py +29 -0
  343. hdiffpatch/_c_src/libdeflate/scripts/gzip_tests.sh +523 -0
  344. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/.gitignore +1 -0
  345. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_compress/corpus/0 +0 -0
  346. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_compress/fuzz.c +95 -0
  347. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_decompress/corpus/0 +3 -0
  348. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_decompress/fuzz.c +62 -0
  349. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/fuzz.sh +108 -0
  350. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/gzip_decompress/corpus/0 +0 -0
  351. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/gzip_decompress/fuzz.c +19 -0
  352. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/zlib_decompress/corpus/0 +3 -0
  353. hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/zlib_decompress/fuzz.c +19 -0
  354. hdiffpatch/_c_src/libdeflate/scripts/run_tests.sh +416 -0
  355. hdiffpatch/_c_src/libdeflate/scripts/toolchain-i686-w64-mingw32.cmake +8 -0
  356. hdiffpatch/_c_src/libdeflate/scripts/toolchain-x86_64-w64-mingw32.cmake +8 -0
  357. hdiffpatch/_c_src/libmd5/.git +1 -0
  358. hdiffpatch/_c_src/libmd5/md5.c +381 -0
  359. hdiffpatch/_c_src/libmd5/md5.h +91 -0
  360. hdiffpatch/_c_src/libmd5/md5main.c +139 -0
  361. hdiffpatch/_c_src/lzma/.git +1 -0
  362. hdiffpatch/_c_src/lzma/Asm/arm/7zCrcOpt.asm +100 -0
  363. hdiffpatch/_c_src/lzma/Asm/arm64/7zAsm.S +181 -0
  364. hdiffpatch/_c_src/lzma/Asm/arm64/LzmaDecOpt.S +1487 -0
  365. hdiffpatch/_c_src/lzma/Asm/x86/7zAsm.asm +341 -0
  366. hdiffpatch/_c_src/lzma/Asm/x86/7zCrcOpt.asm +258 -0
  367. hdiffpatch/_c_src/lzma/Asm/x86/AesOpt.asm +742 -0
  368. hdiffpatch/_c_src/lzma/Asm/x86/LzFindOpt.asm +540 -0
  369. hdiffpatch/_c_src/lzma/Asm/x86/LzmaDecOpt.asm +1339 -0
  370. hdiffpatch/_c_src/lzma/Asm/x86/Sha256Opt.asm +275 -0
  371. hdiffpatch/_c_src/lzma/Asm/x86/XzCrc64Opt.asm +523 -0
  372. hdiffpatch/_c_src/lzma/C/7z.h +204 -0
  373. hdiffpatch/_c_src/lzma/C/7zAlloc.c +89 -0
  374. hdiffpatch/_c_src/lzma/C/7zAlloc.h +19 -0
  375. hdiffpatch/_c_src/lzma/C/7zArcIn.c +1786 -0
  376. hdiffpatch/_c_src/lzma/C/7zBuf.c +36 -0
  377. hdiffpatch/_c_src/lzma/C/7zBuf.h +35 -0
  378. hdiffpatch/_c_src/lzma/C/7zBuf2.c +52 -0
  379. hdiffpatch/_c_src/lzma/C/7zCrc.c +464 -0
  380. hdiffpatch/_c_src/lzma/C/7zCrc.h +28 -0
  381. hdiffpatch/_c_src/lzma/C/7zCrcOpt.c +199 -0
  382. hdiffpatch/_c_src/lzma/C/7zDec.c +673 -0
  383. hdiffpatch/_c_src/lzma/C/7zFile.c +443 -0
  384. hdiffpatch/_c_src/lzma/C/7zFile.h +92 -0
  385. hdiffpatch/_c_src/lzma/C/7zStream.c +199 -0
  386. hdiffpatch/_c_src/lzma/C/7zTypes.h +597 -0
  387. hdiffpatch/_c_src/lzma/C/7zVersion.h +27 -0
  388. hdiffpatch/_c_src/lzma/C/7zVersion.rc +55 -0
  389. hdiffpatch/_c_src/lzma/C/7zWindows.h +101 -0
  390. hdiffpatch/_c_src/lzma/C/7zip_gcc_c.mak +360 -0
  391. hdiffpatch/_c_src/lzma/C/Aes.c +429 -0
  392. hdiffpatch/_c_src/lzma/C/Aes.h +60 -0
  393. hdiffpatch/_c_src/lzma/C/AesOpt.c +1002 -0
  394. hdiffpatch/_c_src/lzma/C/Alloc.c +605 -0
  395. hdiffpatch/_c_src/lzma/C/Alloc.h +76 -0
  396. hdiffpatch/_c_src/lzma/C/Asm_c.mak +12 -0
  397. hdiffpatch/_c_src/lzma/C/Bcj2.c +290 -0
  398. hdiffpatch/_c_src/lzma/C/Bcj2.h +332 -0
  399. hdiffpatch/_c_src/lzma/C/Bcj2Enc.c +506 -0
  400. hdiffpatch/_c_src/lzma/C/Bra.c +709 -0
  401. hdiffpatch/_c_src/lzma/C/Bra.h +105 -0
  402. hdiffpatch/_c_src/lzma/C/Bra86.c +187 -0
  403. hdiffpatch/_c_src/lzma/C/BraIA64.c +14 -0
  404. hdiffpatch/_c_src/lzma/C/Compiler.h +236 -0
  405. hdiffpatch/_c_src/lzma/C/CpuArch.c +970 -0
  406. hdiffpatch/_c_src/lzma/C/CpuArch.h +678 -0
  407. hdiffpatch/_c_src/lzma/C/Delta.c +169 -0
  408. hdiffpatch/_c_src/lzma/C/Delta.h +19 -0
  409. hdiffpatch/_c_src/lzma/C/DllSecur.c +99 -0
  410. hdiffpatch/_c_src/lzma/C/DllSecur.h +20 -0
  411. hdiffpatch/_c_src/lzma/C/LzFind.c +1746 -0
  412. hdiffpatch/_c_src/lzma/C/LzFind.h +160 -0
  413. hdiffpatch/_c_src/lzma/C/LzFindMt.c +1414 -0
  414. hdiffpatch/_c_src/lzma/C/LzFindMt.h +112 -0
  415. hdiffpatch/_c_src/lzma/C/LzFindOpt.c +578 -0
  416. hdiffpatch/_c_src/lzma/C/LzHash.h +34 -0
  417. hdiffpatch/_c_src/lzma/C/Lzma2Dec.c +493 -0
  418. hdiffpatch/_c_src/lzma/C/Lzma2Dec.h +121 -0
  419. hdiffpatch/_c_src/lzma/C/Lzma2DecMt.c +1095 -0
  420. hdiffpatch/_c_src/lzma/C/Lzma2DecMt.h +81 -0
  421. hdiffpatch/_c_src/lzma/C/Lzma2Enc.c +805 -0
  422. hdiffpatch/_c_src/lzma/C/Lzma2Enc.h +57 -0
  423. hdiffpatch/_c_src/lzma/C/Lzma86.h +111 -0
  424. hdiffpatch/_c_src/lzma/C/Lzma86Dec.c +53 -0
  425. hdiffpatch/_c_src/lzma/C/Lzma86Enc.c +103 -0
  426. hdiffpatch/_c_src/lzma/C/LzmaDec.c +1363 -0
  427. hdiffpatch/_c_src/lzma/C/LzmaDec.h +237 -0
  428. hdiffpatch/_c_src/lzma/C/LzmaEnc.c +3144 -0
  429. hdiffpatch/_c_src/lzma/C/LzmaEnc.h +83 -0
  430. hdiffpatch/_c_src/lzma/C/LzmaLib.c +42 -0
  431. hdiffpatch/_c_src/lzma/C/LzmaLib.h +138 -0
  432. hdiffpatch/_c_src/lzma/C/MtCoder.c +571 -0
  433. hdiffpatch/_c_src/lzma/C/MtCoder.h +141 -0
  434. hdiffpatch/_c_src/lzma/C/MtDec.c +1124 -0
  435. hdiffpatch/_c_src/lzma/C/MtDec.h +202 -0
  436. hdiffpatch/_c_src/lzma/C/Ppmd.h +169 -0
  437. hdiffpatch/_c_src/lzma/C/Ppmd7.c +1131 -0
  438. hdiffpatch/_c_src/lzma/C/Ppmd7.h +181 -0
  439. hdiffpatch/_c_src/lzma/C/Ppmd7Dec.c +312 -0
  440. hdiffpatch/_c_src/lzma/C/Ppmd7Enc.c +337 -0
  441. hdiffpatch/_c_src/lzma/C/Precomp.h +127 -0
  442. hdiffpatch/_c_src/lzma/C/RotateDefs.h +50 -0
  443. hdiffpatch/_c_src/lzma/C/Sha256.c +492 -0
  444. hdiffpatch/_c_src/lzma/C/Sha256.h +86 -0
  445. hdiffpatch/_c_src/lzma/C/Sha256Opt.c +451 -0
  446. hdiffpatch/_c_src/lzma/C/Sort.c +141 -0
  447. hdiffpatch/_c_src/lzma/C/Sort.h +18 -0
  448. hdiffpatch/_c_src/lzma/C/SwapBytes.c +835 -0
  449. hdiffpatch/_c_src/lzma/C/SwapBytes.h +17 -0
  450. hdiffpatch/_c_src/lzma/C/Threads.c +581 -0
  451. hdiffpatch/_c_src/lzma/C/Threads.h +250 -0
  452. hdiffpatch/_c_src/lzma/C/Util/7z/7z.dsp +249 -0
  453. hdiffpatch/_c_src/lzma/C/Util/7z/7z.dsw +29 -0
  454. hdiffpatch/_c_src/lzma/C/Util/7z/7zMain.c +889 -0
  455. hdiffpatch/_c_src/lzma/C/Util/7z/Precomp.c +4 -0
  456. hdiffpatch/_c_src/lzma/C/Util/7z/Precomp.h +13 -0
  457. hdiffpatch/_c_src/lzma/C/Util/7z/makefile +44 -0
  458. hdiffpatch/_c_src/lzma/C/Util/7z/makefile.gcc +32 -0
  459. hdiffpatch/_c_src/lzma/C/Util/Lzma/LzmaUtil.c +313 -0
  460. hdiffpatch/_c_src/lzma/C/Util/Lzma/LzmaUtil.dsp +188 -0
  461. hdiffpatch/_c_src/lzma/C/Util/Lzma/LzmaUtil.dsw +29 -0
  462. hdiffpatch/_c_src/lzma/C/Util/Lzma/Precomp.h +13 -0
  463. hdiffpatch/_c_src/lzma/C/Util/Lzma/makefile +30 -0
  464. hdiffpatch/_c_src/lzma/C/Util/Lzma/makefile.gcc +21 -0
  465. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLib.def +4 -0
  466. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLib.dsp +202 -0
  467. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLib.dsw +29 -0
  468. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLibExports.c +15 -0
  469. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/Precomp.c +4 -0
  470. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/Precomp.h +13 -0
  471. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/makefile +59 -0
  472. hdiffpatch/_c_src/lzma/C/Util/LzmaLib/resource.rc +3 -0
  473. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/Precomp.c +4 -0
  474. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/Precomp.h +13 -0
  475. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/SfxSetup.c +657 -0
  476. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/SfxSetup.dsp +231 -0
  477. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/SfxSetup.dsw +29 -0
  478. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/makefile +44 -0
  479. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/makefile_con +40 -0
  480. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/resource.rc +5 -0
  481. hdiffpatch/_c_src/lzma/C/Util/SfxSetup/setup.ico +0 -0
  482. hdiffpatch/_c_src/lzma/C/Xz.c +92 -0
  483. hdiffpatch/_c_src/lzma/C/Xz.h +536 -0
  484. hdiffpatch/_c_src/lzma/C/XzCrc64.c +140 -0
  485. hdiffpatch/_c_src/lzma/C/XzCrc64.h +26 -0
  486. hdiffpatch/_c_src/lzma/C/XzCrc64Opt.c +261 -0
  487. hdiffpatch/_c_src/lzma/C/XzDec.c +2877 -0
  488. hdiffpatch/_c_src/lzma/C/XzEnc.c +1378 -0
  489. hdiffpatch/_c_src/lzma/C/XzEnc.h +63 -0
  490. hdiffpatch/_c_src/lzma/C/XzIn.c +340 -0
  491. hdiffpatch/_c_src/lzma/C/var_clang.mak +11 -0
  492. hdiffpatch/_c_src/lzma/C/var_clang_arm64.mak +12 -0
  493. hdiffpatch/_c_src/lzma/C/var_clang_x64.mak +11 -0
  494. hdiffpatch/_c_src/lzma/C/var_clang_x86.mak +11 -0
  495. hdiffpatch/_c_src/lzma/C/var_gcc.mak +12 -0
  496. hdiffpatch/_c_src/lzma/C/var_gcc_arm64.mak +12 -0
  497. hdiffpatch/_c_src/lzma/C/var_gcc_x64.mak +10 -0
  498. hdiffpatch/_c_src/lzma/C/var_gcc_x86.mak +10 -0
  499. hdiffpatch/_c_src/lzma/C/var_mac_arm64.mak +11 -0
  500. hdiffpatch/_c_src/lzma/C/var_mac_x64.mak +11 -0
  501. hdiffpatch/_c_src/lzma/C/warn_clang.mak +1 -0
  502. hdiffpatch/_c_src/lzma/C/warn_clang_mac.mak +1 -0
  503. hdiffpatch/_c_src/lzma/C/warn_gcc.mak +51 -0
  504. hdiffpatch/_c_src/lzma/CPP/7zip/7zip.mak +240 -0
  505. hdiffpatch/_c_src/lzma/CPP/7zip/7zip_gcc.mak +1368 -0
  506. hdiffpatch/_c_src/lzma/CPP/7zip/Aes.mak +10 -0
  507. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
  508. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +90 -0
  509. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
  510. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zDecode.h +73 -0
  511. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +721 -0
  512. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zEncode.h +95 -0
  513. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
  514. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
  515. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
  516. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +795 -0
  517. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHandler.h +178 -0
  518. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1158 -0
  519. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
  520. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHeader.h +156 -0
  521. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zIn.cpp +1764 -0
  522. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zIn.h +454 -0
  523. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zItem.h +207 -0
  524. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
  525. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zOut.h +346 -0
  526. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
  527. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zProperties.h +26 -0
  528. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
  529. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
  530. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
  531. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +3088 -0
  532. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
  533. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
  534. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/StdAfx.h +11 -0
  535. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Archive.def +14 -0
  536. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Archive2.def +21 -0
  537. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
  538. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
  539. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
  540. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
  541. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
  542. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +311 -0
  543. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/HandlerOut.h +154 -0
  544. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
  545. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
  546. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +135 -0
  547. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +30 -0
  548. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
  549. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/MultiStream.h +86 -0
  550. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
  551. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
  552. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
  553. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
  554. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/StdAfx.h +11 -0
  555. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/DllExports2.cpp +175 -0
  556. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/IArchive.h +754 -0
  557. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
  558. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/LzmaHandler.cpp +608 -0
  559. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/SplitHandler.cpp +353 -0
  560. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/StdAfx.h +11 -0
  561. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/XzHandler.cpp +1440 -0
  562. hdiffpatch/_c_src/lzma/CPP/7zip/Archive/XzHandler.h +11 -0
  563. hdiffpatch/_c_src/lzma/CPP/7zip/Asm.mak +12 -0
  564. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
  565. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
  566. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
  567. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
  568. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/makefile +168 -0
  569. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +279 -0
  570. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
  571. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
  572. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
  573. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
  574. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
  575. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
  576. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
  577. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/makefile +121 -0
  578. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
  579. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +817 -0
  580. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
  581. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
  582. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
  583. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
  584. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
  585. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
  586. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
  587. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +715 -0
  588. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  589. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
  590. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
  591. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
  592. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
  593. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
  594. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/makefile +137 -0
  595. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
  596. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
  597. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
  598. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
  599. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
  600. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
  601. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
  602. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
  603. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +371 -0
  604. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
  605. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
  606. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
  607. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
  608. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
  609. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  610. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  611. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
  612. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
  613. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
  614. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
  615. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
  616. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/makefile +159 -0
  617. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
  618. hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
  619. hdiffpatch/_c_src/lzma/CPP/7zip/Common/CWrappers.cpp +358 -0
  620. hdiffpatch/_c_src/lzma/CPP/7zip/Common/CWrappers.h +182 -0
  621. hdiffpatch/_c_src/lzma/CPP/7zip/Common/CreateCoder.cpp +548 -0
  622. hdiffpatch/_c_src/lzma/CPP/7zip/Common/CreateCoder.h +200 -0
  623. hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
  624. hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilePathAutoRename.h +10 -0
  625. hdiffpatch/_c_src/lzma/CPP/7zip/Common/FileStreams.cpp +923 -0
  626. hdiffpatch/_c_src/lzma/CPP/7zip/Common/FileStreams.h +205 -0
  627. hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilterCoder.cpp +577 -0
  628. hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilterCoder.h +201 -0
  629. hdiffpatch/_c_src/lzma/CPP/7zip/Common/InBuffer.cpp +182 -0
  630. hdiffpatch/_c_src/lzma/CPP/7zip/Common/InBuffer.h +111 -0
  631. hdiffpatch/_c_src/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
  632. hdiffpatch/_c_src/lzma/CPP/7zip/Common/InOutTempBuffer.h +45 -0
  633. hdiffpatch/_c_src/lzma/CPP/7zip/Common/LimitedStreams.cpp +393 -0
  634. hdiffpatch/_c_src/lzma/CPP/7zip/Common/LimitedStreams.h +221 -0
  635. hdiffpatch/_c_src/lzma/CPP/7zip/Common/LockedStream.cpp +3 -0
  636. hdiffpatch/_c_src/lzma/CPP/7zip/Common/LockedStream.h +6 -0
  637. hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodId.cpp +3 -0
  638. hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodId.h +10 -0
  639. hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodProps.cpp +739 -0
  640. hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodProps.h +345 -0
  641. hdiffpatch/_c_src/lzma/CPP/7zip/Common/MultiOutStream.cpp +855 -0
  642. hdiffpatch/_c_src/lzma/CPP/7zip/Common/MultiOutStream.h +160 -0
  643. hdiffpatch/_c_src/lzma/CPP/7zip/Common/OffsetStream.cpp +37 -0
  644. hdiffpatch/_c_src/lzma/CPP/7zip/Common/OffsetStream.h +22 -0
  645. hdiffpatch/_c_src/lzma/CPP/7zip/Common/OutBuffer.cpp +111 -0
  646. hdiffpatch/_c_src/lzma/CPP/7zip/Common/OutBuffer.h +108 -0
  647. hdiffpatch/_c_src/lzma/CPP/7zip/Common/ProgressUtils.cpp +51 -0
  648. hdiffpatch/_c_src/lzma/CPP/7zip/Common/ProgressUtils.h +33 -0
  649. hdiffpatch/_c_src/lzma/CPP/7zip/Common/PropId.cpp +117 -0
  650. hdiffpatch/_c_src/lzma/CPP/7zip/Common/RegisterArc.h +80 -0
  651. hdiffpatch/_c_src/lzma/CPP/7zip/Common/RegisterCodec.h +106 -0
  652. hdiffpatch/_c_src/lzma/CPP/7zip/Common/StdAfx.h +11 -0
  653. hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamBinder.cpp +151 -0
  654. hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamBinder.h +78 -0
  655. hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamObjects.cpp +290 -0
  656. hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamObjects.h +146 -0
  657. hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamUtils.cpp +101 -0
  658. hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamUtils.h +31 -0
  659. hdiffpatch/_c_src/lzma/CPP/7zip/Common/UniqBlocks.cpp +57 -0
  660. hdiffpatch/_c_src/lzma/CPP/7zip/Common/UniqBlocks.h +41 -0
  661. hdiffpatch/_c_src/lzma/CPP/7zip/Common/VirtThread.cpp +47 -0
  662. hdiffpatch/_c_src/lzma/CPP/7zip/Common/VirtThread.h +24 -0
  663. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
  664. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Bcj2Coder.h +127 -0
  665. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
  666. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BcjCoder.cpp +24 -0
  667. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BcjCoder.h +37 -0
  668. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BcjRegister.cpp +17 -0
  669. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BranchMisc.cpp +106 -0
  670. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BranchMisc.h +59 -0
  671. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BranchRegister.cpp +58 -0
  672. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/ByteSwap.cpp +91 -0
  673. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CodecExports.cpp +378 -0
  674. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CopyCoder.cpp +153 -0
  675. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CopyCoder.h +34 -0
  676. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CopyRegister.cpp +15 -0
  677. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
  678. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
  679. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
  680. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +126 -0
  681. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
  682. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
  683. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
  684. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaDecoder.h +113 -0
  685. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +356 -0
  686. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaEncoder.h +45 -0
  687. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
  688. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
  689. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdDecoder.h +87 -0
  690. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
  691. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdEncoder.h +49 -0
  692. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
  693. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/StdAfx.h +11 -0
  694. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzDecoder.cpp +151 -0
  695. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzDecoder.h +86 -0
  696. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzEncoder.cpp +243 -0
  697. hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzEncoder.h +35 -0
  698. hdiffpatch/_c_src/lzma/CPP/7zip/Crc.mak +8 -0
  699. hdiffpatch/_c_src/lzma/CPP/7zip/Crc64.mak +8 -0
  700. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/7zAes.cpp +315 -0
  701. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/7zAes.h +130 -0
  702. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
  703. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/MyAes.cpp +258 -0
  704. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/MyAes.h +122 -0
  705. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
  706. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/RandGen.cpp +241 -0
  707. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/RandGen.h +41 -0
  708. hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/StdAfx.h +11 -0
  709. hdiffpatch/_c_src/lzma/CPP/7zip/GuiCommon.rc +119 -0
  710. hdiffpatch/_c_src/lzma/CPP/7zip/Guid.txt +243 -0
  711. hdiffpatch/_c_src/lzma/CPP/7zip/ICoder.h +477 -0
  712. hdiffpatch/_c_src/lzma/CPP/7zip/IDecl.h +76 -0
  713. hdiffpatch/_c_src/lzma/CPP/7zip/IPassword.h +54 -0
  714. hdiffpatch/_c_src/lzma/CPP/7zip/IProgress.h +20 -0
  715. hdiffpatch/_c_src/lzma/CPP/7zip/IStream.h +210 -0
  716. hdiffpatch/_c_src/lzma/CPP/7zip/LzFindOpt.mak +7 -0
  717. hdiffpatch/_c_src/lzma/CPP/7zip/LzmaDec.mak +7 -0
  718. hdiffpatch/_c_src/lzma/CPP/7zip/LzmaDec_gcc.mak +14 -0
  719. hdiffpatch/_c_src/lzma/CPP/7zip/MyVersion.h +2 -0
  720. hdiffpatch/_c_src/lzma/CPP/7zip/MyVersionInfo.rc +2 -0
  721. hdiffpatch/_c_src/lzma/CPP/7zip/PropID.h +178 -0
  722. hdiffpatch/_c_src/lzma/CPP/7zip/Sha256.mak +13 -0
  723. hdiffpatch/_c_src/lzma/CPP/7zip/SubBuild.mak +3 -0
  724. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
  725. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
  726. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
  727. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
  728. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
  729. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/makefile +29 -0
  730. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
  731. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/resource.rc +3 -0
  732. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1769 -0
  733. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
  734. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +2747 -0
  735. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +584 -0
  736. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
  737. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveName.h +16 -0
  738. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +398 -0
  739. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
  740. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Bench.cpp +4971 -0
  741. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Bench.h +121 -0
  742. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
  743. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/DefaultName.h +11 -0
  744. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/DirItem.h +407 -0
  745. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +1654 -0
  746. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
  747. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExitCode.h +27 -0
  748. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Extract.cpp +575 -0
  749. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Extract.h +107 -0
  750. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExtractMode.h +44 -0
  751. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +296 -0
  752. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
  753. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/HashCalc.cpp +2120 -0
  754. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/HashCalc.h +329 -0
  755. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
  756. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +1337 -0
  757. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
  758. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +3702 -0
  759. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/OpenArchive.h +469 -0
  760. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +745 -0
  761. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
  762. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Property.h +14 -0
  763. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
  764. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SetProperties.h +10 -0
  765. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
  766. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SortUtils.h +10 -0
  767. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/StdAfx.h +11 -0
  768. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
  769. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/TempFiles.h +19 -0
  770. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Update.cpp +1931 -0
  771. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Update.h +219 -0
  772. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
  773. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateAction.h +66 -0
  774. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +1029 -0
  775. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
  776. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +302 -0
  777. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdatePair.h +27 -0
  778. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +74 -0
  779. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
  780. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
  781. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/WorkDir.h +30 -0
  782. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
  783. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
  784. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/BenchCon.h +14 -0
  785. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/Console.mak +46 -0
  786. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/Console.manifest +16 -0
  787. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
  788. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
  789. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +946 -0
  790. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
  791. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/HashCon.cpp +426 -0
  792. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/HashCon.h +58 -0
  793. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/List.cpp +1417 -0
  794. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/List.h +42 -0
  795. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/Main.cpp +1632 -0
  796. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/MainAr.cpp +235 -0
  797. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
  798. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
  799. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
  800. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
  801. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
  802. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/StdAfx.h +11 -0
  803. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +998 -0
  804. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
  805. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
  806. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
  807. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/makefile +68 -0
  808. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/makefile.gcc +187 -0
  809. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/resource.rc +7 -0
  810. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
  811. hdiffpatch/_c_src/lzma/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
  812. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
  813. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
  814. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
  815. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
  816. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
  817. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
  818. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
  819. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1272 -0
  820. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
  821. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
  822. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
  823. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
  824. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
  825. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
  826. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
  827. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
  828. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
  829. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
  830. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
  831. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
  832. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
  833. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
  834. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
  835. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
  836. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
  837. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
  838. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
  839. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1483 -0
  840. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
  841. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
  842. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
  843. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
  844. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
  845. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
  846. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
  847. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
  848. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
  849. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +351 -0
  850. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
  851. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/resource.h +199 -0
  852. hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
  853. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
  854. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/Extract.rc +59 -0
  855. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +421 -0
  856. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
  857. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
  858. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
  859. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
  860. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
  861. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
  862. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/HashGUI.h +27 -0
  863. hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/resource2.h +2 -0
  864. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang.mak +3 -0
  865. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang_arm64.mak +3 -0
  866. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang_x64.mak +3 -0
  867. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang_x86.mak +3 -0
  868. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc.mak +3 -0
  869. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
  870. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc_x64.mak +3 -0
  871. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc_x86.mak +3 -0
  872. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_mac_arm64.mak +3 -0
  873. hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_mac_x64.mak +3 -0
  874. hdiffpatch/_c_src/lzma/CPP/7zip/var_clang.mak +11 -0
  875. hdiffpatch/_c_src/lzma/CPP/7zip/var_clang_arm64.mak +19 -0
  876. hdiffpatch/_c_src/lzma/CPP/7zip/var_clang_x64.mak +11 -0
  877. hdiffpatch/_c_src/lzma/CPP/7zip/var_clang_x86.mak +11 -0
  878. hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc.mak +12 -0
  879. hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc_arm64.mak +12 -0
  880. hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc_x64.mak +11 -0
  881. hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc_x86.mak +10 -0
  882. hdiffpatch/_c_src/lzma/CPP/7zip/var_mac_arm64.mak +13 -0
  883. hdiffpatch/_c_src/lzma/CPP/7zip/var_mac_x64.mak +11 -0
  884. hdiffpatch/_c_src/lzma/CPP/7zip/warn_clang.mak +3 -0
  885. hdiffpatch/_c_src/lzma/CPP/7zip/warn_clang_mac.mak +9 -0
  886. hdiffpatch/_c_src/lzma/CPP/7zip/warn_gcc.mak +55 -0
  887. hdiffpatch/_c_src/lzma/CPP/Build.mak +246 -0
  888. hdiffpatch/_c_src/lzma/CPP/Common/AutoPtr.h +46 -0
  889. hdiffpatch/_c_src/lzma/CPP/Common/CRC.cpp +7 -0
  890. hdiffpatch/_c_src/lzma/CPP/Common/C_FileIO.cpp +3 -0
  891. hdiffpatch/_c_src/lzma/CPP/Common/C_FileIO.h +6 -0
  892. hdiffpatch/_c_src/lzma/CPP/Common/ComTry.h +21 -0
  893. hdiffpatch/_c_src/lzma/CPP/Common/CommandLineParser.cpp +231 -0
  894. hdiffpatch/_c_src/lzma/CPP/Common/CommandLineParser.h +63 -0
  895. hdiffpatch/_c_src/lzma/CPP/Common/Common.h +28 -0
  896. hdiffpatch/_c_src/lzma/CPP/Common/Common0.h +330 -0
  897. hdiffpatch/_c_src/lzma/CPP/Common/CrcReg.cpp +77 -0
  898. hdiffpatch/_c_src/lzma/CPP/Common/Defs.h +16 -0
  899. hdiffpatch/_c_src/lzma/CPP/Common/DynLimBuf.cpp +93 -0
  900. hdiffpatch/_c_src/lzma/CPP/Common/DynLimBuf.h +41 -0
  901. hdiffpatch/_c_src/lzma/CPP/Common/DynamicBuffer.h +76 -0
  902. hdiffpatch/_c_src/lzma/CPP/Common/IntToString.cpp +215 -0
  903. hdiffpatch/_c_src/lzma/CPP/Common/IntToString.h +54 -0
  904. hdiffpatch/_c_src/lzma/CPP/Common/Lang.h +30 -0
  905. hdiffpatch/_c_src/lzma/CPP/Common/ListFileUtils.cpp +150 -0
  906. hdiffpatch/_c_src/lzma/CPP/Common/ListFileUtils.h +18 -0
  907. hdiffpatch/_c_src/lzma/CPP/Common/LzFindPrepare.cpp +7 -0
  908. hdiffpatch/_c_src/lzma/CPP/Common/MyBuffer.h +297 -0
  909. hdiffpatch/_c_src/lzma/CPP/Common/MyBuffer2.h +185 -0
  910. hdiffpatch/_c_src/lzma/CPP/Common/MyCom.h +693 -0
  911. hdiffpatch/_c_src/lzma/CPP/Common/MyException.h +14 -0
  912. hdiffpatch/_c_src/lzma/CPP/Common/MyGuidDef.h +63 -0
  913. hdiffpatch/_c_src/lzma/CPP/Common/MyInitGuid.h +57 -0
  914. hdiffpatch/_c_src/lzma/CPP/Common/MyLinux.h +75 -0
  915. hdiffpatch/_c_src/lzma/CPP/Common/MyString.cpp +1871 -0
  916. hdiffpatch/_c_src/lzma/CPP/Common/MyString.h +1078 -0
  917. hdiffpatch/_c_src/lzma/CPP/Common/MyTypes.h +38 -0
  918. hdiffpatch/_c_src/lzma/CPP/Common/MyUnknown.h +8 -0
  919. hdiffpatch/_c_src/lzma/CPP/Common/MyVector.cpp +3 -0
  920. hdiffpatch/_c_src/lzma/CPP/Common/MyVector.h +724 -0
  921. hdiffpatch/_c_src/lzma/CPP/Common/MyWindows.cpp +292 -0
  922. hdiffpatch/_c_src/lzma/CPP/Common/MyWindows.h +325 -0
  923. hdiffpatch/_c_src/lzma/CPP/Common/NewHandler.cpp +340 -0
  924. hdiffpatch/_c_src/lzma/CPP/Common/NewHandler.h +121 -0
  925. hdiffpatch/_c_src/lzma/CPP/Common/Sha256Prepare.cpp +7 -0
  926. hdiffpatch/_c_src/lzma/CPP/Common/Sha256Reg.cpp +67 -0
  927. hdiffpatch/_c_src/lzma/CPP/Common/StdAfx.h +8 -0
  928. hdiffpatch/_c_src/lzma/CPP/Common/StdInStream.cpp +98 -0
  929. hdiffpatch/_c_src/lzma/CPP/Common/StdInStream.h +46 -0
  930. hdiffpatch/_c_src/lzma/CPP/Common/StdOutStream.cpp +248 -0
  931. hdiffpatch/_c_src/lzma/CPP/Common/StdOutStream.h +87 -0
  932. hdiffpatch/_c_src/lzma/CPP/Common/StringConvert.cpp +762 -0
  933. hdiffpatch/_c_src/lzma/CPP/Common/StringConvert.h +110 -0
  934. hdiffpatch/_c_src/lzma/CPP/Common/StringToInt.cpp +154 -0
  935. hdiffpatch/_c_src/lzma/CPP/Common/StringToInt.h +38 -0
  936. hdiffpatch/_c_src/lzma/CPP/Common/TextConfig.cpp +123 -0
  937. hdiffpatch/_c_src/lzma/CPP/Common/TextConfig.h +19 -0
  938. hdiffpatch/_c_src/lzma/CPP/Common/UTFConvert.cpp +863 -0
  939. hdiffpatch/_c_src/lzma/CPP/Common/UTFConvert.h +384 -0
  940. hdiffpatch/_c_src/lzma/CPP/Common/Wildcard.cpp +788 -0
  941. hdiffpatch/_c_src/lzma/CPP/Common/Wildcard.h +231 -0
  942. hdiffpatch/_c_src/lzma/CPP/Common/XzCrc64Init.cpp +7 -0
  943. hdiffpatch/_c_src/lzma/CPP/Common/XzCrc64Reg.cpp +39 -0
  944. hdiffpatch/_c_src/lzma/CPP/Windows/COM.h +86 -0
  945. hdiffpatch/_c_src/lzma/CPP/Windows/Clipboard.cpp +130 -0
  946. hdiffpatch/_c_src/lzma/CPP/Windows/Clipboard.h +28 -0
  947. hdiffpatch/_c_src/lzma/CPP/Windows/CommonDialog.cpp +269 -0
  948. hdiffpatch/_c_src/lzma/CPP/Windows/CommonDialog.h +43 -0
  949. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ComboBox.cpp +66 -0
  950. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ComboBox.h +77 -0
  951. hdiffpatch/_c_src/lzma/CPP/Windows/Control/CommandBar.h +52 -0
  952. hdiffpatch/_c_src/lzma/CPP/Windows/Control/Dialog.cpp +446 -0
  953. hdiffpatch/_c_src/lzma/CPP/Windows/Control/Dialog.h +213 -0
  954. hdiffpatch/_c_src/lzma/CPP/Windows/Control/Edit.h +19 -0
  955. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ImageList.cpp +10 -0
  956. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ImageList.h +87 -0
  957. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ListView.cpp +162 -0
  958. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ListView.h +156 -0
  959. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ProgressBar.h +35 -0
  960. hdiffpatch/_c_src/lzma/CPP/Windows/Control/PropertyPage.cpp +165 -0
  961. hdiffpatch/_c_src/lzma/CPP/Windows/Control/PropertyPage.h +50 -0
  962. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ReBar.h +34 -0
  963. hdiffpatch/_c_src/lzma/CPP/Windows/Control/Static.h +28 -0
  964. hdiffpatch/_c_src/lzma/CPP/Windows/Control/StatusBar.h +42 -0
  965. hdiffpatch/_c_src/lzma/CPP/Windows/Control/StdAfx.h +11 -0
  966. hdiffpatch/_c_src/lzma/CPP/Windows/Control/ToolBar.h +43 -0
  967. hdiffpatch/_c_src/lzma/CPP/Windows/Control/Trackbar.h +27 -0
  968. hdiffpatch/_c_src/lzma/CPP/Windows/Control/Window2.cpp +202 -0
  969. hdiffpatch/_c_src/lzma/CPP/Windows/Control/Window2.h +53 -0
  970. hdiffpatch/_c_src/lzma/CPP/Windows/DLL.cpp +178 -0
  971. hdiffpatch/_c_src/lzma/CPP/Windows/DLL.h +103 -0
  972. hdiffpatch/_c_src/lzma/CPP/Windows/Defs.h +17 -0
  973. hdiffpatch/_c_src/lzma/CPP/Windows/ErrorMsg.cpp +133 -0
  974. hdiffpatch/_c_src/lzma/CPP/Windows/ErrorMsg.h +16 -0
  975. hdiffpatch/_c_src/lzma/CPP/Windows/FileDir.cpp +1331 -0
  976. hdiffpatch/_c_src/lzma/CPP/Windows/FileDir.h +156 -0
  977. hdiffpatch/_c_src/lzma/CPP/Windows/FileFind.cpp +1442 -0
  978. hdiffpatch/_c_src/lzma/CPP/Windows/FileFind.h +347 -0
  979. hdiffpatch/_c_src/lzma/CPP/Windows/FileIO.cpp +954 -0
  980. hdiffpatch/_c_src/lzma/CPP/Windows/FileIO.h +448 -0
  981. hdiffpatch/_c_src/lzma/CPP/Windows/FileLink.cpp +621 -0
  982. hdiffpatch/_c_src/lzma/CPP/Windows/FileMapping.cpp +12 -0
  983. hdiffpatch/_c_src/lzma/CPP/Windows/FileMapping.h +66 -0
  984. hdiffpatch/_c_src/lzma/CPP/Windows/FileName.cpp +896 -0
  985. hdiffpatch/_c_src/lzma/CPP/Windows/FileName.h +133 -0
  986. hdiffpatch/_c_src/lzma/CPP/Windows/FileSystem.cpp +187 -0
  987. hdiffpatch/_c_src/lzma/CPP/Windows/FileSystem.h +31 -0
  988. hdiffpatch/_c_src/lzma/CPP/Windows/Handle.h +39 -0
  989. hdiffpatch/_c_src/lzma/CPP/Windows/MemoryGlobal.cpp +36 -0
  990. hdiffpatch/_c_src/lzma/CPP/Windows/MemoryGlobal.h +55 -0
  991. hdiffpatch/_c_src/lzma/CPP/Windows/MemoryLock.cpp +127 -0
  992. hdiffpatch/_c_src/lzma/CPP/Windows/MemoryLock.h +40 -0
  993. hdiffpatch/_c_src/lzma/CPP/Windows/NtCheck.h +58 -0
  994. hdiffpatch/_c_src/lzma/CPP/Windows/PropVariant.cpp +393 -0
  995. hdiffpatch/_c_src/lzma/CPP/Windows/PropVariant.h +173 -0
  996. hdiffpatch/_c_src/lzma/CPP/Windows/PropVariantConv.cpp +274 -0
  997. hdiffpatch/_c_src/lzma/CPP/Windows/PropVariantConv.h +47 -0
  998. hdiffpatch/_c_src/lzma/CPP/Windows/Registry.cpp +474 -0
  999. hdiffpatch/_c_src/lzma/CPP/Windows/Registry.h +96 -0
  1000. hdiffpatch/_c_src/lzma/CPP/Windows/ResourceString.cpp +103 -0
  1001. hdiffpatch/_c_src/lzma/CPP/Windows/ResourceString.h +17 -0
  1002. hdiffpatch/_c_src/lzma/CPP/Windows/SecurityUtils.cpp +186 -0
  1003. hdiffpatch/_c_src/lzma/CPP/Windows/SecurityUtils.h +150 -0
  1004. hdiffpatch/_c_src/lzma/CPP/Windows/Shell.cpp +839 -0
  1005. hdiffpatch/_c_src/lzma/CPP/Windows/Shell.h +129 -0
  1006. hdiffpatch/_c_src/lzma/CPP/Windows/StdAfx.h +11 -0
  1007. hdiffpatch/_c_src/lzma/CPP/Windows/Synchronization.cpp +87 -0
  1008. hdiffpatch/_c_src/lzma/CPP/Windows/Synchronization.h +386 -0
  1009. hdiffpatch/_c_src/lzma/CPP/Windows/System.cpp +327 -0
  1010. hdiffpatch/_c_src/lzma/CPP/Windows/System.h +132 -0
  1011. hdiffpatch/_c_src/lzma/CPP/Windows/SystemInfo.cpp +1251 -0
  1012. hdiffpatch/_c_src/lzma/CPP/Windows/SystemInfo.h +19 -0
  1013. hdiffpatch/_c_src/lzma/CPP/Windows/Thread.h +44 -0
  1014. hdiffpatch/_c_src/lzma/CPP/Windows/TimeUtils.cpp +466 -0
  1015. hdiffpatch/_c_src/lzma/CPP/Windows/TimeUtils.h +146 -0
  1016. hdiffpatch/_c_src/lzma/CPP/Windows/Window.cpp +179 -0
  1017. hdiffpatch/_c_src/lzma/CPP/Windows/Window.h +363 -0
  1018. hdiffpatch/_c_src/lzma/CS/7zip/Common/CRC.cs +55 -0
  1019. hdiffpatch/_c_src/lzma/CS/7zip/Common/CommandLineParser.cs +274 -0
  1020. hdiffpatch/_c_src/lzma/CS/7zip/Common/InBuffer.cs +72 -0
  1021. hdiffpatch/_c_src/lzma/CS/7zip/Common/OutBuffer.cs +47 -0
  1022. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +24 -0
  1023. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +367 -0
  1024. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +132 -0
  1025. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +110 -0
  1026. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +76 -0
  1027. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +398 -0
  1028. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +1480 -0
  1029. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +364 -0
  1030. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +20 -0
  1031. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +340 -0
  1032. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +29 -0
  1033. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +70 -0
  1034. hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +42 -0
  1035. hdiffpatch/_c_src/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +234 -0
  1036. hdiffpatch/_c_src/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +117 -0
  1037. hdiffpatch/_c_src/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +157 -0
  1038. hdiffpatch/_c_src/lzma/CS/7zip/ICoder.cs +157 -0
  1039. hdiffpatch/_c_src/lzma/DOC/7zC.txt +187 -0
  1040. hdiffpatch/_c_src/lzma/DOC/7zFormat.txt +469 -0
  1041. hdiffpatch/_c_src/lzma/DOC/Methods.txt +177 -0
  1042. hdiffpatch/_c_src/lzma/DOC/installer.txt +166 -0
  1043. hdiffpatch/_c_src/lzma/DOC/lzma-history.txt +634 -0
  1044. hdiffpatch/_c_src/lzma/DOC/lzma-sdk.txt +409 -0
  1045. hdiffpatch/_c_src/lzma/DOC/lzma-specification.txt +1176 -0
  1046. hdiffpatch/_c_src/lzma/DOC/lzma.txt +345 -0
  1047. hdiffpatch/_c_src/lzma/Java/SevenZip/CRC.java +52 -0
  1048. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZ/BinTree.java +382 -0
  1049. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZ/InWindow.java +131 -0
  1050. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +85 -0
  1051. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZMA/Base.java +88 -0
  1052. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +329 -0
  1053. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +1416 -0
  1054. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +55 -0
  1055. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +99 -0
  1056. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +88 -0
  1057. hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +151 -0
  1058. hdiffpatch/_c_src/lzma/Java/SevenZip/ICodeProgress.java +6 -0
  1059. hdiffpatch/_c_src/lzma/Java/SevenZip/LzmaAlone.java +253 -0
  1060. hdiffpatch/_c_src/lzma/Java/SevenZip/LzmaBench.java +392 -0
  1061. hdiffpatch/_c_src/lzma/bin/7zS2.sfx +0 -0
  1062. hdiffpatch/_c_src/lzma/bin/7zS2con.sfx +0 -0
  1063. hdiffpatch/_c_src/lzma/bin/7zSD.sfx +0 -0
  1064. hdiffpatch/_c_src/lzma/bin/7zdec.exe +0 -0
  1065. hdiffpatch/_c_src/lzma/bin/7zr.exe +0 -0
  1066. hdiffpatch/_c_src/lzma/bin/installer/config.txt +5 -0
  1067. hdiffpatch/_c_src/lzma/bin/installer/cr.bat +5 -0
  1068. hdiffpatch/_c_src/lzma/bin/lzma.exe +0 -0
  1069. hdiffpatch/_c_src/lzma/bin/x64/7zr.exe +0 -0
  1070. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/argparse/__init__.py +226 -0
  1071. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/collections/__init__.py +16 -0
  1072. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/collections/deque.py +58 -0
  1073. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/fnmatch/__init__.py +139 -0
  1074. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/pathlib/__init__.py +207 -0
  1075. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/shutil/__init__.py +48 -0
  1076. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/tempfile/__init__.py +59 -0
  1077. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/unittest/__init__.py +463 -0
  1078. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/unittest/__main__.py +146 -0
  1079. hdiffpatch/_c_src/tamp/.belay/dependencies/dev/uprofiler/__init__.py +108 -0
  1080. hdiffpatch/_c_src/tamp/.bumpversion.cfg +24 -0
  1081. hdiffpatch/_c_src/tamp/.clang-format +5 -0
  1082. hdiffpatch/_c_src/tamp/.codecov.yml +14 -0
  1083. hdiffpatch/_c_src/tamp/.git +1 -0
  1084. hdiffpatch/_c_src/tamp/.github/FUNDING.yml +13 -0
  1085. hdiffpatch/_c_src/tamp/.github/contributing.md +43 -0
  1086. hdiffpatch/_c_src/tamp/.github/dependabot.yml +11 -0
  1087. hdiffpatch/_c_src/tamp/.github/workflows/build_wheels.yaml +291 -0
  1088. hdiffpatch/_c_src/tamp/.github/workflows/esp_upload_component.yml +49 -0
  1089. hdiffpatch/_c_src/tamp/.github/workflows/mpy_native_module.yaml +236 -0
  1090. hdiffpatch/_c_src/tamp/.github/workflows/tests.yaml +134 -0
  1091. hdiffpatch/_c_src/tamp/.gitignore +262 -0
  1092. hdiffpatch/_c_src/tamp/.gitmodules +3 -0
  1093. hdiffpatch/_c_src/tamp/.pre-commit-config.yaml +69 -0
  1094. hdiffpatch/_c_src/tamp/.readthedocs.yaml +32 -0
  1095. hdiffpatch/_c_src/tamp/LICENSE +201 -0
  1096. hdiffpatch/_c_src/tamp/MICROPYTHON_TESTING.rst +7 -0
  1097. hdiffpatch/_c_src/tamp/Makefile +195 -0
  1098. hdiffpatch/_c_src/tamp/README.md +300 -0
  1099. hdiffpatch/_c_src/tamp/assets/favicon-16x16.png +0 -0
  1100. hdiffpatch/_c_src/tamp/assets/favicon-32x32.png +0 -0
  1101. hdiffpatch/_c_src/tamp/assets/icon.png +0 -0
  1102. hdiffpatch/_c_src/tamp/assets/logo.png +0 -0
  1103. hdiffpatch/_c_src/tamp/assets/logo_200w.png +0 -0
  1104. hdiffpatch/_c_src/tamp/assets/logo_300w.png +0 -0
  1105. hdiffpatch/_c_src/tamp/assets/match-size-plot.png +0 -0
  1106. hdiffpatch/_c_src/tamp/assets/social_media.png +0 -0
  1107. hdiffpatch/_c_src/tamp/build.py +104 -0
  1108. hdiffpatch/_c_src/tamp/ctests/Unity/.editorconfig +27 -0
  1109. hdiffpatch/_c_src/tamp/ctests/Unity/.git +1 -0
  1110. hdiffpatch/_c_src/tamp/ctests/Unity/.gitattributes +31 -0
  1111. hdiffpatch/_c_src/tamp/ctests/Unity/.github/workflows/main.yml +32 -0
  1112. hdiffpatch/_c_src/tamp/ctests/Unity/.gitignore +13 -0
  1113. hdiffpatch/_c_src/tamp/ctests/Unity/CMakeLists.txt +159 -0
  1114. hdiffpatch/_c_src/tamp/ctests/Unity/LICENSE.txt +21 -0
  1115. hdiffpatch/_c_src/tamp/ctests/Unity/README.md +200 -0
  1116. hdiffpatch/_c_src/tamp/ctests/Unity/auto/colour_prompt.rb +119 -0
  1117. hdiffpatch/_c_src/tamp/ctests/Unity/auto/colour_reporter.rb +39 -0
  1118. hdiffpatch/_c_src/tamp/ctests/Unity/auto/generate_config.yml +36 -0
  1119. hdiffpatch/_c_src/tamp/ctests/Unity/auto/generate_module.rb +313 -0
  1120. hdiffpatch/_c_src/tamp/ctests/Unity/auto/generate_test_runner.rb +511 -0
  1121. hdiffpatch/_c_src/tamp/ctests/Unity/auto/parse_output.rb +322 -0
  1122. hdiffpatch/_c_src/tamp/ctests/Unity/auto/run_test.erb +37 -0
  1123. hdiffpatch/_c_src/tamp/ctests/Unity/auto/stylize_as_junit.rb +251 -0
  1124. hdiffpatch/_c_src/tamp/ctests/Unity/auto/test_file_filter.rb +25 -0
  1125. hdiffpatch/_c_src/tamp/ctests/Unity/auto/type_sanitizer.rb +6 -0
  1126. hdiffpatch/_c_src/tamp/ctests/Unity/auto/unity_test_summary.py +139 -0
  1127. hdiffpatch/_c_src/tamp/ctests/Unity/auto/unity_test_summary.rb +135 -0
  1128. hdiffpatch/_c_src/tamp/ctests/Unity/auto/unity_to_junit.py +146 -0
  1129. hdiffpatch/_c_src/tamp/ctests/Unity/docs/ThrowTheSwitchCodingStandard.md +206 -0
  1130. hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  1131. hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityAssertionsReference.md +831 -0
  1132. hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityConfigurationGuide.md +563 -0
  1133. hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityGettingStartedGuide.md +251 -0
  1134. hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityHelperScriptsGuide.md +278 -0
  1135. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/makefile +72 -0
  1136. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/readme.txt +5 -0
  1137. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode.c +24 -0
  1138. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode.h +3 -0
  1139. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode2.c +11 -0
  1140. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode2.h +2 -0
  1141. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/TestProductionCode.c +62 -0
  1142. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/TestProductionCode2.c +31 -0
  1143. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
  1144. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
  1145. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/makefile +71 -0
  1146. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/readme.txt +5 -0
  1147. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode.c +24 -0
  1148. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode.h +3 -0
  1149. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode2.c +11 -0
  1150. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode2.h +2 -0
  1151. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/TestProductionCode.c +64 -0
  1152. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/TestProductionCode2.c +33 -0
  1153. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
  1154. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
  1155. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/test_runners/all_tests.c +12 -0
  1156. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/helper/UnityHelper.c +10 -0
  1157. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/helper/UnityHelper.h +12 -0
  1158. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/rakefile.rb +38 -0
  1159. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/rakefile_helper.rb +250 -0
  1160. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/readme.txt +13 -0
  1161. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode.c +24 -0
  1162. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode.h +3 -0
  1163. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode2.c +11 -0
  1164. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode2.h +2 -0
  1165. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/target_gcc_32.yml +47 -0
  1166. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/test/TestProductionCode.c +62 -0
  1167. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/test/TestProductionCode2.c +31 -0
  1168. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/meson.build +12 -0
  1169. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/readme.txt +15 -0
  1170. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode.c +24 -0
  1171. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode.h +3 -0
  1172. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode2.c +11 -0
  1173. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode2.h +2 -0
  1174. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/meson.build +16 -0
  1175. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/subprojects/unity.wrap +4 -0
  1176. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/TestProductionCode.c +63 -0
  1177. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/TestProductionCode2.c +35 -0
  1178. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/meson.build +7 -0
  1179. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -0
  1180. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -0
  1181. hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/test_runners/meson.build +13 -0
  1182. hdiffpatch/_c_src/tamp/ctests/Unity/examples/unity_config.h +244 -0
  1183. hdiffpatch/_c_src/tamp/ctests/Unity/extras/eclipse/error_parsers.txt +26 -0
  1184. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/readme.md +29 -0
  1185. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/src/unity_fixture.c +310 -0
  1186. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/src/unity_fixture.h +83 -0
  1187. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/src/unity_fixture_internals.h +50 -0
  1188. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/Makefile +72 -0
  1189. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/main/AllTests.c +20 -0
  1190. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/template_fixture_tests.c +39 -0
  1191. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/unity_fixture_Test.c +245 -0
  1192. hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -0
  1193. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/readme.md +49 -0
  1194. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/src/unity_memory.c +202 -0
  1195. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/src/unity_memory.h +60 -0
  1196. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/Makefile +78 -0
  1197. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_memory_Test.c +325 -0
  1198. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_memory_TestRunner.c +49 -0
  1199. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_output_Spy.c +56 -0
  1200. hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_output_Spy.h +16 -0
  1201. hdiffpatch/_c_src/tamp/ctests/Unity/meson.build +14 -0
  1202. hdiffpatch/_c_src/tamp/ctests/Unity/src/meson.build +11 -0
  1203. hdiffpatch/_c_src/tamp/ctests/Unity/src/unity.c +2110 -0
  1204. hdiffpatch/_c_src/tamp/ctests/Unity/src/unity.h +661 -0
  1205. hdiffpatch/_c_src/tamp/ctests/Unity/src/unity_internals.h +1039 -0
  1206. hdiffpatch/_c_src/tamp/ctests/Unity/test/.rubocop.yml +76 -0
  1207. hdiffpatch/_c_src/tamp/ctests/Unity/test/Makefile +160 -0
  1208. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_cmd.c +61 -0
  1209. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_def.c +57 -0
  1210. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_head1.c +55 -0
  1211. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_head1.h +15 -0
  1212. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_cmd.c +80 -0
  1213. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_def.c +76 -0
  1214. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_head1.c +75 -0
  1215. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_head1.h +13 -0
  1216. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_new1.c +89 -0
  1217. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_new2.c +89 -0
  1218. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_param.c +77 -0
  1219. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_run1.c +89 -0
  1220. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_run2.c +89 -0
  1221. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_yaml.c +90 -0
  1222. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_new1.c +67 -0
  1223. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_new2.c +70 -0
  1224. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_param.c +58 -0
  1225. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_run1.c +67 -0
  1226. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_run2.c +70 -0
  1227. hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_yaml.c +71 -0
  1228. hdiffpatch/_c_src/tamp/ctests/Unity/test/rakefile +163 -0
  1229. hdiffpatch/_c_src/tamp/ctests/Unity/test/rakefile_helper.rb +315 -0
  1230. hdiffpatch/_c_src/tamp/ctests/Unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  1231. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/ansi.yml +44 -0
  1232. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/clang_file.yml +72 -0
  1233. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/clang_strict.yml +71 -0
  1234. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_32.yml +45 -0
  1235. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_64.yml +46 -0
  1236. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_auto_limits.yml +43 -0
  1237. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_auto_stdint.yml +55 -0
  1238. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_manual_math.yml +43 -0
  1239. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/hitech_picc18.yml +91 -0
  1240. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_arm_v4.yml +98 -0
  1241. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_arm_v5.yml +92 -0
  1242. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_arm_v5_3.yml +92 -0
  1243. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +90 -0
  1244. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_cortexm3_v5.yml +94 -0
  1245. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_msp430.yml +112 -0
  1246. hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_sh2a_v6.yml +99 -0
  1247. hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/CException.h +11 -0
  1248. hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/Defs.h +8 -0
  1249. hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/cmock.h +14 -0
  1250. hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/mockMock.h +13 -0
  1251. hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/testRunnerGenerator.c +189 -0
  1252. hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/testRunnerGeneratorSmall.c +70 -0
  1253. hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -0
  1254. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/self_assessment_utils.h +144 -0
  1255. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_generate_test_runner.rb +1260 -0
  1256. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_arrays.c +2874 -0
  1257. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_core.c +371 -0
  1258. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_doubles.c +773 -0
  1259. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_floats.c +884 -0
  1260. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_integers.c +2847 -0
  1261. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_integers_64.c +773 -0
  1262. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_memory.c +81 -0
  1263. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_parameterized.c +171 -0
  1264. hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_strings.c +329 -0
  1265. hdiffpatch/_c_src/tamp/ctests/Unity/unityConfig.cmake +1 -0
  1266. hdiffpatch/_c_src/tamp/ctests/test_decompressor.c +81 -0
  1267. hdiffpatch/_c_src/tamp/docs/Makefile +21 -0
  1268. hdiffpatch/_c_src/tamp/docs/make.bat +35 -0
  1269. hdiffpatch/_c_src/tamp/docs/source/Installation.rst +97 -0
  1270. hdiffpatch/_c_src/tamp/docs/source/_static/.gitkeep +0 -0
  1271. hdiffpatch/_c_src/tamp/docs/source/_static/custom.css +13 -0
  1272. hdiffpatch/_c_src/tamp/docs/source/c_library.rst +339 -0
  1273. hdiffpatch/_c_src/tamp/docs/source/conf.py +195 -0
  1274. hdiffpatch/_c_src/tamp/docs/source/index.rst +16 -0
  1275. hdiffpatch/_c_src/tamp/docs/source/python_api.rst +66 -0
  1276. hdiffpatch/_c_src/tamp/docs/source/specification.rst +189 -0
  1277. hdiffpatch/_c_src/tamp/espidf/.gitignore +2 -0
  1278. hdiffpatch/_c_src/tamp/espidf/CMakeLists.txt +25 -0
  1279. hdiffpatch/_c_src/tamp/espidf/Kconfig +18 -0
  1280. hdiffpatch/_c_src/tamp/espidf/Makefile +4 -0
  1281. hdiffpatch/_c_src/tamp/espidf/compressor_esp32.cpp +139 -0
  1282. hdiffpatch/_c_src/tamp/espidf/idf_component.yml +9 -0
  1283. hdiffpatch/_c_src/tamp/espidf/private/copyutil.hpp +143 -0
  1284. hdiffpatch/_c_src/tamp/espidf/private/tamp_arch.hpp +70 -0
  1285. hdiffpatch/_c_src/tamp/espidf/private/tamp_search.hpp +831 -0
  1286. hdiffpatch/_c_src/tamp/mpy_bindings/bindings.c +293 -0
  1287. hdiffpatch/_c_src/tamp/mpy_bindings/bindings_common.py +16 -0
  1288. hdiffpatch/_c_src/tamp/mpy_bindings/bindings_compressor.py +56 -0
  1289. hdiffpatch/_c_src/tamp/mpy_bindings/bindings_decompressor.py +67 -0
  1290. hdiffpatch/_c_src/tamp/package-compressor.json +14 -0
  1291. hdiffpatch/_c_src/tamp/package-decompressor.json +14 -0
  1292. hdiffpatch/_c_src/tamp/package.json +18 -0
  1293. hdiffpatch/_c_src/tamp/poetry.lock +3348 -0
  1294. hdiffpatch/_c_src/tamp/pyproject.toml +249 -0
  1295. hdiffpatch/_c_src/tamp/tamp/__init__.py +87 -0
  1296. hdiffpatch/_c_src/tamp/tamp/__init__.pyi +57 -0
  1297. hdiffpatch/_c_src/tamp/tamp/__main__.py +3 -0
  1298. hdiffpatch/_c_src/tamp/tamp/_c_common.pxd +4 -0
  1299. hdiffpatch/_c_src/tamp/tamp/_c_common.pyx +15 -0
  1300. hdiffpatch/_c_src/tamp/tamp/_c_compressor.pyx +151 -0
  1301. hdiffpatch/_c_src/tamp/tamp/_c_decompressor.pyx +147 -0
  1302. hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/common.c +29 -0
  1303. hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/common.h +102 -0
  1304. hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/compressor.c +299 -0
  1305. hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/compressor.h +240 -0
  1306. hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/decompressor.c +233 -0
  1307. hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/decompressor.h +106 -0
  1308. hdiffpatch/_c_src/tamp/tamp/cli/__init__.py +0 -0
  1309. hdiffpatch/_c_src/tamp/tamp/cli/main.py +89 -0
  1310. hdiffpatch/_c_src/tamp/tamp/compressor.py +327 -0
  1311. hdiffpatch/_c_src/tamp/tamp/compressor_viper.py +225 -0
  1312. hdiffpatch/_c_src/tamp/tamp/ctamp.pxd +89 -0
  1313. hdiffpatch/_c_src/tamp/tamp/decompressor.py +336 -0
  1314. hdiffpatch/_c_src/tamp/tamp/decompressor_viper.py +220 -0
  1315. hdiffpatch/_c_src/tamp/tamp/py.typed +0 -0
  1316. hdiffpatch/_c_src/tamp/tests/test_bit_writer_reader.py +59 -0
  1317. hdiffpatch/_c_src/tamp/tests/test_cli.py +78 -0
  1318. hdiffpatch/_c_src/tamp/tests/test_compressor.py +304 -0
  1319. hdiffpatch/_c_src/tamp/tests/test_compressor_decompressor.py +128 -0
  1320. hdiffpatch/_c_src/tamp/tests/test_compressor_helpers.py +19 -0
  1321. hdiffpatch/_c_src/tamp/tests/test_decompressor.py +219 -0
  1322. hdiffpatch/_c_src/tamp/tests/test_file_interface.py +84 -0
  1323. hdiffpatch/_c_src/tamp/tests/test_pseudorandom.py +59 -0
  1324. hdiffpatch/_c_src/tamp/tools/analysis.py +116 -0
  1325. hdiffpatch/_c_src/tamp/tools/c-profiler/.gitignore +1 -0
  1326. hdiffpatch/_c_src/tamp/tools/c-profiler/Makefile +55 -0
  1327. hdiffpatch/_c_src/tamp/tools/c-profiler/main.c +128 -0
  1328. hdiffpatch/_c_src/tamp/tools/collect-data.py +74 -0
  1329. hdiffpatch/_c_src/tamp/tools/compute_min_output_flush_size.py +39 -0
  1330. hdiffpatch/_c_src/tamp/tools/find_seed.py +140 -0
  1331. hdiffpatch/_c_src/tamp/tools/huffman.py +52 -0
  1332. hdiffpatch/_c_src/tamp/tools/huffman_jump_table.py +47 -0
  1333. hdiffpatch/_c_src/tamp/tools/micropython-compression-benchmark.py +19 -0
  1334. hdiffpatch/_c_src/tamp/tools/on-device-compression-benchmark.py +27 -0
  1335. hdiffpatch/_c_src/tamp/tools/on-device-decompression-benchmark.py +27 -0
  1336. hdiffpatch/_c_src/tamp/tools/performance-benchmark.sh +13 -0
  1337. hdiffpatch/_c_src/tamp/tools/pi_pico/.gitignore +4 -0
  1338. hdiffpatch/_c_src/tamp/tools/pi_pico/benchmark/CMakeLists.txt +60 -0
  1339. hdiffpatch/_c_src/tamp/tools/pi_pico/benchmark/Makefile +12 -0
  1340. hdiffpatch/_c_src/tamp/tools/pi_pico/benchmark/main.c +67 -0
  1341. hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/.gitignore +3 -0
  1342. hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/CMakeLists.txt +43 -0
  1343. hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/Makefile +45 -0
  1344. hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/README.md +3 -0
  1345. hdiffpatch/_c_src/tamp/tools/profiler.py +15 -0
  1346. hdiffpatch/_c_src/tamp/tools/zlib_compress.py +20 -0
  1347. hdiffpatch/_c_src/tamp/tools/zlib_decompress.py +11 -0
  1348. hdiffpatch/_c_src/tamp_compress_plugin.cpp +328 -0
  1349. hdiffpatch/_c_src/zlib/.git +1 -0
  1350. hdiffpatch/_c_src/zlib/.github/workflows/cmake.yml +89 -0
  1351. hdiffpatch/_c_src/zlib/.github/workflows/configure.yml +136 -0
  1352. hdiffpatch/_c_src/zlib/.github/workflows/fuzz.yml +25 -0
  1353. hdiffpatch/_c_src/zlib/.gitignore +36 -0
  1354. hdiffpatch/_c_src/zlib/CMakeLists.txt +218 -0
  1355. hdiffpatch/_c_src/zlib/ChangeLog +1618 -0
  1356. hdiffpatch/_c_src/zlib/FAQ +367 -0
  1357. hdiffpatch/_c_src/zlib/INDEX +68 -0
  1358. hdiffpatch/_c_src/zlib/LICENSE +22 -0
  1359. hdiffpatch/_c_src/zlib/Makefile +5 -0
  1360. hdiffpatch/_c_src/zlib/Makefile.in +410 -0
  1361. hdiffpatch/_c_src/zlib/README +117 -0
  1362. hdiffpatch/_c_src/zlib/adler32.c +164 -0
  1363. hdiffpatch/_c_src/zlib/amiga/Makefile.pup +69 -0
  1364. hdiffpatch/_c_src/zlib/amiga/Makefile.sas +68 -0
  1365. hdiffpatch/_c_src/zlib/compress.c +75 -0
  1366. hdiffpatch/_c_src/zlib/configure +929 -0
  1367. hdiffpatch/_c_src/zlib/contrib/README.contrib +57 -0
  1368. hdiffpatch/_c_src/zlib/contrib/ada/buffer_demo.adb +106 -0
  1369. hdiffpatch/_c_src/zlib/contrib/ada/mtest.adb +156 -0
  1370. hdiffpatch/_c_src/zlib/contrib/ada/read.adb +156 -0
  1371. hdiffpatch/_c_src/zlib/contrib/ada/readme.txt +65 -0
  1372. hdiffpatch/_c_src/zlib/contrib/ada/test.adb +463 -0
  1373. hdiffpatch/_c_src/zlib/contrib/ada/zlib-streams.adb +225 -0
  1374. hdiffpatch/_c_src/zlib/contrib/ada/zlib-streams.ads +114 -0
  1375. hdiffpatch/_c_src/zlib/contrib/ada/zlib-thin.adb +141 -0
  1376. hdiffpatch/_c_src/zlib/contrib/ada/zlib-thin.ads +450 -0
  1377. hdiffpatch/_c_src/zlib/contrib/ada/zlib.adb +701 -0
  1378. hdiffpatch/_c_src/zlib/contrib/ada/zlib.ads +328 -0
  1379. hdiffpatch/_c_src/zlib/contrib/ada/zlib.gpr +20 -0
  1380. hdiffpatch/_c_src/zlib/contrib/blast/Makefile +8 -0
  1381. hdiffpatch/_c_src/zlib/contrib/blast/README +4 -0
  1382. hdiffpatch/_c_src/zlib/contrib/blast/blast.c +466 -0
  1383. hdiffpatch/_c_src/zlib/contrib/blast/blast.h +83 -0
  1384. hdiffpatch/_c_src/zlib/contrib/blast/test.pk +0 -0
  1385. hdiffpatch/_c_src/zlib/contrib/blast/test.txt +1 -0
  1386. hdiffpatch/_c_src/zlib/contrib/delphi/ZLib.pas +557 -0
  1387. hdiffpatch/_c_src/zlib/contrib/delphi/ZLibConst.pas +11 -0
  1388. hdiffpatch/_c_src/zlib/contrib/delphi/readme.txt +76 -0
  1389. hdiffpatch/_c_src/zlib/contrib/delphi/zlibd32.mak +99 -0
  1390. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
  1391. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
  1392. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
  1393. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
  1394. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
  1395. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
  1396. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
  1397. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
  1398. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
  1399. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
  1400. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib.build +33 -0
  1401. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib.chm +0 -0
  1402. hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib.sln +21 -0
  1403. hdiffpatch/_c_src/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  1404. hdiffpatch/_c_src/zlib/contrib/dotzlib/readme.txt +58 -0
  1405. hdiffpatch/_c_src/zlib/contrib/gcc_gvmat64/gvmat64.S +574 -0
  1406. hdiffpatch/_c_src/zlib/contrib/infback9/README +1 -0
  1407. hdiffpatch/_c_src/zlib/contrib/infback9/infback9.c +603 -0
  1408. hdiffpatch/_c_src/zlib/contrib/infback9/infback9.h +37 -0
  1409. hdiffpatch/_c_src/zlib/contrib/infback9/inffix9.h +107 -0
  1410. hdiffpatch/_c_src/zlib/contrib/infback9/inflate9.h +47 -0
  1411. hdiffpatch/_c_src/zlib/contrib/infback9/inftree9.c +319 -0
  1412. hdiffpatch/_c_src/zlib/contrib/infback9/inftree9.h +61 -0
  1413. hdiffpatch/_c_src/zlib/contrib/iostream/test.cpp +24 -0
  1414. hdiffpatch/_c_src/zlib/contrib/iostream/zfstream.cpp +329 -0
  1415. hdiffpatch/_c_src/zlib/contrib/iostream/zfstream.h +128 -0
  1416. hdiffpatch/_c_src/zlib/contrib/iostream2/zstream.h +307 -0
  1417. hdiffpatch/_c_src/zlib/contrib/iostream2/zstream_test.cpp +25 -0
  1418. hdiffpatch/_c_src/zlib/contrib/iostream3/README +35 -0
  1419. hdiffpatch/_c_src/zlib/contrib/iostream3/TODO +17 -0
  1420. hdiffpatch/_c_src/zlib/contrib/iostream3/test.cc +50 -0
  1421. hdiffpatch/_c_src/zlib/contrib/iostream3/zfstream.cc +479 -0
  1422. hdiffpatch/_c_src/zlib/contrib/iostream3/zfstream.h +466 -0
  1423. hdiffpatch/_c_src/zlib/contrib/minizip/Makefile +29 -0
  1424. hdiffpatch/_c_src/zlib/contrib/minizip/Makefile.am +45 -0
  1425. hdiffpatch/_c_src/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
  1426. hdiffpatch/_c_src/zlib/contrib/minizip/MiniZip64_info.txt +74 -0
  1427. hdiffpatch/_c_src/zlib/contrib/minizip/configure.ac +32 -0
  1428. hdiffpatch/_c_src/zlib/contrib/minizip/crypt.h +128 -0
  1429. hdiffpatch/_c_src/zlib/contrib/minizip/ioapi.c +231 -0
  1430. hdiffpatch/_c_src/zlib/contrib/minizip/ioapi.h +210 -0
  1431. hdiffpatch/_c_src/zlib/contrib/minizip/iowin32.c +440 -0
  1432. hdiffpatch/_c_src/zlib/contrib/minizip/iowin32.h +28 -0
  1433. hdiffpatch/_c_src/zlib/contrib/minizip/make_vms.com +25 -0
  1434. hdiffpatch/_c_src/zlib/contrib/minizip/miniunz.c +647 -0
  1435. hdiffpatch/_c_src/zlib/contrib/minizip/miniunzip.1 +63 -0
  1436. hdiffpatch/_c_src/zlib/contrib/minizip/minizip.1 +46 -0
  1437. hdiffpatch/_c_src/zlib/contrib/minizip/minizip.c +509 -0
  1438. hdiffpatch/_c_src/zlib/contrib/minizip/minizip.pc.in +12 -0
  1439. hdiffpatch/_c_src/zlib/contrib/minizip/mztools.c +285 -0
  1440. hdiffpatch/_c_src/zlib/contrib/minizip/mztools.h +37 -0
  1441. hdiffpatch/_c_src/zlib/contrib/minizip/unzip.c +1985 -0
  1442. hdiffpatch/_c_src/zlib/contrib/minizip/unzip.h +437 -0
  1443. hdiffpatch/_c_src/zlib/contrib/minizip/zip.c +1956 -0
  1444. hdiffpatch/_c_src/zlib/contrib/minizip/zip.h +364 -0
  1445. hdiffpatch/_c_src/zlib/contrib/nuget/nuget.csproj +43 -0
  1446. hdiffpatch/_c_src/zlib/contrib/nuget/nuget.sln +22 -0
  1447. hdiffpatch/_c_src/zlib/contrib/pascal/example.pas +599 -0
  1448. hdiffpatch/_c_src/zlib/contrib/pascal/readme.txt +76 -0
  1449. hdiffpatch/_c_src/zlib/contrib/pascal/zlibd32.mak +99 -0
  1450. hdiffpatch/_c_src/zlib/contrib/pascal/zlibpas.pas +276 -0
  1451. hdiffpatch/_c_src/zlib/contrib/puff/Makefile +42 -0
  1452. hdiffpatch/_c_src/zlib/contrib/puff/README +63 -0
  1453. hdiffpatch/_c_src/zlib/contrib/puff/puff.c +840 -0
  1454. hdiffpatch/_c_src/zlib/contrib/puff/puff.h +35 -0
  1455. hdiffpatch/_c_src/zlib/contrib/puff/pufftest.c +165 -0
  1456. hdiffpatch/_c_src/zlib/contrib/puff/zeros.raw +0 -0
  1457. hdiffpatch/_c_src/zlib/contrib/testzlib/testzlib.c +275 -0
  1458. hdiffpatch/_c_src/zlib/contrib/testzlib/testzlib.txt +10 -0
  1459. hdiffpatch/_c_src/zlib/contrib/untgz/Makefile +14 -0
  1460. hdiffpatch/_c_src/zlib/contrib/untgz/Makefile.msc +17 -0
  1461. hdiffpatch/_c_src/zlib/contrib/untgz/untgz.c +667 -0
  1462. hdiffpatch/_c_src/zlib/contrib/vstudio/readme.txt +81 -0
  1463. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/miniunz.vcxproj +310 -0
  1464. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters +22 -0
  1465. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/minizip.vcxproj +307 -0
  1466. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters +22 -0
  1467. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlib.vcxproj +412 -0
  1468. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters +55 -0
  1469. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj +310 -0
  1470. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +22 -0
  1471. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlib.rc +32 -0
  1472. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibstat.vcxproj +449 -0
  1473. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters +74 -0
  1474. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.def +158 -0
  1475. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.sln +135 -0
  1476. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.vcxproj +633 -0
  1477. hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters +115 -0
  1478. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/miniunz.vcxproj +314 -0
  1479. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/minizip.vcxproj +311 -0
  1480. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/testzlib.vcxproj +418 -0
  1481. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj +314 -0
  1482. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlib.rc +32 -0
  1483. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibstat.vcxproj +456 -0
  1484. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibvc.def +158 -0
  1485. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibvc.sln +117 -0
  1486. hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibvc.vcxproj +664 -0
  1487. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/miniunz.vcxproj +316 -0
  1488. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/minizip.vcxproj +313 -0
  1489. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/testzlib.vcxproj +422 -0
  1490. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj +316 -0
  1491. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlib.rc +32 -0
  1492. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibstat.vcxproj +459 -0
  1493. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibvc.def +158 -0
  1494. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibvc.sln +119 -0
  1495. hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibvc.vcxproj +668 -0
  1496. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/miniunz.vcxproj +316 -0
  1497. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/minizip.vcxproj +313 -0
  1498. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/testzlib.vcxproj +422 -0
  1499. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj +316 -0
  1500. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlib.rc +32 -0
  1501. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibstat.vcxproj +459 -0
  1502. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibvc.def +158 -0
  1503. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibvc.sln +119 -0
  1504. hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibvc.vcxproj +668 -0
  1505. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/miniunz.vcxproj +409 -0
  1506. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/minizip.vcxproj +405 -0
  1507. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/testzlib.vcxproj +473 -0
  1508. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj +409 -0
  1509. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlib.rc +32 -0
  1510. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibstat.vcxproj +602 -0
  1511. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibvc.def +158 -0
  1512. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibvc.sln +179 -0
  1513. hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibvc.vcxproj +875 -0
  1514. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/miniunz.vcproj +565 -0
  1515. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/minizip.vcproj +562 -0
  1516. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/testzlib.vcproj +796 -0
  1517. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/testzlibdll.vcproj +565 -0
  1518. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlib.rc +32 -0
  1519. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibstat.vcproj +781 -0
  1520. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibvc.def +158 -0
  1521. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibvc.sln +144 -0
  1522. hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibvc.vcproj +1100 -0
  1523. hdiffpatch/_c_src/zlib/crc32.c +1049 -0
  1524. hdiffpatch/_c_src/zlib/crc32.h +9446 -0
  1525. hdiffpatch/_c_src/zlib/deflate.c +2159 -0
  1526. hdiffpatch/_c_src/zlib/deflate.h +377 -0
  1527. hdiffpatch/_c_src/zlib/doc/algorithm.txt +209 -0
  1528. hdiffpatch/_c_src/zlib/doc/crc-doc.1.0.pdf +0 -0
  1529. hdiffpatch/_c_src/zlib/doc/rfc1950.txt +619 -0
  1530. hdiffpatch/_c_src/zlib/doc/rfc1951.txt +955 -0
  1531. hdiffpatch/_c_src/zlib/doc/rfc1952.txt +675 -0
  1532. hdiffpatch/_c_src/zlib/doc/txtvsbin.txt +107 -0
  1533. hdiffpatch/_c_src/zlib/examples/README.examples +54 -0
  1534. hdiffpatch/_c_src/zlib/examples/enough.c +597 -0
  1535. hdiffpatch/_c_src/zlib/examples/fitblk.c +233 -0
  1536. hdiffpatch/_c_src/zlib/examples/gun.c +702 -0
  1537. hdiffpatch/_c_src/zlib/examples/gzappend.c +504 -0
  1538. hdiffpatch/_c_src/zlib/examples/gzjoin.c +449 -0
  1539. hdiffpatch/_c_src/zlib/examples/gzlog.c +1061 -0
  1540. hdiffpatch/_c_src/zlib/examples/gzlog.h +91 -0
  1541. hdiffpatch/_c_src/zlib/examples/gznorm.c +470 -0
  1542. hdiffpatch/_c_src/zlib/examples/zlib_how.html +549 -0
  1543. hdiffpatch/_c_src/zlib/examples/zpipe.c +205 -0
  1544. hdiffpatch/_c_src/zlib/examples/zran.c +533 -0
  1545. hdiffpatch/_c_src/zlib/examples/zran.h +51 -0
  1546. hdiffpatch/_c_src/zlib/gzclose.c +23 -0
  1547. hdiffpatch/_c_src/zlib/gzguts.h +214 -0
  1548. hdiffpatch/_c_src/zlib/gzlib.c +582 -0
  1549. hdiffpatch/_c_src/zlib/gzread.c +602 -0
  1550. hdiffpatch/_c_src/zlib/gzwrite.c +631 -0
  1551. hdiffpatch/_c_src/zlib/infback.c +628 -0
  1552. hdiffpatch/_c_src/zlib/inffast.c +320 -0
  1553. hdiffpatch/_c_src/zlib/inffast.h +11 -0
  1554. hdiffpatch/_c_src/zlib/inffixed.h +94 -0
  1555. hdiffpatch/_c_src/zlib/inflate.c +1546 -0
  1556. hdiffpatch/_c_src/zlib/inflate.h +126 -0
  1557. hdiffpatch/_c_src/zlib/inftrees.c +299 -0
  1558. hdiffpatch/_c_src/zlib/inftrees.h +62 -0
  1559. hdiffpatch/_c_src/zlib/make_vms.com +867 -0
  1560. hdiffpatch/_c_src/zlib/msdos/Makefile.bor +115 -0
  1561. hdiffpatch/_c_src/zlib/msdos/Makefile.dj2 +104 -0
  1562. hdiffpatch/_c_src/zlib/msdos/Makefile.emx +69 -0
  1563. hdiffpatch/_c_src/zlib/msdos/Makefile.msc +112 -0
  1564. hdiffpatch/_c_src/zlib/msdos/Makefile.tc +100 -0
  1565. hdiffpatch/_c_src/zlib/nintendods/Makefile +126 -0
  1566. hdiffpatch/_c_src/zlib/nintendods/README +5 -0
  1567. hdiffpatch/_c_src/zlib/old/Makefile.emx +69 -0
  1568. hdiffpatch/_c_src/zlib/old/Makefile.riscos +151 -0
  1569. hdiffpatch/_c_src/zlib/old/README +3 -0
  1570. hdiffpatch/_c_src/zlib/old/descrip.mms +48 -0
  1571. hdiffpatch/_c_src/zlib/old/os2/Makefile.os2 +136 -0
  1572. hdiffpatch/_c_src/zlib/old/os2/zlib.def +51 -0
  1573. hdiffpatch/_c_src/zlib/old/visual-basic.txt +160 -0
  1574. hdiffpatch/_c_src/zlib/os400/README400 +48 -0
  1575. hdiffpatch/_c_src/zlib/os400/bndsrc +127 -0
  1576. hdiffpatch/_c_src/zlib/os400/make.sh +366 -0
  1577. hdiffpatch/_c_src/zlib/os400/zlib.inc +527 -0
  1578. hdiffpatch/_c_src/zlib/qnx/package.qpg +141 -0
  1579. hdiffpatch/_c_src/zlib/test/example.c +546 -0
  1580. hdiffpatch/_c_src/zlib/test/infcover.c +672 -0
  1581. hdiffpatch/_c_src/zlib/test/minigzip.c +579 -0
  1582. hdiffpatch/_c_src/zlib/treebuild.xml +116 -0
  1583. hdiffpatch/_c_src/zlib/trees.c +1117 -0
  1584. hdiffpatch/_c_src/zlib/trees.h +128 -0
  1585. hdiffpatch/_c_src/zlib/uncompr.c +85 -0
  1586. hdiffpatch/_c_src/zlib/watcom/watcom_f.mak +43 -0
  1587. hdiffpatch/_c_src/zlib/watcom/watcom_l.mak +43 -0
  1588. hdiffpatch/_c_src/zlib/win32/DLL_FAQ.txt +381 -0
  1589. hdiffpatch/_c_src/zlib/win32/Makefile.bor +109 -0
  1590. hdiffpatch/_c_src/zlib/win32/Makefile.gcc +177 -0
  1591. hdiffpatch/_c_src/zlib/win32/Makefile.msc +159 -0
  1592. hdiffpatch/_c_src/zlib/win32/README-WIN32.txt +103 -0
  1593. hdiffpatch/_c_src/zlib/win32/VisualC.txt +3 -0
  1594. hdiffpatch/_c_src/zlib/win32/zlib.def +97 -0
  1595. hdiffpatch/_c_src/zlib/win32/zlib1.rc +40 -0
  1596. hdiffpatch/_c_src/zlib/zconf.h +543 -0
  1597. hdiffpatch/_c_src/zlib/zconf.h.cmakein +545 -0
  1598. hdiffpatch/_c_src/zlib/zconf.h.in +543 -0
  1599. hdiffpatch/_c_src/zlib/zlib.3 +149 -0
  1600. hdiffpatch/_c_src/zlib/zlib.3.pdf +0 -0
  1601. hdiffpatch/_c_src/zlib/zlib.h +1945 -0
  1602. hdiffpatch/_c_src/zlib/zlib.map +100 -0
  1603. hdiffpatch/_c_src/zlib/zlib.pc.cmakein +13 -0
  1604. hdiffpatch/_c_src/zlib/zlib.pc.in +13 -0
  1605. hdiffpatch/_c_src/zlib/zutil.c +299 -0
  1606. hdiffpatch/_c_src/zlib/zutil.h +254 -0
  1607. hdiffpatch/_c_src/zstd/.buckconfig +9 -0
  1608. hdiffpatch/_c_src/zstd/.buckversion +1 -0
  1609. hdiffpatch/_c_src/zstd/.cirrus.yml +9 -0
  1610. hdiffpatch/_c_src/zstd/.git +1 -0
  1611. hdiffpatch/_c_src/zstd/.gitattributes +21 -0
  1612. hdiffpatch/_c_src/zstd/.github/ISSUE_TEMPLATE/bug_report.md +35 -0
  1613. hdiffpatch/_c_src/zstd/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  1614. hdiffpatch/_c_src/zstd/.github/dependabot.yml +6 -0
  1615. hdiffpatch/_c_src/zstd/.github/workflows/android-ndk-build.yml +39 -0
  1616. hdiffpatch/_c_src/zstd/.github/workflows/commit.yml +104 -0
  1617. hdiffpatch/_c_src/zstd/.github/workflows/dev-long-tests.yml +313 -0
  1618. hdiffpatch/_c_src/zstd/.github/workflows/dev-short-tests.yml +725 -0
  1619. hdiffpatch/_c_src/zstd/.github/workflows/nightly.yml +38 -0
  1620. hdiffpatch/_c_src/zstd/.github/workflows/publish-release-artifacts.yml +73 -0
  1621. hdiffpatch/_c_src/zstd/.github/workflows/scorecards.yml +64 -0
  1622. hdiffpatch/_c_src/zstd/.github/workflows/windows-artifacts.yml +58 -0
  1623. hdiffpatch/_c_src/zstd/.gitignore +63 -0
  1624. hdiffpatch/_c_src/zstd/CHANGELOG +863 -0
  1625. hdiffpatch/_c_src/zstd/CODE_OF_CONDUCT.md +5 -0
  1626. hdiffpatch/_c_src/zstd/CONTRIBUTING.md +489 -0
  1627. hdiffpatch/_c_src/zstd/COPYING +339 -0
  1628. hdiffpatch/_c_src/zstd/LICENSE +30 -0
  1629. hdiffpatch/_c_src/zstd/Makefile +471 -0
  1630. hdiffpatch/_c_src/zstd/Package.swift +36 -0
  1631. hdiffpatch/_c_src/zstd/README.md +237 -0
  1632. hdiffpatch/_c_src/zstd/SECURITY.md +15 -0
  1633. hdiffpatch/_c_src/zstd/TESTING.md +43 -0
  1634. hdiffpatch/_c_src/zstd/build/.gitignore +33 -0
  1635. hdiffpatch/_c_src/zstd/build/LICENSE +0 -0
  1636. hdiffpatch/_c_src/zstd/build/README.md +56 -0
  1637. hdiffpatch/_c_src/zstd/build/VS2008/fullbench/fullbench.vcproj +549 -0
  1638. hdiffpatch/_c_src/zstd/build/VS2008/fuzzer/fuzzer.vcproj +585 -0
  1639. hdiffpatch/_c_src/zstd/build/VS2008/zstd/zstd.vcproj +677 -0
  1640. hdiffpatch/_c_src/zstd/build/VS2008/zstd.sln +56 -0
  1641. hdiffpatch/_c_src/zstd/build/VS2008/zstdlib/zstdlib.vcproj +635 -0
  1642. hdiffpatch/_c_src/zstd/build/VS2010/CompileAsCpp.props +8 -0
  1643. hdiffpatch/_c_src/zstd/build/VS2010/datagen/datagen.vcxproj +170 -0
  1644. hdiffpatch/_c_src/zstd/build/VS2010/fullbench/fullbench.vcxproj +220 -0
  1645. hdiffpatch/_c_src/zstd/build/VS2010/fuzzer/fuzzer.vcxproj +224 -0
  1646. hdiffpatch/_c_src/zstd/build/VS2010/libzstd/libzstd.vcxproj +243 -0
  1647. hdiffpatch/_c_src/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc +51 -0
  1648. hdiffpatch/_c_src/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj +250 -0
  1649. hdiffpatch/_c_src/zstd/build/VS2010/zstd/zstd.rc +51 -0
  1650. hdiffpatch/_c_src/zstd/build/VS2010/zstd/zstd.vcxproj +266 -0
  1651. hdiffpatch/_c_src/zstd/build/VS2010/zstd.sln +84 -0
  1652. hdiffpatch/_c_src/zstd/build/VS_scripts/README.md +64 -0
  1653. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2010.cmd +7 -0
  1654. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2012.cmd +6 -0
  1655. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2013.cmd +7 -0
  1656. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2015.cmd +7 -0
  1657. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017.cmd +7 -0
  1658. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017Community.cmd +7 -0
  1659. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017Enterprise.cmd +7 -0
  1660. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017Professional.cmd +7 -0
  1661. hdiffpatch/_c_src/zstd/build/VS_scripts/build.VSPreview.cmd +7 -0
  1662. hdiffpatch/_c_src/zstd/build/VS_scripts/build.generic.cmd +67 -0
  1663. hdiffpatch/_c_src/zstd/build/cmake/.gitignore +10 -0
  1664. hdiffpatch/_c_src/zstd/build/cmake/CMakeLists.txt +228 -0
  1665. hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +136 -0
  1666. hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake +49 -0
  1667. hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake +10 -0
  1668. hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/JoinPaths.cmake +23 -0
  1669. hdiffpatch/_c_src/zstd/build/cmake/README.md +146 -0
  1670. hdiffpatch/_c_src/zstd/build/cmake/contrib/CMakeLists.txt +13 -0
  1671. hdiffpatch/_c_src/zstd/build/cmake/contrib/gen_html/CMakeLists.txt +30 -0
  1672. hdiffpatch/_c_src/zstd/build/cmake/contrib/pzstd/CMakeLists.txt +39 -0
  1673. hdiffpatch/_c_src/zstd/build/cmake/lib/.gitignore +2 -0
  1674. hdiffpatch/_c_src/zstd/build/cmake/lib/CMakeLists.txt +295 -0
  1675. hdiffpatch/_c_src/zstd/build/cmake/lib/cmake_uninstall.cmake.in +22 -0
  1676. hdiffpatch/_c_src/zstd/build/cmake/programs/.gitignore +5 -0
  1677. hdiffpatch/_c_src/zstd/build/cmake/programs/CMakeLists.txt +144 -0
  1678. hdiffpatch/_c_src/zstd/build/cmake/tests/.gitignore +6 -0
  1679. hdiffpatch/_c_src/zstd/build/cmake/tests/CMakeLists.txt +118 -0
  1680. hdiffpatch/_c_src/zstd/build/cmake/zstdConfig.cmake.in +10 -0
  1681. hdiffpatch/_c_src/zstd/build/meson/GetZstdLibraryVersion.py +39 -0
  1682. hdiffpatch/_c_src/zstd/build/meson/InstallSymlink.py +55 -0
  1683. hdiffpatch/_c_src/zstd/build/meson/README.md +38 -0
  1684. hdiffpatch/_c_src/zstd/build/meson/contrib/gen_html/meson.build +30 -0
  1685. hdiffpatch/_c_src/zstd/build/meson/contrib/meson.build +12 -0
  1686. hdiffpatch/_c_src/zstd/build/meson/contrib/pzstd/meson.build +25 -0
  1687. hdiffpatch/_c_src/zstd/build/meson/lib/meson.build +171 -0
  1688. hdiffpatch/_c_src/zstd/build/meson/meson.build +156 -0
  1689. hdiffpatch/_c_src/zstd/build/meson/meson_options.txt +36 -0
  1690. hdiffpatch/_c_src/zstd/build/meson/programs/meson.build +124 -0
  1691. hdiffpatch/_c_src/zstd/build/meson/tests/meson.build +217 -0
  1692. hdiffpatch/_c_src/zstd/build/meson/tests/valgrindTest.py +90 -0
  1693. hdiffpatch/_c_src/zstd/build/single_file_libs/.gitignore +10 -0
  1694. hdiffpatch/_c_src/zstd/build/single_file_libs/README.md +33 -0
  1695. hdiffpatch/_c_src/zstd/build/single_file_libs/build_decoder_test.sh +91 -0
  1696. hdiffpatch/_c_src/zstd/build/single_file_libs/build_library_test.sh +98 -0
  1697. hdiffpatch/_c_src/zstd/build/single_file_libs/combine.py +234 -0
  1698. hdiffpatch/_c_src/zstd/build/single_file_libs/combine.sh +249 -0
  1699. hdiffpatch/_c_src/zstd/build/single_file_libs/create_single_file_decoder.sh +19 -0
  1700. hdiffpatch/_c_src/zstd/build/single_file_libs/create_single_file_library.sh +19 -0
  1701. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/README.md +11 -0
  1702. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/emscripten.c +340 -0
  1703. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/roundtrip.c +83 -0
  1704. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/shell.html +31 -0
  1705. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/simple.c +75 -0
  1706. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/testcard-dxt1.inl +2731 -0
  1707. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/testcard-zstd.inl +261 -0
  1708. hdiffpatch/_c_src/zstd/build/single_file_libs/examples/testcard.png +0 -0
  1709. hdiffpatch/_c_src/zstd/build/single_file_libs/zstd-in.c +91 -0
  1710. hdiffpatch/_c_src/zstd/build/single_file_libs/zstddeclib-in.c +62 -0
  1711. hdiffpatch/_c_src/zstd/contrib/VS2005/README.md +3 -0
  1712. hdiffpatch/_c_src/zstd/contrib/VS2005/fullbench/fullbench.vcproj +440 -0
  1713. hdiffpatch/_c_src/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj +488 -0
  1714. hdiffpatch/_c_src/zstd/contrib/VS2005/zstd/zstd.vcproj +552 -0
  1715. hdiffpatch/_c_src/zstd/contrib/VS2005/zstd.sln +55 -0
  1716. hdiffpatch/_c_src/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj +546 -0
  1717. hdiffpatch/_c_src/zstd/contrib/cleanTabs +2 -0
  1718. hdiffpatch/_c_src/zstd/contrib/diagnose_corruption/.gitignore +1 -0
  1719. hdiffpatch/_c_src/zstd/contrib/diagnose_corruption/Makefile +35 -0
  1720. hdiffpatch/_c_src/zstd/contrib/diagnose_corruption/check_flipped_bits.c +400 -0
  1721. hdiffpatch/_c_src/zstd/contrib/docker/Dockerfile +20 -0
  1722. hdiffpatch/_c_src/zstd/contrib/docker/README.md +20 -0
  1723. hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/.gitignore +2 -0
  1724. hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/Makefile +40 -0
  1725. hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/README.md +14 -0
  1726. hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/main.c +107 -0
  1727. hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/sequence_producer.c +80 -0
  1728. hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/sequence_producer.h +26 -0
  1729. hdiffpatch/_c_src/zstd/contrib/freestanding_lib/freestanding.py +774 -0
  1730. hdiffpatch/_c_src/zstd/contrib/gen_html/.gitignore +3 -0
  1731. hdiffpatch/_c_src/zstd/contrib/gen_html/Makefile +51 -0
  1732. hdiffpatch/_c_src/zstd/contrib/gen_html/README.md +31 -0
  1733. hdiffpatch/_c_src/zstd/contrib/gen_html/gen-zstd-manual.sh +9 -0
  1734. hdiffpatch/_c_src/zstd/contrib/gen_html/gen_html.cpp +225 -0
  1735. hdiffpatch/_c_src/zstd/contrib/largeNbDicts/.gitignore +2 -0
  1736. hdiffpatch/_c_src/zstd/contrib/largeNbDicts/Makefile +58 -0
  1737. hdiffpatch/_c_src/zstd/contrib/largeNbDicts/README.md +33 -0
  1738. hdiffpatch/_c_src/zstd/contrib/largeNbDicts/largeNbDicts.c +1085 -0
  1739. hdiffpatch/_c_src/zstd/contrib/linux-kernel/.gitignore +4 -0
  1740. hdiffpatch/_c_src/zstd/contrib/linux-kernel/Makefile +108 -0
  1741. hdiffpatch/_c_src/zstd/contrib/linux-kernel/README.md +14 -0
  1742. hdiffpatch/_c_src/zstd/contrib/linux-kernel/btrfs-benchmark.sh +104 -0
  1743. hdiffpatch/_c_src/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh +99 -0
  1744. hdiffpatch/_c_src/zstd/contrib/linux-kernel/decompress_sources.h +34 -0
  1745. hdiffpatch/_c_src/zstd/contrib/linux-kernel/linux.mk +44 -0
  1746. hdiffpatch/_c_src/zstd/contrib/linux-kernel/linux_zstd.h +525 -0
  1747. hdiffpatch/_c_src/zstd/contrib/linux-kernel/mem.h +262 -0
  1748. hdiffpatch/_c_src/zstd/contrib/linux-kernel/squashfs-benchmark.sh +39 -0
  1749. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/Makefile +49 -0
  1750. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/compiler.h +23 -0
  1751. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/errno.h +15 -0
  1752. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/kernel.h +19 -0
  1753. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/limits.h +15 -0
  1754. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/math64.h +15 -0
  1755. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/module.h +20 -0
  1756. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/printk.h +15 -0
  1757. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/stddef.h +15 -0
  1758. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/swab.h +16 -0
  1759. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/types.h +16 -0
  1760. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/unaligned.h +187 -0
  1761. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/xxhash.h +745 -0
  1762. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/macro-test.sh +44 -0
  1763. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/static_test.c +52 -0
  1764. hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/test.c +229 -0
  1765. hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_common_module.c +29 -0
  1766. hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_compress_module.c +237 -0
  1767. hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_decompress_module.c +105 -0
  1768. hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_deps.h +121 -0
  1769. hdiffpatch/_c_src/zstd/contrib/match_finders/README.md +42 -0
  1770. hdiffpatch/_c_src/zstd/contrib/match_finders/zstd_edist.c +558 -0
  1771. hdiffpatch/_c_src/zstd/contrib/match_finders/zstd_edist.h +70 -0
  1772. hdiffpatch/_c_src/zstd/contrib/premake/premake4.lua +6 -0
  1773. hdiffpatch/_c_src/zstd/contrib/premake/zstd.lua +80 -0
  1774. hdiffpatch/_c_src/zstd/contrib/pzstd/.gitignore +2 -0
  1775. hdiffpatch/_c_src/zstd/contrib/pzstd/BUCK +72 -0
  1776. hdiffpatch/_c_src/zstd/contrib/pzstd/ErrorHolder.h +54 -0
  1777. hdiffpatch/_c_src/zstd/contrib/pzstd/Logging.h +72 -0
  1778. hdiffpatch/_c_src/zstd/contrib/pzstd/Makefile +265 -0
  1779. hdiffpatch/_c_src/zstd/contrib/pzstd/Options.cpp +424 -0
  1780. hdiffpatch/_c_src/zstd/contrib/pzstd/Options.h +71 -0
  1781. hdiffpatch/_c_src/zstd/contrib/pzstd/Pzstd.cpp +626 -0
  1782. hdiffpatch/_c_src/zstd/contrib/pzstd/Pzstd.h +153 -0
  1783. hdiffpatch/_c_src/zstd/contrib/pzstd/README.md +56 -0
  1784. hdiffpatch/_c_src/zstd/contrib/pzstd/SkippableFrame.cpp +30 -0
  1785. hdiffpatch/_c_src/zstd/contrib/pzstd/SkippableFrame.h +64 -0
  1786. hdiffpatch/_c_src/zstd/contrib/pzstd/images/Cspeed.png +0 -0
  1787. hdiffpatch/_c_src/zstd/contrib/pzstd/images/Dspeed.png +0 -0
  1788. hdiffpatch/_c_src/zstd/contrib/pzstd/main.cpp +27 -0
  1789. hdiffpatch/_c_src/zstd/contrib/pzstd/test/BUCK +37 -0
  1790. hdiffpatch/_c_src/zstd/contrib/pzstd/test/OptionsTest.cpp +536 -0
  1791. hdiffpatch/_c_src/zstd/contrib/pzstd/test/PzstdTest.cpp +147 -0
  1792. hdiffpatch/_c_src/zstd/contrib/pzstd/test/RoundTrip.h +86 -0
  1793. hdiffpatch/_c_src/zstd/contrib/pzstd/test/RoundTripTest.cpp +84 -0
  1794. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/BUCK +75 -0
  1795. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Buffer.h +99 -0
  1796. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/FileSystem.h +96 -0
  1797. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Likely.h +28 -0
  1798. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Portability.h +16 -0
  1799. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Range.h +133 -0
  1800. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/ResourcePool.h +96 -0
  1801. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/ScopeGuard.h +50 -0
  1802. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/ThreadPool.h +58 -0
  1803. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/WorkQueue.h +182 -0
  1804. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/BUCK +35 -0
  1805. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/BufferTest.cpp +89 -0
  1806. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/RangeTest.cpp +82 -0
  1807. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp +72 -0
  1808. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp +28 -0
  1809. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp +71 -0
  1810. hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp +282 -0
  1811. hdiffpatch/_c_src/zstd/contrib/recovery/Makefile +35 -0
  1812. hdiffpatch/_c_src/zstd/contrib/recovery/recover_directory.c +152 -0
  1813. hdiffpatch/_c_src/zstd/contrib/seekable_format/README.md +42 -0
  1814. hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/.gitignore +5 -0
  1815. hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/Makefile +53 -0
  1816. hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/parallel_compression.c +214 -0
  1817. hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/parallel_processing.c +194 -0
  1818. hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/seekable_compression.c +136 -0
  1819. hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/seekable_decompression.c +141 -0
  1820. hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c +147 -0
  1821. hdiffpatch/_c_src/zstd/contrib/seekable_format/tests/.gitignore +1 -0
  1822. hdiffpatch/_c_src/zstd/contrib/seekable_format/tests/Makefile +38 -0
  1823. hdiffpatch/_c_src/zstd/contrib/seekable_format/tests/seekable_tests.c +363 -0
  1824. hdiffpatch/_c_src/zstd/contrib/seekable_format/zstd_seekable.h +226 -0
  1825. hdiffpatch/_c_src/zstd/contrib/seekable_format/zstd_seekable_compression_format.md +116 -0
  1826. hdiffpatch/_c_src/zstd/contrib/seekable_format/zstdseek_compress.c +365 -0
  1827. hdiffpatch/_c_src/zstd/contrib/seekable_format/zstdseek_decompress.c +600 -0
  1828. hdiffpatch/_c_src/zstd/contrib/seqBench/Makefile +58 -0
  1829. hdiffpatch/_c_src/zstd/contrib/seqBench/seqBench.c +53 -0
  1830. hdiffpatch/_c_src/zstd/contrib/snap/snapcraft.yaml +28 -0
  1831. hdiffpatch/_c_src/zstd/doc/README.md +26 -0
  1832. hdiffpatch/_c_src/zstd/doc/decompressor_errata.md +148 -0
  1833. hdiffpatch/_c_src/zstd/doc/decompressor_permissive.md +80 -0
  1834. hdiffpatch/_c_src/zstd/doc/educational_decoder/.gitignore +2 -0
  1835. hdiffpatch/_c_src/zstd/doc/educational_decoder/Makefile +62 -0
  1836. hdiffpatch/_c_src/zstd/doc/educational_decoder/README.md +36 -0
  1837. hdiffpatch/_c_src/zstd/doc/educational_decoder/harness.c +119 -0
  1838. hdiffpatch/_c_src/zstd/doc/educational_decoder/zstd_decompress.c +2323 -0
  1839. hdiffpatch/_c_src/zstd/doc/educational_decoder/zstd_decompress.h +61 -0
  1840. hdiffpatch/_c_src/zstd/doc/images/CSpeed2.png +0 -0
  1841. hdiffpatch/_c_src/zstd/doc/images/DCspeed5.png +0 -0
  1842. hdiffpatch/_c_src/zstd/doc/images/DSpeed3.png +0 -0
  1843. hdiffpatch/_c_src/zstd/doc/images/cdict_v136.png +0 -0
  1844. hdiffpatch/_c_src/zstd/doc/images/dict-cr.png +0 -0
  1845. hdiffpatch/_c_src/zstd/doc/images/dict-cs.png +0 -0
  1846. hdiffpatch/_c_src/zstd/doc/images/dict-ds.png +0 -0
  1847. hdiffpatch/_c_src/zstd/doc/images/zstd_cdict_v1_3_5.png +0 -0
  1848. hdiffpatch/_c_src/zstd/doc/images/zstd_logo86.png +0 -0
  1849. hdiffpatch/_c_src/zstd/doc/zstd_compression_format.md +1771 -0
  1850. hdiffpatch/_c_src/zstd/doc/zstd_manual.html +2237 -0
  1851. hdiffpatch/_c_src/zstd/examples/.gitignore +15 -0
  1852. hdiffpatch/_c_src/zstd/examples/Makefile +93 -0
  1853. hdiffpatch/_c_src/zstd/examples/README.md +46 -0
  1854. hdiffpatch/_c_src/zstd/examples/common.h +246 -0
  1855. hdiffpatch/_c_src/zstd/examples/dictionary_compression.c +107 -0
  1856. hdiffpatch/_c_src/zstd/examples/dictionary_decompression.c +99 -0
  1857. hdiffpatch/_c_src/zstd/examples/multiple_simple_compression.c +116 -0
  1858. hdiffpatch/_c_src/zstd/examples/multiple_streaming_compression.c +133 -0
  1859. hdiffpatch/_c_src/zstd/examples/simple_compression.c +68 -0
  1860. hdiffpatch/_c_src/zstd/examples/simple_decompression.c +65 -0
  1861. hdiffpatch/_c_src/zstd/examples/streaming_compression.c +146 -0
  1862. hdiffpatch/_c_src/zstd/examples/streaming_compression_thread_pool.c +180 -0
  1863. hdiffpatch/_c_src/zstd/examples/streaming_decompression.c +100 -0
  1864. hdiffpatch/_c_src/zstd/examples/streaming_memory_usage.c +137 -0
  1865. hdiffpatch/_c_src/zstd/lib/.gitignore +3 -0
  1866. hdiffpatch/_c_src/zstd/lib/BUCK +232 -0
  1867. hdiffpatch/_c_src/zstd/lib/Makefile +389 -0
  1868. hdiffpatch/_c_src/zstd/lib/README.md +248 -0
  1869. hdiffpatch/_c_src/zstd/lib/common/allocations.h +55 -0
  1870. hdiffpatch/_c_src/zstd/lib/common/bits.h +205 -0
  1871. hdiffpatch/_c_src/zstd/lib/common/bitstream.h +454 -0
  1872. hdiffpatch/_c_src/zstd/lib/common/compiler.h +464 -0
  1873. hdiffpatch/_c_src/zstd/lib/common/cpu.h +249 -0
  1874. hdiffpatch/_c_src/zstd/lib/common/debug.c +30 -0
  1875. hdiffpatch/_c_src/zstd/lib/common/debug.h +107 -0
  1876. hdiffpatch/_c_src/zstd/lib/common/entropy_common.c +340 -0
  1877. hdiffpatch/_c_src/zstd/lib/common/error_private.c +64 -0
  1878. hdiffpatch/_c_src/zstd/lib/common/error_private.h +158 -0
  1879. hdiffpatch/_c_src/zstd/lib/common/fse.h +625 -0
  1880. hdiffpatch/_c_src/zstd/lib/common/fse_decompress.c +315 -0
  1881. hdiffpatch/_c_src/zstd/lib/common/huf.h +277 -0
  1882. hdiffpatch/_c_src/zstd/lib/common/mem.h +422 -0
  1883. hdiffpatch/_c_src/zstd/lib/common/pool.c +371 -0
  1884. hdiffpatch/_c_src/zstd/lib/common/pool.h +81 -0
  1885. hdiffpatch/_c_src/zstd/lib/common/portability_macros.h +171 -0
  1886. hdiffpatch/_c_src/zstd/lib/common/threading.c +182 -0
  1887. hdiffpatch/_c_src/zstd/lib/common/threading.h +142 -0
  1888. hdiffpatch/_c_src/zstd/lib/common/xxhash.c +18 -0
  1889. hdiffpatch/_c_src/zstd/lib/common/xxhash.h +7094 -0
  1890. hdiffpatch/_c_src/zstd/lib/common/zstd_common.c +48 -0
  1891. hdiffpatch/_c_src/zstd/lib/common/zstd_deps.h +123 -0
  1892. hdiffpatch/_c_src/zstd/lib/common/zstd_internal.h +324 -0
  1893. hdiffpatch/_c_src/zstd/lib/common/zstd_trace.h +156 -0
  1894. hdiffpatch/_c_src/zstd/lib/compress/clevels.h +134 -0
  1895. hdiffpatch/_c_src/zstd/lib/compress/fse_compress.c +625 -0
  1896. hdiffpatch/_c_src/zstd/lib/compress/hist.c +191 -0
  1897. hdiffpatch/_c_src/zstd/lib/compress/hist.h +82 -0
  1898. hdiffpatch/_c_src/zstd/lib/compress/huf_compress.c +1464 -0
  1899. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress.c +7942 -0
  1900. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_internal.h +1640 -0
  1901. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_literals.c +235 -0
  1902. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_literals.h +39 -0
  1903. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_sequences.c +442 -0
  1904. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_sequences.h +55 -0
  1905. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_superblock.c +688 -0
  1906. hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_superblock.h +32 -0
  1907. hdiffpatch/_c_src/zstd/lib/compress/zstd_cwksp.h +765 -0
  1908. hdiffpatch/_c_src/zstd/lib/compress/zstd_double_fast.c +778 -0
  1909. hdiffpatch/_c_src/zstd/lib/compress/zstd_double_fast.h +42 -0
  1910. hdiffpatch/_c_src/zstd/lib/compress/zstd_fast.c +985 -0
  1911. hdiffpatch/_c_src/zstd/lib/compress/zstd_fast.h +30 -0
  1912. hdiffpatch/_c_src/zstd/lib/compress/zstd_lazy.c +2199 -0
  1913. hdiffpatch/_c_src/zstd/lib/compress/zstd_lazy.h +193 -0
  1914. hdiffpatch/_c_src/zstd/lib/compress/zstd_ldm.c +745 -0
  1915. hdiffpatch/_c_src/zstd/lib/compress/zstd_ldm.h +109 -0
  1916. hdiffpatch/_c_src/zstd/lib/compress/zstd_ldm_geartab.h +106 -0
  1917. hdiffpatch/_c_src/zstd/lib/compress/zstd_opt.c +1580 -0
  1918. hdiffpatch/_c_src/zstd/lib/compress/zstd_opt.h +72 -0
  1919. hdiffpatch/_c_src/zstd/lib/compress/zstd_preSplit.c +238 -0
  1920. hdiffpatch/_c_src/zstd/lib/compress/zstd_preSplit.h +33 -0
  1921. hdiffpatch/_c_src/zstd/lib/compress/zstdmt_compress.c +1923 -0
  1922. hdiffpatch/_c_src/zstd/lib/compress/zstdmt_compress.h +102 -0
  1923. hdiffpatch/_c_src/zstd/lib/decompress/huf_decompress.c +1944 -0
  1924. hdiffpatch/_c_src/zstd/lib/decompress/huf_decompress_amd64.S +602 -0
  1925. hdiffpatch/_c_src/zstd/lib/decompress/zstd_ddict.c +244 -0
  1926. hdiffpatch/_c_src/zstd/lib/decompress/zstd_ddict.h +44 -0
  1927. hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress.c +2410 -0
  1928. hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress_block.c +2209 -0
  1929. hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress_block.h +73 -0
  1930. hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress_internal.h +240 -0
  1931. hdiffpatch/_c_src/zstd/lib/deprecated/zbuff.h +214 -0
  1932. hdiffpatch/_c_src/zstd/lib/deprecated/zbuff_common.c +26 -0
  1933. hdiffpatch/_c_src/zstd/lib/deprecated/zbuff_compress.c +167 -0
  1934. hdiffpatch/_c_src/zstd/lib/deprecated/zbuff_decompress.c +77 -0
  1935. hdiffpatch/_c_src/zstd/lib/dictBuilder/cover.c +1302 -0
  1936. hdiffpatch/_c_src/zstd/lib/dictBuilder/cover.h +152 -0
  1937. hdiffpatch/_c_src/zstd/lib/dictBuilder/divsufsort.c +1913 -0
  1938. hdiffpatch/_c_src/zstd/lib/dictBuilder/divsufsort.h +57 -0
  1939. hdiffpatch/_c_src/zstd/lib/dictBuilder/fastcover.c +766 -0
  1940. hdiffpatch/_c_src/zstd/lib/dictBuilder/zdict.c +1133 -0
  1941. hdiffpatch/_c_src/zstd/lib/dll/example/Makefile +48 -0
  1942. hdiffpatch/_c_src/zstd/lib/dll/example/README.md +63 -0
  1943. hdiffpatch/_c_src/zstd/lib/dll/example/build_package.bat +20 -0
  1944. hdiffpatch/_c_src/zstd/lib/dll/example/fullbench-dll.sln +25 -0
  1945. hdiffpatch/_c_src/zstd/lib/dll/example/fullbench-dll.vcxproj +181 -0
  1946. hdiffpatch/_c_src/zstd/lib/legacy/zstd_legacy.h +452 -0
  1947. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v01.c +2127 -0
  1948. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v01.h +94 -0
  1949. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v02.c +3465 -0
  1950. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v02.h +93 -0
  1951. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v03.c +3105 -0
  1952. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v03.h +93 -0
  1953. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v04.c +3598 -0
  1954. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v04.h +142 -0
  1955. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v05.c +4005 -0
  1956. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v05.h +162 -0
  1957. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v06.c +4110 -0
  1958. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v06.h +172 -0
  1959. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v07.c +4490 -0
  1960. hdiffpatch/_c_src/zstd/lib/legacy/zstd_v07.h +187 -0
  1961. hdiffpatch/_c_src/zstd/lib/libzstd.mk +235 -0
  1962. hdiffpatch/_c_src/zstd/lib/libzstd.pc.in +16 -0
  1963. hdiffpatch/_c_src/zstd/lib/module.modulemap +35 -0
  1964. hdiffpatch/_c_src/zstd/lib/zdict.h +481 -0
  1965. hdiffpatch/_c_src/zstd/lib/zstd.h +3206 -0
  1966. hdiffpatch/_c_src/zstd/lib/zstd_errors.h +107 -0
  1967. hdiffpatch/_c_src/zstd/programs/.gitignore +41 -0
  1968. hdiffpatch/_c_src/zstd/programs/BUCK +44 -0
  1969. hdiffpatch/_c_src/zstd/programs/Makefile +445 -0
  1970. hdiffpatch/_c_src/zstd/programs/README.md +344 -0
  1971. hdiffpatch/_c_src/zstd/programs/benchfn.c +256 -0
  1972. hdiffpatch/_c_src/zstd/programs/benchfn.h +173 -0
  1973. hdiffpatch/_c_src/zstd/programs/benchzstd.c +1281 -0
  1974. hdiffpatch/_c_src/zstd/programs/benchzstd.h +191 -0
  1975. hdiffpatch/_c_src/zstd/programs/datagen.c +186 -0
  1976. hdiffpatch/_c_src/zstd/programs/datagen.h +38 -0
  1977. hdiffpatch/_c_src/zstd/programs/dibio.c +440 -0
  1978. hdiffpatch/_c_src/zstd/programs/dibio.h +39 -0
  1979. hdiffpatch/_c_src/zstd/programs/fileio.c +3464 -0
  1980. hdiffpatch/_c_src/zstd/programs/fileio.h +171 -0
  1981. hdiffpatch/_c_src/zstd/programs/fileio_asyncio.c +663 -0
  1982. hdiffpatch/_c_src/zstd/programs/fileio_asyncio.h +195 -0
  1983. hdiffpatch/_c_src/zstd/programs/fileio_common.h +121 -0
  1984. hdiffpatch/_c_src/zstd/programs/fileio_types.h +86 -0
  1985. hdiffpatch/_c_src/zstd/programs/lorem.c +285 -0
  1986. hdiffpatch/_c_src/zstd/programs/lorem.h +32 -0
  1987. hdiffpatch/_c_src/zstd/programs/platform.h +217 -0
  1988. hdiffpatch/_c_src/zstd/programs/timefn.c +168 -0
  1989. hdiffpatch/_c_src/zstd/programs/timefn.h +59 -0
  1990. hdiffpatch/_c_src/zstd/programs/util.c +1643 -0
  1991. hdiffpatch/_c_src/zstd/programs/util.h +362 -0
  1992. hdiffpatch/_c_src/zstd/programs/windres/verrsrc.h +17 -0
  1993. hdiffpatch/_c_src/zstd/programs/windres/zstd.rc +51 -0
  1994. hdiffpatch/_c_src/zstd/programs/windres/zstd32.res +0 -0
  1995. hdiffpatch/_c_src/zstd/programs/windres/zstd64.res +0 -0
  1996. hdiffpatch/_c_src/zstd/programs/zstd.1 +392 -0
  1997. hdiffpatch/_c_src/zstd/programs/zstd.1.md +714 -0
  1998. hdiffpatch/_c_src/zstd/programs/zstdcli.c +1658 -0
  1999. hdiffpatch/_c_src/zstd/programs/zstdcli_trace.c +172 -0
  2000. hdiffpatch/_c_src/zstd/programs/zstdcli_trace.h +24 -0
  2001. hdiffpatch/_c_src/zstd/programs/zstdgrep +134 -0
  2002. hdiffpatch/_c_src/zstd/programs/zstdgrep.1 +26 -0
  2003. hdiffpatch/_c_src/zstd/programs/zstdgrep.1.md +30 -0
  2004. hdiffpatch/_c_src/zstd/programs/zstdless +8 -0
  2005. hdiffpatch/_c_src/zstd/programs/zstdless.1 +14 -0
  2006. hdiffpatch/_c_src/zstd/programs/zstdless.1.md +16 -0
  2007. hdiffpatch/_c_src/zstd/tests/.gitignore +72 -0
  2008. hdiffpatch/_c_src/zstd/tests/DEPRECATED-test-zstd-speed.py +378 -0
  2009. hdiffpatch/_c_src/zstd/tests/Makefile +481 -0
  2010. hdiffpatch/_c_src/zstd/tests/README.md +184 -0
  2011. hdiffpatch/_c_src/zstd/tests/automated_benchmarking.py +326 -0
  2012. hdiffpatch/_c_src/zstd/tests/bigdict.c +133 -0
  2013. hdiffpatch/_c_src/zstd/tests/checkTag.c +65 -0
  2014. hdiffpatch/_c_src/zstd/tests/check_size.py +31 -0
  2015. hdiffpatch/_c_src/zstd/tests/cli-tests/.gitignore +6 -0
  2016. hdiffpatch/_c_src/zstd/tests/cli-tests/README.md +258 -0
  2017. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/args.sh +10 -0
  2018. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/args.sh.exit +1 -0
  2019. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/args.sh.stderr.glob +28 -0
  2020. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/help.sh +10 -0
  2021. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/help.sh.stdout.glob +34 -0
  2022. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/memlimit.sh +40 -0
  2023. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/memlimit.sh.stderr.exact +13 -0
  2024. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/memlimit.sh.stdout.exact +13 -0
  2025. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/output_dir.sh +7 -0
  2026. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/output_dir.sh.stderr.exact +2 -0
  2027. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/output_dir.sh.stdout.exact +2 -0
  2028. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/version.sh +6 -0
  2029. hdiffpatch/_c_src/zstd/tests/cli-tests/basic/version.sh.stdout.glob +2 -0
  2030. hdiffpatch/_c_src/zstd/tests/cli-tests/bin/cmp_size +44 -0
  2031. hdiffpatch/_c_src/zstd/tests/cli-tests/bin/datagen +3 -0
  2032. hdiffpatch/_c_src/zstd/tests/cli-tests/bin/die +4 -0
  2033. hdiffpatch/_c_src/zstd/tests/cli-tests/bin/println +2 -0
  2034. hdiffpatch/_c_src/zstd/tests/cli-tests/bin/zstd +9 -0
  2035. hdiffpatch/_c_src/zstd/tests/cli-tests/bin/zstdgrep +2 -0
  2036. hdiffpatch/_c_src/zstd/tests/cli-tests/bin/zstdless +2 -0
  2037. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/setup +6 -0
  2038. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh +8 -0
  2039. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh.exit +1 -0
  2040. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh.stderr.exact +1 -0
  2041. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh.stdout.glob +4 -0
  2042. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdless.sh +10 -0
  2043. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdless.sh.stderr.exact +2 -0
  2044. hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdless.sh.stdout.glob +5 -0
  2045. hdiffpatch/_c_src/zstd/tests/cli-tests/common/format.sh +19 -0
  2046. hdiffpatch/_c_src/zstd/tests/cli-tests/common/mtime.sh +13 -0
  2047. hdiffpatch/_c_src/zstd/tests/cli-tests/common/permissions.sh +18 -0
  2048. hdiffpatch/_c_src/zstd/tests/cli-tests/common/platform.sh +36 -0
  2049. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/adapt.sh +14 -0
  2050. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/basic.sh +36 -0
  2051. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/compress-literals.sh +10 -0
  2052. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/format.sh +16 -0
  2053. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/golden.sh +16 -0
  2054. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/gzip-compat.sh +17 -0
  2055. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/levels.sh +75 -0
  2056. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/levels.sh.stderr.exact +80 -0
  2057. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/long-distance-matcher.sh +7 -0
  2058. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multi-threaded.sh +15 -0
  2059. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multi-threaded.sh.stderr.exact +11 -0
  2060. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multiple-files.sh +21 -0
  2061. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multiple-files.sh.stdout.exact +12 -0
  2062. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/row-match-finder.sh +7 -0
  2063. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/setup +7 -0
  2064. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/stream-size.sh +7 -0
  2065. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/verbose-wlog.sh +11 -0
  2066. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/verbose-wlog.sh.stderr.glob +5 -0
  2067. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/verbose-wlog.sh.stdout.glob +5 -0
  2068. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/window-resize.sh +9 -0
  2069. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/window-resize.sh.stderr.ignore +0 -0
  2070. hdiffpatch/_c_src/zstd/tests/cli-tests/compression/window-resize.sh.stdout.glob +3 -0
  2071. hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/detectErrors.sh +11 -0
  2072. hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/golden.sh +7 -0
  2073. hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/pass-through.sh +57 -0
  2074. hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/pass-through.sh.stderr.exact +11 -0
  2075. hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/pass-through.sh.stdout.exact +25 -0
  2076. hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/empty-input.sh +9 -0
  2077. hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/empty-input.sh.stderr.exact +1 -0
  2078. hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/no-inputs.sh +3 -0
  2079. hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/no-inputs.sh.exit +1 -0
  2080. hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact +5 -0
  2081. hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh +29 -0
  2082. hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh.stderr.exact +7 -0
  2083. hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/golden.sh +9 -0
  2084. hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/setup +6 -0
  2085. hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/setup_once +24 -0
  2086. hdiffpatch/_c_src/zstd/tests/cli-tests/file-handling/directory-mirror.sh +49 -0
  2087. hdiffpatch/_c_src/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact +0 -0
  2088. hdiffpatch/_c_src/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact +0 -0
  2089. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh +12 -0
  2090. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact +26 -0
  2091. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh +9 -0
  2092. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh.stderr.exact +42 -0
  2093. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh +8 -0
  2094. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh.stderr.exact +24 -0
  2095. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh +8 -0
  2096. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.exact +24 -0
  2097. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh +8 -0
  2098. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh.stderr.exact +18 -0
  2099. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh +8 -0
  2100. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh.stderr.exact +38 -0
  2101. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh +7 -0
  2102. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh.stderr.exact +18 -0
  2103. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh +7 -0
  2104. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.exact +20 -0
  2105. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh +7 -0
  2106. hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh.stderr.exact +14 -0
  2107. hdiffpatch/_c_src/zstd/tests/cli-tests/progress/no-progress.sh +46 -0
  2108. hdiffpatch/_c_src/zstd/tests/cli-tests/progress/no-progress.sh.stderr.glob +96 -0
  2109. hdiffpatch/_c_src/zstd/tests/cli-tests/progress/progress.sh +41 -0
  2110. hdiffpatch/_c_src/zstd/tests/cli-tests/progress/progress.sh.stderr.glob +62 -0
  2111. hdiffpatch/_c_src/zstd/tests/cli-tests/run.py +731 -0
  2112. hdiffpatch/_c_src/zstd/tests/cli-tests/zstd-symlinks/setup +6 -0
  2113. hdiffpatch/_c_src/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh +12 -0
  2114. hdiffpatch/_c_src/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact +8 -0
  2115. hdiffpatch/_c_src/zstd/tests/datagencli.c +149 -0
  2116. hdiffpatch/_c_src/zstd/tests/decodecorpus.c +1998 -0
  2117. hdiffpatch/_c_src/zstd/tests/dict-files/zero-weight-dict +0 -0
  2118. hdiffpatch/_c_src/zstd/tests/external_matchfinder.c +140 -0
  2119. hdiffpatch/_c_src/zstd/tests/external_matchfinder.h +39 -0
  2120. hdiffpatch/_c_src/zstd/tests/fullbench.c +1209 -0
  2121. hdiffpatch/_c_src/zstd/tests/fuzz/.gitignore +31 -0
  2122. hdiffpatch/_c_src/zstd/tests/fuzz/Makefile +278 -0
  2123. hdiffpatch/_c_src/zstd/tests/fuzz/README.md +161 -0
  2124. hdiffpatch/_c_src/zstd/tests/fuzz/block_decompress.c +53 -0
  2125. hdiffpatch/_c_src/zstd/tests/fuzz/block_round_trip.c +103 -0
  2126. hdiffpatch/_c_src/zstd/tests/fuzz/decompress_cross_format.c +130 -0
  2127. hdiffpatch/_c_src/zstd/tests/fuzz/decompress_dstSize_tooSmall.c +74 -0
  2128. hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_decompress.c +77 -0
  2129. hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_loader.c +106 -0
  2130. hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_round_trip.c +155 -0
  2131. hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_stream_round_trip.c +209 -0
  2132. hdiffpatch/_c_src/zstd/tests/fuzz/fse_read_ncount.c +100 -0
  2133. hdiffpatch/_c_src/zstd/tests/fuzz/fuzz.h +57 -0
  2134. hdiffpatch/_c_src/zstd/tests/fuzz/fuzz.py +910 -0
  2135. hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_data_producer.c +95 -0
  2136. hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_data_producer.h +66 -0
  2137. hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_helpers.c +48 -0
  2138. hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_helpers.h +81 -0
  2139. hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_third_party_seq_prod.h +116 -0
  2140. hdiffpatch/_c_src/zstd/tests/fuzz/generate_sequences.c +88 -0
  2141. hdiffpatch/_c_src/zstd/tests/fuzz/huf_decompress.c +68 -0
  2142. hdiffpatch/_c_src/zstd/tests/fuzz/huf_round_trip.c +137 -0
  2143. hdiffpatch/_c_src/zstd/tests/fuzz/raw_dictionary_round_trip.c +119 -0
  2144. hdiffpatch/_c_src/zstd/tests/fuzz/regression_driver.c +90 -0
  2145. hdiffpatch/_c_src/zstd/tests/fuzz/seekable_roundtrip.c +88 -0
  2146. hdiffpatch/_c_src/zstd/tests/fuzz/seq_prod_fuzz_example/Makefile +16 -0
  2147. hdiffpatch/_c_src/zstd/tests/fuzz/seq_prod_fuzz_example/README.md +12 -0
  2148. hdiffpatch/_c_src/zstd/tests/fuzz/seq_prod_fuzz_example/example_seq_prod.c +52 -0
  2149. hdiffpatch/_c_src/zstd/tests/fuzz/sequence_compression_api.c +452 -0
  2150. hdiffpatch/_c_src/zstd/tests/fuzz/simple_compress.c +60 -0
  2151. hdiffpatch/_c_src/zstd/tests/fuzz/simple_decompress.c +59 -0
  2152. hdiffpatch/_c_src/zstd/tests/fuzz/simple_round_trip.c +182 -0
  2153. hdiffpatch/_c_src/zstd/tests/fuzz/stream_decompress.c +119 -0
  2154. hdiffpatch/_c_src/zstd/tests/fuzz/stream_round_trip.c +218 -0
  2155. hdiffpatch/_c_src/zstd/tests/fuzz/zstd_frame_info.c +43 -0
  2156. hdiffpatch/_c_src/zstd/tests/fuzz/zstd_helpers.c +208 -0
  2157. hdiffpatch/_c_src/zstd/tests/fuzz/zstd_helpers.h +56 -0
  2158. hdiffpatch/_c_src/zstd/tests/fuzzer.c +5147 -0
  2159. hdiffpatch/_c_src/zstd/tests/golden-compression/PR-3517-block-splitter-corruption-test +1 -0
  2160. hdiffpatch/_c_src/zstd/tests/golden-compression/http +1 -0
  2161. hdiffpatch/_c_src/zstd/tests/golden-compression/huffman-compressed-larger +0 -0
  2162. hdiffpatch/_c_src/zstd/tests/golden-compression/large-literal-and-match-lengths +0 -0
  2163. hdiffpatch/_c_src/zstd/tests/golden-decompression/block-128k.zst +0 -0
  2164. hdiffpatch/_c_src/zstd/tests/golden-decompression/empty-block.zst +0 -0
  2165. hdiffpatch/_c_src/zstd/tests/golden-decompression/rle-first-block.zst +0 -0
  2166. hdiffpatch/_c_src/zstd/tests/golden-decompression/zeroSeq_2B.zst +0 -0
  2167. hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/.gitignore +1 -0
  2168. hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/off0.bin.zst +0 -0
  2169. hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/truncated_huff_state.zst +0 -0
  2170. hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/zeroSeq_extraneous.zst +0 -0
  2171. hdiffpatch/_c_src/zstd/tests/golden-dictionaries/http-dict-missing-symbols +0 -0
  2172. hdiffpatch/_c_src/zstd/tests/gzip/Makefile +45 -0
  2173. hdiffpatch/_c_src/zstd/tests/gzip/gzip-env.sh +46 -0
  2174. hdiffpatch/_c_src/zstd/tests/gzip/helin-segv.sh +31 -0
  2175. hdiffpatch/_c_src/zstd/tests/gzip/help-version.sh +270 -0
  2176. hdiffpatch/_c_src/zstd/tests/gzip/hufts-segv.gz +0 -0
  2177. hdiffpatch/_c_src/zstd/tests/gzip/hufts.sh +34 -0
  2178. hdiffpatch/_c_src/zstd/tests/gzip/init.cfg +5 -0
  2179. hdiffpatch/_c_src/zstd/tests/gzip/init.sh +616 -0
  2180. hdiffpatch/_c_src/zstd/tests/gzip/keep.sh +51 -0
  2181. hdiffpatch/_c_src/zstd/tests/gzip/list.sh +31 -0
  2182. hdiffpatch/_c_src/zstd/tests/gzip/memcpy-abuse.sh +34 -0
  2183. hdiffpatch/_c_src/zstd/tests/gzip/mixed.sh +68 -0
  2184. hdiffpatch/_c_src/zstd/tests/gzip/null-suffix-clobber.sh +35 -0
  2185. hdiffpatch/_c_src/zstd/tests/gzip/stdin.sh +31 -0
  2186. hdiffpatch/_c_src/zstd/tests/gzip/test-driver.sh +150 -0
  2187. hdiffpatch/_c_src/zstd/tests/gzip/trailing-nul.sh +37 -0
  2188. hdiffpatch/_c_src/zstd/tests/gzip/unpack-invalid.sh +36 -0
  2189. hdiffpatch/_c_src/zstd/tests/gzip/z-suffix.sh +30 -0
  2190. hdiffpatch/_c_src/zstd/tests/gzip/zdiff.sh +48 -0
  2191. hdiffpatch/_c_src/zstd/tests/gzip/zgrep-context.sh +47 -0
  2192. hdiffpatch/_c_src/zstd/tests/gzip/zgrep-f.sh +43 -0
  2193. hdiffpatch/_c_src/zstd/tests/gzip/zgrep-signal.sh +64 -0
  2194. hdiffpatch/_c_src/zstd/tests/gzip/znew-k.sh +40 -0
  2195. hdiffpatch/_c_src/zstd/tests/invalidDictionaries.c +61 -0
  2196. hdiffpatch/_c_src/zstd/tests/largeDictionary.c +128 -0
  2197. hdiffpatch/_c_src/zstd/tests/legacy.c +260 -0
  2198. hdiffpatch/_c_src/zstd/tests/libzstd_builds.sh +104 -0
  2199. hdiffpatch/_c_src/zstd/tests/longmatch.c +102 -0
  2200. hdiffpatch/_c_src/zstd/tests/loremOut.c +50 -0
  2201. hdiffpatch/_c_src/zstd/tests/loremOut.h +15 -0
  2202. hdiffpatch/_c_src/zstd/tests/paramgrill.c +2965 -0
  2203. hdiffpatch/_c_src/zstd/tests/playTests.sh +1925 -0
  2204. hdiffpatch/_c_src/zstd/tests/poolTests.c +271 -0
  2205. hdiffpatch/_c_src/zstd/tests/rateLimiter.py +41 -0
  2206. hdiffpatch/_c_src/zstd/tests/regression/.gitignore +4 -0
  2207. hdiffpatch/_c_src/zstd/tests/regression/Makefile +60 -0
  2208. hdiffpatch/_c_src/zstd/tests/regression/README.md +28 -0
  2209. hdiffpatch/_c_src/zstd/tests/regression/config.c +404 -0
  2210. hdiffpatch/_c_src/zstd/tests/regression/config.h +91 -0
  2211. hdiffpatch/_c_src/zstd/tests/regression/data.c +631 -0
  2212. hdiffpatch/_c_src/zstd/tests/regression/data.h +121 -0
  2213. hdiffpatch/_c_src/zstd/tests/regression/levels.h +59 -0
  2214. hdiffpatch/_c_src/zstd/tests/regression/method.c +701 -0
  2215. hdiffpatch/_c_src/zstd/tests/regression/method.h +65 -0
  2216. hdiffpatch/_c_src/zstd/tests/regression/result.c +30 -0
  2217. hdiffpatch/_c_src/zstd/tests/regression/result.h +103 -0
  2218. hdiffpatch/_c_src/zstd/tests/regression/results.csv +1480 -0
  2219. hdiffpatch/_c_src/zstd/tests/regression/test.c +362 -0
  2220. hdiffpatch/_c_src/zstd/tests/roundTripCrash.c +241 -0
  2221. hdiffpatch/_c_src/zstd/tests/seqgen.c +260 -0
  2222. hdiffpatch/_c_src/zstd/tests/seqgen.h +58 -0
  2223. hdiffpatch/_c_src/zstd/tests/test-license.py +156 -0
  2224. hdiffpatch/_c_src/zstd/tests/test-variants.sh +115 -0
  2225. hdiffpatch/_c_src/zstd/tests/test-zstd-versions.py +308 -0
  2226. hdiffpatch/_c_src/zstd/tests/zstreamtest.c +3467 -0
  2227. hdiffpatch/_c_src/zstd/zlibWrapper/.gitignore +28 -0
  2228. hdiffpatch/_c_src/zstd/zlibWrapper/BUCK +22 -0
  2229. hdiffpatch/_c_src/zstd/zlibWrapper/Makefile +120 -0
  2230. hdiffpatch/_c_src/zstd/zlibWrapper/README.md +163 -0
  2231. hdiffpatch/_c_src/zstd/zlibWrapper/examples/example.c +598 -0
  2232. hdiffpatch/_c_src/zstd/zlibWrapper/examples/example_original.c +599 -0
  2233. hdiffpatch/_c_src/zstd/zlibWrapper/examples/fitblk.c +254 -0
  2234. hdiffpatch/_c_src/zstd/zlibWrapper/examples/fitblk_original.c +233 -0
  2235. hdiffpatch/_c_src/zstd/zlibWrapper/examples/minigzip.c +605 -0
  2236. hdiffpatch/_c_src/zstd/zlibWrapper/examples/zwrapbench.c +1018 -0
  2237. hdiffpatch/_c_src/zstd/zlibWrapper/gzclose.c +26 -0
  2238. hdiffpatch/_c_src/zstd/zlibWrapper/gzcompatibility.h +68 -0
  2239. hdiffpatch/_c_src/zstd/zlibWrapper/gzguts.h +229 -0
  2240. hdiffpatch/_c_src/zstd/zlibWrapper/gzlib.c +587 -0
  2241. hdiffpatch/_c_src/zstd/zlibWrapper/gzread.c +637 -0
  2242. hdiffpatch/_c_src/zstd/zlibWrapper/gzwrite.c +632 -0
  2243. hdiffpatch/_c_src/zstd/zlibWrapper/zstd_zlibwrapper.c +1200 -0
  2244. hdiffpatch/_c_src/zstd/zlibWrapper/zstd_zlibwrapper.h +91 -0
  2245. hdiffpatch/_lzma_config.py +215 -0
  2246. hdiffpatch/_tamp_config.py +85 -0
  2247. hdiffpatch/_zlib_config.py +177 -0
  2248. hdiffpatch/_zstd_config.py +113 -0
  2249. hdiffpatch/py.typed +0 -0
  2250. hdiffpatch-1.0.0.dist-info/LICENSE +201 -0
  2251. hdiffpatch-1.0.0.dist-info/METADATA +376 -0
  2252. hdiffpatch-1.0.0.dist-info/RECORD +2254 -0
  2253. hdiffpatch-1.0.0.dist-info/WHEEL +4 -0
  2254. hdiffpatch-1.0.0.dist-info/entry_points.txt +0 -0
@@ -0,0 +1,2979 @@
1
+ <?xml version="1.0"?> <!-- -*- sgml -*- -->
2
+ <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[
4
+
5
+ <!-- various strings, dates etc. common to all docs -->
6
+ <!ENTITY % common-ents SYSTEM "entities.xml"> %common-ents;
7
+ ]>
8
+
9
+ <book lang="en" id="userman" xreflabel="bzip2 Manual">
10
+
11
+ <bookinfo>
12
+ <title>bzip2 and libbzip2, version &bz-version;</title>
13
+ <subtitle>A program and library for data compression</subtitle>
14
+ <copyright>
15
+ <year>&bz-lifespan;</year>
16
+ <holder>Julian Seward</holder>
17
+ </copyright>
18
+ <releaseinfo>Version &bz-version; of &bz-date;</releaseinfo>
19
+
20
+ <authorgroup>
21
+ <author>
22
+ <firstname>Julian</firstname>
23
+ <surname>Seward</surname>
24
+ <affiliation>
25
+ <orgname>&bz-url;</orgname>
26
+ </affiliation>
27
+ </author>
28
+ </authorgroup>
29
+
30
+ <legalnotice id="legal">
31
+
32
+ <para>This program, <computeroutput>bzip2</computeroutput>, the
33
+ associated library <computeroutput>libbzip2</computeroutput>, and
34
+ all documentation, are copyright &copy; &bz-lifespan; Julian Seward.
35
+ All rights reserved.</para>
36
+
37
+ <para>Redistribution and use in source and binary forms, with
38
+ or without modification, are permitted provided that the
39
+ following conditions are met:</para>
40
+
41
+ <itemizedlist mark='bullet'>
42
+
43
+ <listitem><para>Redistributions of source code must retain the
44
+ above copyright notice, this list of conditions and the
45
+ following disclaimer.</para></listitem>
46
+
47
+ <listitem><para>The origin of this software must not be
48
+ misrepresented; you must not claim that you wrote the original
49
+ software. If you use this software in a product, an
50
+ acknowledgment in the product documentation would be
51
+ appreciated but is not required.</para></listitem>
52
+
53
+ <listitem><para>Altered source versions must be plainly marked
54
+ as such, and must not be misrepresented as being the original
55
+ software.</para></listitem>
56
+
57
+ <listitem><para>The name of the author may not be used to
58
+ endorse or promote products derived from this software without
59
+ specific prior written permission.</para></listitem>
60
+
61
+ </itemizedlist>
62
+
63
+ <para>THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY
64
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
65
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
66
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
67
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
68
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
69
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
70
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
71
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
72
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
73
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
74
+ THE POSSIBILITY OF SUCH DAMAGE.</para>
75
+
76
+ <para>PATENTS: To the best of my knowledge,
77
+ <computeroutput>bzip2</computeroutput> and
78
+ <computeroutput>libbzip2</computeroutput> do not use any patented
79
+ algorithms. However, I do not have the resources to carry
80
+ out a patent search. Therefore I cannot give any guarantee of
81
+ the above statement.
82
+ </para>
83
+
84
+ </legalnotice>
85
+
86
+ </bookinfo>
87
+
88
+
89
+
90
+ <chapter id="intro" xreflabel="Introduction">
91
+ <title>Introduction</title>
92
+
93
+ <para><computeroutput>bzip2</computeroutput> compresses files
94
+ using the Burrows-Wheeler block-sorting text compression
95
+ algorithm, and Huffman coding. Compression is generally
96
+ considerably better than that achieved by more conventional
97
+ LZ77/LZ78-based compressors, and approaches the performance of
98
+ the PPM family of statistical compressors.</para>
99
+
100
+ <para><computeroutput>bzip2</computeroutput> is built on top of
101
+ <computeroutput>libbzip2</computeroutput>, a flexible library for
102
+ handling compressed data in the
103
+ <computeroutput>bzip2</computeroutput> format. This manual
104
+ describes both how to use the program and how to work with the
105
+ library interface. Most of the manual is devoted to this
106
+ library, not the program, which is good news if your interest is
107
+ only in the program.</para>
108
+
109
+ <itemizedlist mark='bullet'>
110
+
111
+ <listitem><para><xref linkend="using"/> describes how to use
112
+ <computeroutput>bzip2</computeroutput>; this is the only part
113
+ you need to read if you just want to know how to operate the
114
+ program.</para></listitem>
115
+
116
+ <listitem><para><xref linkend="libprog"/> describes the
117
+ programming interfaces in detail, and</para></listitem>
118
+
119
+ <listitem><para><xref linkend="misc"/> records some
120
+ miscellaneous notes which I thought ought to be recorded
121
+ somewhere.</para></listitem>
122
+
123
+ </itemizedlist>
124
+
125
+ </chapter>
126
+
127
+
128
+ <chapter id="using" xreflabel="How to use bzip2">
129
+ <title>How to use bzip2</title>
130
+
131
+ <para>This chapter contains a copy of the
132
+ <computeroutput>bzip2</computeroutput> man page, and nothing
133
+ else.</para>
134
+
135
+ <sect1 id="name" xreflabel="NAME">
136
+ <title>NAME</title>
137
+
138
+ <itemizedlist mark='bullet'>
139
+
140
+ <listitem><para><computeroutput>bzip2</computeroutput>,
141
+ <computeroutput>bunzip2</computeroutput> - a block-sorting file
142
+ compressor, v&bz-version;</para></listitem>
143
+
144
+ <listitem><para><computeroutput>bzcat</computeroutput> -
145
+ decompresses files to stdout</para></listitem>
146
+
147
+ <listitem><para><computeroutput>bzip2recover</computeroutput> -
148
+ recovers data from damaged bzip2 files</para></listitem>
149
+
150
+ </itemizedlist>
151
+
152
+ </sect1>
153
+
154
+
155
+ <sect1 id="synopsis" xreflabel="SYNOPSIS">
156
+ <title>SYNOPSIS</title>
157
+
158
+ <itemizedlist mark='bullet'>
159
+
160
+ <listitem><para><computeroutput>bzip2</computeroutput> [
161
+ -cdfkqstvzVL123456789 ] [ filenames ... ]</para></listitem>
162
+
163
+ <listitem><para><computeroutput>bzip2</computeroutput> [
164
+ -h | --help ]</para></listitem>
165
+
166
+ <listitem><para><computeroutput>bunzip2</computeroutput> [
167
+ -fkvsVL ] [ filenames ... ]</para></listitem>
168
+
169
+ <listitem><para><computeroutput>bunzip2</computeroutput> [
170
+ -h | --help ]</para></listitem>
171
+
172
+ <listitem><para><computeroutput>bzcat</computeroutput> [ -s ] [
173
+ filenames ... ]</para></listitem>
174
+
175
+ <listitem><para><computeroutput>bzcat</computeroutput> [
176
+ -h | --help ]</para></listitem>
177
+
178
+ <listitem><para><computeroutput>bzip2recover</computeroutput>
179
+ filename</para></listitem>
180
+
181
+ </itemizedlist>
182
+
183
+ </sect1>
184
+
185
+
186
+ <sect1 id="description" xreflabel="DESCRIPTION">
187
+ <title>DESCRIPTION</title>
188
+
189
+ <para><computeroutput>bzip2</computeroutput> compresses files
190
+ using the Burrows-Wheeler block sorting text compression
191
+ algorithm, and Huffman coding. Compression is generally
192
+ considerably better than that achieved by more conventional
193
+ LZ77/LZ78-based compressors, and approaches the performance of
194
+ the PPM family of statistical compressors.</para>
195
+
196
+ <para>The command-line options are deliberately very similar to
197
+ those of GNU <computeroutput>gzip</computeroutput>, but they are
198
+ not identical.</para>
199
+
200
+ <para><computeroutput>bzip2</computeroutput> expects a list of
201
+ file names to accompany the command-line flags. Each file is
202
+ replaced by a compressed version of itself, with the name
203
+ <computeroutput>original_name.bz2</computeroutput>. Each
204
+ compressed file has the same modification date, permissions, and,
205
+ when possible, ownership as the corresponding original, so that
206
+ these properties can be correctly restored at decompression time.
207
+ File name handling is naive in the sense that there is no
208
+ mechanism for preserving original file names, permissions,
209
+ ownerships or dates in filesystems which lack these concepts, or
210
+ have serious file name length restrictions, such as
211
+ MS-DOS.</para>
212
+
213
+ <para><computeroutput>bzip2</computeroutput> and
214
+ <computeroutput>bunzip2</computeroutput> will by default not
215
+ overwrite existing files. If you want this to happen, specify
216
+ the <computeroutput>-f</computeroutput> flag.</para>
217
+
218
+ <para>If no file names are specified,
219
+ <computeroutput>bzip2</computeroutput> compresses from standard
220
+ input to standard output. In this case,
221
+ <computeroutput>bzip2</computeroutput> will decline to write
222
+ compressed output to a terminal, as this would be entirely
223
+ incomprehensible and therefore pointless.</para>
224
+
225
+ <para><computeroutput>bunzip2</computeroutput> (or
226
+ <computeroutput>bzip2 -d</computeroutput>) decompresses all
227
+ specified files. Files which were not created by
228
+ <computeroutput>bzip2</computeroutput> will be detected and
229
+ ignored, and a warning issued.
230
+ <computeroutput>bzip2</computeroutput> attempts to guess the
231
+ filename for the decompressed file from that of the compressed
232
+ file as follows:</para>
233
+
234
+ <itemizedlist mark='bullet'>
235
+
236
+ <listitem><para><computeroutput>filename.bz2 </computeroutput>
237
+ becomes
238
+ <computeroutput>filename</computeroutput></para></listitem>
239
+
240
+ <listitem><para><computeroutput>filename.bz </computeroutput>
241
+ becomes
242
+ <computeroutput>filename</computeroutput></para></listitem>
243
+
244
+ <listitem><para><computeroutput>filename.tbz2</computeroutput>
245
+ becomes
246
+ <computeroutput>filename.tar</computeroutput></para></listitem>
247
+
248
+ <listitem><para><computeroutput>filename.tbz </computeroutput>
249
+ becomes
250
+ <computeroutput>filename.tar</computeroutput></para></listitem>
251
+
252
+ <listitem><para><computeroutput>anyothername </computeroutput>
253
+ becomes
254
+ <computeroutput>anyothername.out</computeroutput></para></listitem>
255
+
256
+ </itemizedlist>
257
+
258
+ <para>If the file does not end in one of the recognised endings,
259
+ <computeroutput>.bz2</computeroutput>,
260
+ <computeroutput>.bz</computeroutput>,
261
+ <computeroutput>.tbz2</computeroutput> or
262
+ <computeroutput>.tbz</computeroutput>,
263
+ <computeroutput>bzip2</computeroutput> complains that it cannot
264
+ guess the name of the original file, and uses the original name
265
+ with <computeroutput>.out</computeroutput> appended.</para>
266
+
267
+ <para>As with compression, supplying no filenames causes
268
+ decompression from standard input to standard output.</para>
269
+
270
+ <para><computeroutput>bunzip2</computeroutput> will correctly
271
+ decompress a file which is the concatenation of two or more
272
+ compressed files. The result is the concatenation of the
273
+ corresponding uncompressed files. Integrity testing
274
+ (<computeroutput>-t</computeroutput>) of concatenated compressed
275
+ files is also supported.</para>
276
+
277
+ <para>You can also compress or decompress files to the standard
278
+ output by giving the <computeroutput>-c</computeroutput> flag.
279
+ Multiple files may be compressed and decompressed like this. The
280
+ resulting outputs are fed sequentially to stdout. Compression of
281
+ multiple files in this manner generates a stream containing
282
+ multiple compressed file representations. Such a stream can be
283
+ decompressed correctly only by
284
+ <computeroutput>bzip2</computeroutput> version 0.9.0 or later.
285
+ Earlier versions of <computeroutput>bzip2</computeroutput> will
286
+ stop after decompressing the first file in the stream.</para>
287
+
288
+ <para><computeroutput>bzcat</computeroutput> (or
289
+ <computeroutput>bzip2 -dc</computeroutput>) decompresses all
290
+ specified files to the standard output.</para>
291
+
292
+ <para><computeroutput>bzip2</computeroutput> will read arguments
293
+ from the environment variables
294
+ <computeroutput>BZIP2</computeroutput> and
295
+ <computeroutput>BZIP</computeroutput>, in that order, and will
296
+ process them before any arguments read from the command line.
297
+ This gives a convenient way to supply default arguments.</para>
298
+
299
+ <para>Compression is always performed, even if the compressed
300
+ file is slightly larger than the original. Files of less than
301
+ about one hundred bytes tend to get larger, since the compression
302
+ mechanism has a constant overhead in the region of 50 bytes.
303
+ Random data (including the output of most file compressors) is
304
+ coded at about 8.05 bits per byte, giving an expansion of around
305
+ 0.5%.</para>
306
+
307
+ <para>As a self-check for your protection,
308
+ <computeroutput>bzip2</computeroutput> uses 32-bit CRCs to make
309
+ sure that the decompressed version of a file is identical to the
310
+ original. This guards against corruption of the compressed data,
311
+ and against undetected bugs in
312
+ <computeroutput>bzip2</computeroutput> (hopefully very unlikely).
313
+ The chances of data corruption going undetected is microscopic,
314
+ about one chance in four billion for each file processed. Be
315
+ aware, though, that the check occurs upon decompression, so it
316
+ can only tell you that something is wrong. It can't help you
317
+ recover the original uncompressed data. You can use
318
+ <computeroutput>bzip2recover</computeroutput> to try to recover
319
+ data from damaged files.</para>
320
+
321
+ <para>Return values: 0 for a normal exit, 1 for environmental
322
+ problems (file not found, invalid flags, I/O errors, etc.), 2
323
+ to indicate a corrupt compressed file, 3 for an internal
324
+ consistency error (eg, bug) which caused
325
+ <computeroutput>bzip2</computeroutput> to panic.</para>
326
+
327
+ </sect1>
328
+
329
+
330
+ <sect1 id="options" xreflabel="OPTIONS">
331
+ <title>OPTIONS</title>
332
+
333
+ <variablelist>
334
+
335
+ <varlistentry>
336
+ <term><computeroutput>-c --stdout</computeroutput></term>
337
+ <listitem><para>Compress or decompress to standard
338
+ output.</para></listitem>
339
+ </varlistentry>
340
+
341
+ <varlistentry>
342
+ <term><computeroutput>-d --decompress</computeroutput></term>
343
+ <listitem><para>Force decompression.
344
+ <computeroutput>bzip2</computeroutput>,
345
+ <computeroutput>bunzip2</computeroutput> and
346
+ <computeroutput>bzcat</computeroutput> are really the same
347
+ program, and the decision about what actions to take is done on
348
+ the basis of which name is used. This flag overrides that
349
+ mechanism, and forces bzip2 to decompress.</para></listitem>
350
+ </varlistentry>
351
+
352
+ <varlistentry>
353
+ <term><computeroutput>-z --compress</computeroutput></term>
354
+ <listitem><para>The complement to
355
+ <computeroutput>-d</computeroutput>: forces compression,
356
+ regardless of the invokation name.</para></listitem>
357
+ </varlistentry>
358
+
359
+ <varlistentry>
360
+ <term><computeroutput>-t --test</computeroutput></term>
361
+ <listitem><para>Check integrity of the specified file(s), but
362
+ don't decompress them. This really performs a trial
363
+ decompression and throws away the result.</para></listitem>
364
+ </varlistentry>
365
+
366
+ <varlistentry>
367
+ <term><computeroutput>-f --force</computeroutput></term>
368
+ <listitem><para>Force overwrite of output files. Normally,
369
+ <computeroutput>bzip2</computeroutput> will not overwrite
370
+ existing output files. Also forces
371
+ <computeroutput>bzip2</computeroutput> to break hard links to
372
+ files, which it otherwise wouldn't do.</para>
373
+ <para><computeroutput>bzip2</computeroutput> normally declines
374
+ to decompress files which don't have the correct magic header
375
+ bytes. If forced (<computeroutput>-f</computeroutput>),
376
+ however, it will pass such files through unmodified. This is
377
+ how GNU <computeroutput>gzip</computeroutput> behaves.</para>
378
+ </listitem>
379
+ </varlistentry>
380
+
381
+ <varlistentry>
382
+ <term><computeroutput>-k --keep</computeroutput></term>
383
+ <listitem><para>Keep (don't delete) input files during
384
+ compression or decompression.</para></listitem>
385
+ </varlistentry>
386
+
387
+ <varlistentry>
388
+ <term><computeroutput>-s --small</computeroutput></term>
389
+ <listitem><para>Reduce memory usage, for compression,
390
+ decompression and testing. Files are decompressed and tested
391
+ using a modified algorithm which only requires 2.5 bytes per
392
+ block byte. This means any file can be decompressed in 2300k
393
+ of memory, albeit at about half the normal speed.</para>
394
+ <para>During compression, <computeroutput>-s</computeroutput>
395
+ selects a block size of 200k, which limits memory use to around
396
+ the same figure, at the expense of your compression ratio. In
397
+ short, if your machine is low on memory (8 megabytes or less),
398
+ use <computeroutput>-s</computeroutput> for everything. See
399
+ <xref linkend="memory-management"/> below.</para></listitem>
400
+ </varlistentry>
401
+
402
+ <varlistentry>
403
+ <term><computeroutput>-q --quiet</computeroutput></term>
404
+ <listitem><para>Suppress non-essential warning messages.
405
+ Messages pertaining to I/O errors and other critical events
406
+ will not be suppressed.</para></listitem>
407
+ </varlistentry>
408
+
409
+ <varlistentry><term><computeroutput>-h --help</computeroutput></term>
410
+ <listitem><para>Print a help message and exit.</para></listitem>
411
+ </varlistentry>
412
+
413
+ <varlistentry>
414
+ <term><computeroutput>-v --verbose</computeroutput></term>
415
+ <listitem><para>Verbose mode -- show the compression ratio for
416
+ each file processed. Further
417
+ <computeroutput>-v</computeroutput>'s increase the verbosity
418
+ level, spewing out lots of information which is primarily of
419
+ interest for diagnostic purposes.</para></listitem>
420
+ </varlistentry>
421
+
422
+ <varlistentry>
423
+ <term><computeroutput>-L --license -V --version</computeroutput></term>
424
+ <listitem><para>Display the software version, license terms and
425
+ conditions.</para></listitem>
426
+ </varlistentry>
427
+
428
+ <varlistentry>
429
+ <term><computeroutput>-1</computeroutput> (or
430
+ <computeroutput>--fast</computeroutput>) to
431
+ <computeroutput>-9</computeroutput> (or
432
+ <computeroutput>-best</computeroutput>)</term>
433
+ <listitem><para>Set the block size to 100 k, 200 k ... 900 k
434
+ when compressing. Has no effect when decompressing. See <xref
435
+ linkend="memory-management" /> below. The
436
+ <computeroutput>--fast</computeroutput> and
437
+ <computeroutput>--best</computeroutput> aliases are primarily
438
+ for GNU <computeroutput>gzip</computeroutput> compatibility.
439
+ In particular, <computeroutput>--fast</computeroutput> doesn't
440
+ make things significantly faster. And
441
+ <computeroutput>--best</computeroutput> merely selects the
442
+ default behaviour.</para></listitem>
443
+ </varlistentry>
444
+
445
+ <varlistentry>
446
+ <term><computeroutput>--</computeroutput></term>
447
+ <listitem><para>Treats all subsequent arguments as file names,
448
+ even if they start with a dash. This is so you can handle
449
+ files with names beginning with a dash, for example:
450
+ <computeroutput>bzip2 --
451
+ -myfilename</computeroutput>.</para></listitem>
452
+ </varlistentry>
453
+
454
+ <varlistentry>
455
+ <term><computeroutput>--repetitive-fast</computeroutput></term>
456
+ <term><computeroutput>--repetitive-best</computeroutput></term>
457
+ <listitem><para>These flags are redundant in versions 0.9.5 and
458
+ above. They provided some coarse control over the behaviour of
459
+ the sorting algorithm in earlier versions, which was sometimes
460
+ useful. 0.9.5 and above have an improved algorithm which
461
+ renders these flags irrelevant.</para></listitem>
462
+ </varlistentry>
463
+
464
+ </variablelist>
465
+
466
+ </sect1>
467
+
468
+
469
+ <sect1 id="memory-management" xreflabel="MEMORY MANAGEMENT">
470
+ <title>MEMORY MANAGEMENT</title>
471
+
472
+ <para><computeroutput>bzip2</computeroutput> compresses large
473
+ files in blocks. The block size affects both the compression
474
+ ratio achieved, and the amount of memory needed for compression
475
+ and decompression. The flags <computeroutput>-1</computeroutput>
476
+ through <computeroutput>-9</computeroutput> specify the block
477
+ size to be 100,000 bytes through 900,000 bytes (the default)
478
+ respectively. At decompression time, the block size used for
479
+ compression is read from the header of the compressed file, and
480
+ <computeroutput>bunzip2</computeroutput> then allocates itself
481
+ just enough memory to decompress the file. Since block sizes are
482
+ stored in compressed files, it follows that the flags
483
+ <computeroutput>-1</computeroutput> to
484
+ <computeroutput>-9</computeroutput> are irrelevant to and so
485
+ ignored during decompression.</para>
486
+
487
+ <para>Compression and decompression requirements, in bytes, can be
488
+ estimated as:</para>
489
+ <programlisting>
490
+ Compression: 400k + ( 8 x block size )
491
+
492
+ Decompression: 100k + ( 4 x block size ), or
493
+ 100k + ( 2.5 x block size )
494
+ </programlisting>
495
+
496
+ <para>Larger block sizes give rapidly diminishing marginal
497
+ returns. Most of the compression comes from the first two or
498
+ three hundred k of block size, a fact worth bearing in mind when
499
+ using <computeroutput>bzip2</computeroutput> on small machines.
500
+ It is also important to appreciate that the decompression memory
501
+ requirement is set at compression time by the choice of block
502
+ size.</para>
503
+
504
+ <para>For files compressed with the default 900k block size,
505
+ <computeroutput>bunzip2</computeroutput> will require about 3700
506
+ kbytes to decompress. To support decompression of any file on a
507
+ 4 megabyte machine, <computeroutput>bunzip2</computeroutput> has
508
+ an option to decompress using approximately half this amount of
509
+ memory, about 2300 kbytes. Decompression speed is also halved,
510
+ so you should use this option only where necessary. The relevant
511
+ flag is <computeroutput>-s</computeroutput>.</para>
512
+
513
+ <para>In general, try and use the largest block size memory
514
+ constraints allow, since that maximises the compression achieved.
515
+ Compression and decompression speed are virtually unaffected by
516
+ block size.</para>
517
+
518
+ <para>Another significant point applies to files which fit in a
519
+ single block -- that means most files you'd encounter using a
520
+ large block size. The amount of real memory touched is
521
+ proportional to the size of the file, since the file is smaller
522
+ than a block. For example, compressing a file 20,000 bytes long
523
+ with the flag <computeroutput>-9</computeroutput> will cause the
524
+ compressor to allocate around 7600k of memory, but only touch
525
+ 400k + 20000 * 8 = 560 kbytes of it. Similarly, the decompressor
526
+ will allocate 3700k but only touch 100k + 20000 * 4 = 180
527
+ kbytes.</para>
528
+
529
+ <para>Here is a table which summarises the maximum memory usage
530
+ for different block sizes. Also recorded is the total compressed
531
+ size for 14 files of the Calgary Text Compression Corpus
532
+ totalling 3,141,622 bytes. This column gives some feel for how
533
+ compression varies with block size. These figures tend to
534
+ understate the advantage of larger block sizes for larger files,
535
+ since the Corpus is dominated by smaller files.</para>
536
+
537
+ <programlisting>
538
+ Compress Decompress Decompress Corpus
539
+ Flag usage usage -s usage Size
540
+
541
+ -1 1200k 500k 350k 914704
542
+ -2 2000k 900k 600k 877703
543
+ -3 2800k 1300k 850k 860338
544
+ -4 3600k 1700k 1100k 846899
545
+ -5 4400k 2100k 1350k 845160
546
+ -6 5200k 2500k 1600k 838626
547
+ -7 6100k 2900k 1850k 834096
548
+ -8 6800k 3300k 2100k 828642
549
+ -9 7600k 3700k 2350k 828642
550
+ </programlisting>
551
+
552
+ </sect1>
553
+
554
+
555
+ <sect1 id="recovering" xreflabel="RECOVERING DATA FROM DAMAGED FILES">
556
+ <title>RECOVERING DATA FROM DAMAGED FILES</title>
557
+
558
+ <para><computeroutput>bzip2</computeroutput> compresses files in
559
+ blocks, usually 900kbytes long. Each block is handled
560
+ independently. If a media or transmission error causes a
561
+ multi-block <computeroutput>.bz2</computeroutput> file to become
562
+ damaged, it may be possible to recover data from the undamaged
563
+ blocks in the file.</para>
564
+
565
+ <para>The compressed representation of each block is delimited by
566
+ a 48-bit pattern, which makes it possible to find the block
567
+ boundaries with reasonable certainty. Each block also carries
568
+ its own 32-bit CRC, so damaged blocks can be distinguished from
569
+ undamaged ones.</para>
570
+
571
+ <para><computeroutput>bzip2recover</computeroutput> is a simple
572
+ program whose purpose is to search for blocks in
573
+ <computeroutput>.bz2</computeroutput> files, and write each block
574
+ out into its own <computeroutput>.bz2</computeroutput> file. You
575
+ can then use <computeroutput>bzip2 -t</computeroutput> to test
576
+ the integrity of the resulting files, and decompress those which
577
+ are undamaged.</para>
578
+
579
+ <para><computeroutput>bzip2recover</computeroutput> takes a
580
+ single argument, the name of the damaged file, and writes a
581
+ number of files <computeroutput>rec0001file.bz2</computeroutput>,
582
+ <computeroutput>rec0002file.bz2</computeroutput>, etc, containing
583
+ the extracted blocks. The output filenames are designed so that
584
+ the use of wildcards in subsequent processing -- for example,
585
+ <computeroutput>bzip2 -dc rec*file.bz2 &#62;
586
+ recovered_data</computeroutput> -- lists the files in the correct
587
+ order.</para>
588
+
589
+ <para><computeroutput>bzip2recover</computeroutput> should be of
590
+ most use dealing with large <computeroutput>.bz2</computeroutput>
591
+ files, as these will contain many blocks. It is clearly futile
592
+ to use it on damaged single-block files, since a damaged block
593
+ cannot be recovered. If you wish to minimise any potential data
594
+ loss through media or transmission errors, you might consider
595
+ compressing with a smaller block size.</para>
596
+
597
+ </sect1>
598
+
599
+
600
+ <sect1 id="performance" xreflabel="PERFORMANCE NOTES">
601
+ <title>PERFORMANCE NOTES</title>
602
+
603
+ <para>The sorting phase of compression gathers together similar
604
+ strings in the file. Because of this, files containing very long
605
+ runs of repeated symbols, like "aabaabaabaab ..." (repeated
606
+ several hundred times) may compress more slowly than normal.
607
+ Versions 0.9.5 and above fare much better than previous versions
608
+ in this respect. The ratio between worst-case and average-case
609
+ compression time is in the region of 10:1. For previous
610
+ versions, this figure was more like 100:1. You can use the
611
+ <computeroutput>-vvvv</computeroutput> option to monitor progress
612
+ in great detail, if you want.</para>
613
+
614
+ <para>Decompression speed is unaffected by these
615
+ phenomena.</para>
616
+
617
+ <para><computeroutput>bzip2</computeroutput> usually allocates
618
+ several megabytes of memory to operate in, and then charges all
619
+ over it in a fairly random fashion. This means that performance,
620
+ both for compressing and decompressing, is largely determined by
621
+ the speed at which your machine can service cache misses.
622
+ Because of this, small changes to the code to reduce the miss
623
+ rate have been observed to give disproportionately large
624
+ performance improvements. I imagine
625
+ <computeroutput>bzip2</computeroutput> will perform best on
626
+ machines with very large caches.</para>
627
+
628
+ </sect1>
629
+
630
+
631
+
632
+ <sect1 id="caveats" xreflabel="CAVEATS">
633
+ <title>CAVEATS</title>
634
+
635
+ <para>I/O error messages are not as helpful as they could be.
636
+ <computeroutput>bzip2</computeroutput> tries hard to detect I/O
637
+ errors and exit cleanly, but the details of what the problem is
638
+ sometimes seem rather misleading.</para>
639
+
640
+ <para>This manual page pertains to version &bz-version; of
641
+ <computeroutput>bzip2</computeroutput>. Compressed data created by
642
+ this version is entirely forwards and backwards compatible with the
643
+ previous public releases, versions 0.1pl2, 0.9.0 and 0.9.5, 1.0.0,
644
+ 1.0.1, 1.0.2 and 1.0.3, but with the following exception: 0.9.0 and
645
+ above can correctly decompress multiple concatenated compressed files.
646
+ 0.1pl2 cannot do this; it will stop after decompressing just the first
647
+ file in the stream.</para>
648
+
649
+ <para><computeroutput>bzip2recover</computeroutput> versions
650
+ prior to 1.0.2 used 32-bit integers to represent bit positions in
651
+ compressed files, so it could not handle compressed files more
652
+ than 512 megabytes long. Versions 1.0.2 and above use 64-bit ints
653
+ on some platforms which support them (GNU supported targets, and
654
+ Windows). To establish whether or not
655
+ <computeroutput>bzip2recover</computeroutput> was built with such
656
+ a limitation, run it without arguments. In any event you can
657
+ build yourself an unlimited version if you can recompile it with
658
+ <computeroutput>MaybeUInt64</computeroutput> set to be an
659
+ unsigned 64-bit integer.</para>
660
+
661
+ </sect1>
662
+
663
+
664
+
665
+ <sect1 id="author" xreflabel="AUTHOR">
666
+ <title>AUTHOR</title>
667
+
668
+ <para>Julian Seward,
669
+ <computeroutput>&bz-author;</computeroutput></para>
670
+
671
+ <para>The ideas embodied in
672
+ <computeroutput>bzip2</computeroutput> are due to (at least) the
673
+ following people: Michael Burrows and David Wheeler (for the
674
+ block sorting transformation), David Wheeler (again, for the
675
+ Huffman coder), Peter Fenwick (for the structured coding model in
676
+ the original <computeroutput>bzip</computeroutput>, and many
677
+ refinements), and Alistair Moffat, Radford Neal and Ian Witten
678
+ (for the arithmetic coder in the original
679
+ <computeroutput>bzip</computeroutput>). I am much indebted for
680
+ their help, support and advice. See the manual in the source
681
+ distribution for pointers to sources of documentation. Christian
682
+ von Roques encouraged me to look for faster sorting algorithms,
683
+ so as to speed up compression. Bela Lubkin encouraged me to
684
+ improve the worst-case compression performance.
685
+ Donna Robinson XMLised the documentation.
686
+ Many people sent
687
+ patches, helped with portability problems, lent machines, gave
688
+ advice and were generally helpful.</para>
689
+
690
+ </sect1>
691
+
692
+ </chapter>
693
+
694
+
695
+
696
+ <chapter id="libprog" xreflabel="Programming with libbzip2">
697
+ <title>
698
+ Programming with <computeroutput>libbzip2</computeroutput>
699
+ </title>
700
+
701
+ <para>This chapter describes the programming interface to
702
+ <computeroutput>libbzip2</computeroutput>.</para>
703
+
704
+ <para>For general background information, particularly about
705
+ memory use and performance aspects, you'd be well advised to read
706
+ <xref linkend="using"/> as well.</para>
707
+
708
+
709
+ <sect1 id="top-level" xreflabel="Top-level structure">
710
+ <title>Top-level structure</title>
711
+
712
+ <para><computeroutput>libbzip2</computeroutput> is a flexible
713
+ library for compressing and decompressing data in the
714
+ <computeroutput>bzip2</computeroutput> data format. Although
715
+ packaged as a single entity, it helps to regard the library as
716
+ three separate parts: the low level interface, and the high level
717
+ interface, and some utility functions.</para>
718
+
719
+ <para>The structure of
720
+ <computeroutput>libbzip2</computeroutput>'s interfaces is similar
721
+ to that of Jean-loup Gailly's and Mark Adler's excellent
722
+ <computeroutput>zlib</computeroutput> library.</para>
723
+
724
+ <para>All externally visible symbols have names beginning
725
+ <computeroutput>BZ2_</computeroutput>. This is new in version
726
+ 1.0. The intention is to minimise pollution of the namespaces of
727
+ library clients.</para>
728
+
729
+ <para>To use any part of the library, you need to
730
+ <computeroutput>#include &lt;bzlib.h&gt;</computeroutput>
731
+ into your sources.</para>
732
+
733
+
734
+
735
+ <sect2 id="ll-summary" xreflabel="Low-level summary">
736
+ <title>Low-level summary</title>
737
+
738
+ <para>This interface provides services for compressing and
739
+ decompressing data in memory. There's no provision for dealing
740
+ with files, streams or any other I/O mechanisms, just straight
741
+ memory-to-memory work. In fact, this part of the library can be
742
+ compiled without inclusion of
743
+ <computeroutput>stdio.h</computeroutput>, which may be helpful
744
+ for embedded applications.</para>
745
+
746
+ <para>The low-level part of the library has no global variables
747
+ and is therefore thread-safe.</para>
748
+
749
+ <para>Six routines make up the low level interface:
750
+ <computeroutput>BZ2_bzCompressInit</computeroutput>,
751
+ <computeroutput>BZ2_bzCompress</computeroutput>, and
752
+ <computeroutput>BZ2_bzCompressEnd</computeroutput> for
753
+ compression, and a corresponding trio
754
+ <computeroutput>BZ2_bzDecompressInit</computeroutput>,
755
+ <computeroutput>BZ2_bzDecompress</computeroutput> and
756
+ <computeroutput>BZ2_bzDecompressEnd</computeroutput> for
757
+ decompression. The <computeroutput>*Init</computeroutput>
758
+ functions allocate memory for compression/decompression and do
759
+ other initialisations, whilst the
760
+ <computeroutput>*End</computeroutput> functions close down
761
+ operations and release memory.</para>
762
+
763
+ <para>The real work is done by
764
+ <computeroutput>BZ2_bzCompress</computeroutput> and
765
+ <computeroutput>BZ2_bzDecompress</computeroutput>. These
766
+ compress and decompress data from a user-supplied input buffer to
767
+ a user-supplied output buffer. These buffers can be any size;
768
+ arbitrary quantities of data are handled by making repeated calls
769
+ to these functions. This is a flexible mechanism allowing a
770
+ consumer-pull style of activity, or producer-push, or a mixture
771
+ of both.</para>
772
+
773
+ </sect2>
774
+
775
+
776
+ <sect2 id="hl-summary" xreflabel="High-level summary">
777
+ <title>High-level summary</title>
778
+
779
+ <para>This interface provides some handy wrappers around the
780
+ low-level interface to facilitate reading and writing
781
+ <computeroutput>bzip2</computeroutput> format files
782
+ (<computeroutput>.bz2</computeroutput> files). The routines
783
+ provide hooks to facilitate reading files in which the
784
+ <computeroutput>bzip2</computeroutput> data stream is embedded
785
+ within some larger-scale file structure, or where there are
786
+ multiple <computeroutput>bzip2</computeroutput> data streams
787
+ concatenated end-to-end.</para>
788
+
789
+ <para>For reading files,
790
+ <computeroutput>BZ2_bzReadOpen</computeroutput>,
791
+ <computeroutput>BZ2_bzRead</computeroutput>,
792
+ <computeroutput>BZ2_bzReadClose</computeroutput> and
793
+ <computeroutput>BZ2_bzReadGetUnused</computeroutput> are
794
+ supplied. For writing files,
795
+ <computeroutput>BZ2_bzWriteOpen</computeroutput>,
796
+ <computeroutput>BZ2_bzWrite</computeroutput> and
797
+ <computeroutput>BZ2_bzWriteFinish</computeroutput> are
798
+ available.</para>
799
+
800
+ <para>As with the low-level library, no global variables are used
801
+ so the library is per se thread-safe. However, if I/O errors
802
+ occur whilst reading or writing the underlying compressed files,
803
+ you may have to consult <computeroutput>errno</computeroutput> to
804
+ determine the cause of the error. In that case, you'd need a C
805
+ library which correctly supports
806
+ <computeroutput>errno</computeroutput> in a multithreaded
807
+ environment.</para>
808
+
809
+ <para>To make the library a little simpler and more portable,
810
+ <computeroutput>BZ2_bzReadOpen</computeroutput> and
811
+ <computeroutput>BZ2_bzWriteOpen</computeroutput> require you to
812
+ pass them file handles (<computeroutput>FILE*</computeroutput>s)
813
+ which have previously been opened for reading or writing
814
+ respectively. That avoids portability problems associated with
815
+ file operations and file attributes, whilst not being much of an
816
+ imposition on the programmer.</para>
817
+
818
+ </sect2>
819
+
820
+
821
+ <sect2 id="util-fns-summary" xreflabel="Utility functions summary">
822
+ <title>Utility functions summary</title>
823
+
824
+ <para>For very simple needs,
825
+ <computeroutput>BZ2_bzBuffToBuffCompress</computeroutput> and
826
+ <computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput> are
827
+ provided. These compress data in memory from one buffer to
828
+ another buffer in a single function call. You should assess
829
+ whether these functions fulfill your memory-to-memory
830
+ compression/decompression requirements before investing effort in
831
+ understanding the more general but more complex low-level
832
+ interface.</para>
833
+
834
+ <para>Yoshioka Tsuneo
835
+ (<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>) has
836
+ contributed some functions to give better
837
+ <computeroutput>zlib</computeroutput> compatibility. These
838
+ functions are <computeroutput>BZ2_bzopen</computeroutput>,
839
+ <computeroutput>BZ2_bzread</computeroutput>,
840
+ <computeroutput>BZ2_bzwrite</computeroutput>,
841
+ <computeroutput>BZ2_bzflush</computeroutput>,
842
+ <computeroutput>BZ2_bzclose</computeroutput>,
843
+ <computeroutput>BZ2_bzerror</computeroutput> and
844
+ <computeroutput>BZ2_bzlibVersion</computeroutput>. You may find
845
+ these functions more convenient for simple file reading and
846
+ writing, than those in the high-level interface. These functions
847
+ are not (yet) officially part of the library, and are minimally
848
+ documented here. If they break, you get to keep all the pieces.
849
+ I hope to document them properly when time permits.</para>
850
+
851
+ <para>Yoshioka also contributed modifications to allow the
852
+ library to be built as a Windows DLL.</para>
853
+
854
+ </sect2>
855
+
856
+ </sect1>
857
+
858
+
859
+ <sect1 id="err-handling" xreflabel="Error handling">
860
+ <title>Error handling</title>
861
+
862
+ <para>The library is designed to recover cleanly in all
863
+ situations, including the worst-case situation of decompressing
864
+ random data. I'm not 100% sure that it can always do this, so
865
+ you might want to add a signal handler to catch segmentation
866
+ violations during decompression if you are feeling especially
867
+ paranoid. I would be interested in hearing more about the
868
+ robustness of the library to corrupted compressed data.</para>
869
+
870
+ <para>Version 1.0.3 more robust in this respect than any
871
+ previous version. Investigations with Valgrind (a tool for detecting
872
+ problems with memory management) indicate
873
+ that, at least for the few files I tested, all single-bit errors
874
+ in the decompressed data are caught properly, with no
875
+ segmentation faults, no uses of uninitialised data, no out of
876
+ range reads or writes, and no infinite looping in the decompressor.
877
+ So it's certainly pretty robust, although
878
+ I wouldn't claim it to be totally bombproof.</para>
879
+
880
+ <para>The file <computeroutput>bzlib.h</computeroutput> contains
881
+ all definitions needed to use the library. In particular, you
882
+ should definitely not include
883
+ <computeroutput>bzlib_private.h</computeroutput>.</para>
884
+
885
+ <para>In <computeroutput>bzlib.h</computeroutput>, the various
886
+ return values are defined. The following list is not intended as
887
+ an exhaustive description of the circumstances in which a given
888
+ value may be returned -- those descriptions are given later.
889
+ Rather, it is intended to convey the rough meaning of each return
890
+ value. The first five actions are normal and not intended to
891
+ denote an error situation.</para>
892
+
893
+ <variablelist>
894
+
895
+ <varlistentry>
896
+ <term><computeroutput>BZ_OK</computeroutput></term>
897
+ <listitem><para>The requested action was completed
898
+ successfully.</para></listitem>
899
+ </varlistentry>
900
+
901
+ <varlistentry>
902
+ <term><computeroutput>BZ_RUN_OK, BZ_FLUSH_OK,
903
+ BZ_FINISH_OK</computeroutput></term>
904
+ <listitem><para>In
905
+ <computeroutput>BZ2_bzCompress</computeroutput>, the requested
906
+ flush/finish/nothing-special action was completed
907
+ successfully.</para></listitem>
908
+ </varlistentry>
909
+
910
+ <varlistentry>
911
+ <term><computeroutput>BZ_STREAM_END</computeroutput></term>
912
+ <listitem><para>Compression of data was completed, or the
913
+ logical stream end was detected during
914
+ decompression.</para></listitem>
915
+ </varlistentry>
916
+
917
+ </variablelist>
918
+
919
+ <para>The following return values indicate an error of some
920
+ kind.</para>
921
+
922
+ <variablelist>
923
+
924
+ <varlistentry>
925
+ <term><computeroutput>BZ_CONFIG_ERROR</computeroutput></term>
926
+ <listitem><para>Indicates that the library has been improperly
927
+ compiled on your platform -- a major configuration error.
928
+ Specifically, it means that
929
+ <computeroutput>sizeof(char)</computeroutput>,
930
+ <computeroutput>sizeof(short)</computeroutput> and
931
+ <computeroutput>sizeof(int)</computeroutput> are not 1, 2 and
932
+ 4 respectively, as they should be. Note that the library
933
+ should still work properly on 64-bit platforms which follow
934
+ the LP64 programming model -- that is, where
935
+ <computeroutput>sizeof(long)</computeroutput> and
936
+ <computeroutput>sizeof(void*)</computeroutput> are 8. Under
937
+ LP64, <computeroutput>sizeof(int)</computeroutput> is still 4,
938
+ so <computeroutput>libbzip2</computeroutput>, which doesn't
939
+ use the <computeroutput>long</computeroutput> type, is
940
+ OK.</para></listitem>
941
+ </varlistentry>
942
+
943
+ <varlistentry>
944
+ <term><computeroutput>BZ_SEQUENCE_ERROR</computeroutput></term>
945
+ <listitem><para>When using the library, it is important to call
946
+ the functions in the correct sequence and with data structures
947
+ (buffers etc) in the correct states.
948
+ <computeroutput>libbzip2</computeroutput> checks as much as it
949
+ can to ensure this is happening, and returns
950
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput> if not.
951
+ Code which complies precisely with the function semantics, as
952
+ detailed below, should never receive this value; such an event
953
+ denotes buggy code which you should
954
+ investigate.</para></listitem>
955
+ </varlistentry>
956
+
957
+ <varlistentry>
958
+ <term><computeroutput>BZ_PARAM_ERROR</computeroutput></term>
959
+ <listitem><para>Returned when a parameter to a function call is
960
+ out of range or otherwise manifestly incorrect. As with
961
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput>, this
962
+ denotes a bug in the client code. The distinction between
963
+ <computeroutput>BZ_PARAM_ERROR</computeroutput> and
964
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput> is a bit
965
+ hazy, but still worth making.</para></listitem>
966
+ </varlistentry>
967
+
968
+ <varlistentry>
969
+ <term><computeroutput>BZ_MEM_ERROR</computeroutput></term>
970
+ <listitem><para>Returned when a request to allocate memory
971
+ failed. Note that the quantity of memory needed to decompress
972
+ a stream cannot be determined until the stream's header has
973
+ been read. So
974
+ <computeroutput>BZ2_bzDecompress</computeroutput> and
975
+ <computeroutput>BZ2_bzRead</computeroutput> may return
976
+ <computeroutput>BZ_MEM_ERROR</computeroutput> even though some
977
+ of the compressed data has been read. The same is not true
978
+ for compression; once
979
+ <computeroutput>BZ2_bzCompressInit</computeroutput> or
980
+ <computeroutput>BZ2_bzWriteOpen</computeroutput> have
981
+ successfully completed,
982
+ <computeroutput>BZ_MEM_ERROR</computeroutput> cannot
983
+ occur.</para></listitem>
984
+ </varlistentry>
985
+
986
+ <varlistentry>
987
+ <term><computeroutput>BZ_DATA_ERROR</computeroutput></term>
988
+ <listitem><para>Returned when a data integrity error is
989
+ detected during decompression. Most importantly, this means
990
+ when stored and computed CRCs for the data do not match. This
991
+ value is also returned upon detection of any other anomaly in
992
+ the compressed data.</para></listitem>
993
+ </varlistentry>
994
+
995
+ <varlistentry>
996
+ <term><computeroutput>BZ_DATA_ERROR_MAGIC</computeroutput></term>
997
+ <listitem><para>As a special case of
998
+ <computeroutput>BZ_DATA_ERROR</computeroutput>, it is
999
+ sometimes useful to know when the compressed stream does not
1000
+ start with the correct magic bytes (<computeroutput>'B' 'Z'
1001
+ 'h'</computeroutput>).</para></listitem>
1002
+ </varlistentry>
1003
+
1004
+ <varlistentry>
1005
+ <term><computeroutput>BZ_IO_ERROR</computeroutput></term>
1006
+ <listitem><para>Returned by
1007
+ <computeroutput>BZ2_bzRead</computeroutput> and
1008
+ <computeroutput>BZ2_bzWrite</computeroutput> when there is an
1009
+ error reading or writing in the compressed file, and by
1010
+ <computeroutput>BZ2_bzReadOpen</computeroutput> and
1011
+ <computeroutput>BZ2_bzWriteOpen</computeroutput> for attempts
1012
+ to use a file for which the error indicator (viz,
1013
+ <computeroutput>ferror(f)</computeroutput>) is set. On
1014
+ receipt of <computeroutput>BZ_IO_ERROR</computeroutput>, the
1015
+ caller should consult <computeroutput>errno</computeroutput>
1016
+ and/or <computeroutput>perror</computeroutput> to acquire
1017
+ operating-system specific information about the
1018
+ problem.</para></listitem>
1019
+ </varlistentry>
1020
+
1021
+ <varlistentry>
1022
+ <term><computeroutput>BZ_UNEXPECTED_EOF</computeroutput></term>
1023
+ <listitem><para>Returned by
1024
+ <computeroutput>BZ2_bzRead</computeroutput> when the
1025
+ compressed file finishes before the logical end of stream is
1026
+ detected.</para></listitem>
1027
+ </varlistentry>
1028
+
1029
+ <varlistentry>
1030
+ <term><computeroutput>BZ_OUTBUFF_FULL</computeroutput></term>
1031
+ <listitem><para>Returned by
1032
+ <computeroutput>BZ2_bzBuffToBuffCompress</computeroutput> and
1033
+ <computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput> to
1034
+ indicate that the output data will not fit into the output
1035
+ buffer provided.</para></listitem>
1036
+ </varlistentry>
1037
+
1038
+ </variablelist>
1039
+
1040
+ </sect1>
1041
+
1042
+
1043
+
1044
+ <sect1 id="low-level" xreflabel=">Low-level interface">
1045
+ <title>Low-level interface</title>
1046
+
1047
+
1048
+ <sect2 id="bzcompress-init" xreflabel="BZ2_bzCompressInit">
1049
+ <title>BZ2_bzCompressInit</title>
1050
+
1051
+ <programlisting>
1052
+ typedef struct {
1053
+ char *next_in;
1054
+ unsigned int avail_in;
1055
+ unsigned int total_in_lo32;
1056
+ unsigned int total_in_hi32;
1057
+
1058
+ char *next_out;
1059
+ unsigned int avail_out;
1060
+ unsigned int total_out_lo32;
1061
+ unsigned int total_out_hi32;
1062
+
1063
+ void *state;
1064
+
1065
+ void *(*bzalloc)(void *,int,int);
1066
+ void (*bzfree)(void *,void *);
1067
+ void *opaque;
1068
+ } bz_stream;
1069
+
1070
+ int BZ2_bzCompressInit ( bz_stream *strm,
1071
+ int blockSize100k,
1072
+ int verbosity,
1073
+ int workFactor );
1074
+ </programlisting>
1075
+
1076
+ <para>Prepares for compression. The
1077
+ <computeroutput>bz_stream</computeroutput> structure holds all
1078
+ data pertaining to the compression activity. A
1079
+ <computeroutput>bz_stream</computeroutput> structure should be
1080
+ allocated and initialised prior to the call. The fields of
1081
+ <computeroutput>bz_stream</computeroutput> comprise the entirety
1082
+ of the user-visible data. <computeroutput>state</computeroutput>
1083
+ is a pointer to the private data structures required for
1084
+ compression.</para>
1085
+
1086
+ <para>Custom memory allocators are supported, via fields
1087
+ <computeroutput>bzalloc</computeroutput>,
1088
+ <computeroutput>bzfree</computeroutput>, and
1089
+ <computeroutput>opaque</computeroutput>. The value
1090
+ <computeroutput>opaque</computeroutput> is passed to as the first
1091
+ argument to all calls to <computeroutput>bzalloc</computeroutput>
1092
+ and <computeroutput>bzfree</computeroutput>, but is otherwise
1093
+ ignored by the library. The call <computeroutput>bzalloc (
1094
+ opaque, n, m )</computeroutput> is expected to return a pointer
1095
+ <computeroutput>p</computeroutput> to <computeroutput>n *
1096
+ m</computeroutput> bytes of memory, and <computeroutput>bzfree (
1097
+ opaque, p )</computeroutput> should free that memory.</para>
1098
+
1099
+ <para>If you don't want to use a custom memory allocator, set
1100
+ <computeroutput>bzalloc</computeroutput>,
1101
+ <computeroutput>bzfree</computeroutput> and
1102
+ <computeroutput>opaque</computeroutput> to
1103
+ <computeroutput>NULL</computeroutput>, and the library will then
1104
+ use the standard <computeroutput>malloc</computeroutput> /
1105
+ <computeroutput>free</computeroutput> routines.</para>
1106
+
1107
+ <para>Before calling
1108
+ <computeroutput>BZ2_bzCompressInit</computeroutput>, fields
1109
+ <computeroutput>bzalloc</computeroutput>,
1110
+ <computeroutput>bzfree</computeroutput> and
1111
+ <computeroutput>opaque</computeroutput> should be filled
1112
+ appropriately, as just described. Upon return, the internal
1113
+ state will have been allocated and initialised, and
1114
+ <computeroutput>total_in_lo32</computeroutput>,
1115
+ <computeroutput>total_in_hi32</computeroutput>,
1116
+ <computeroutput>total_out_lo32</computeroutput> and
1117
+ <computeroutput>total_out_hi32</computeroutput> will have been
1118
+ set to zero. These four fields are used by the library to inform
1119
+ the caller of the total amount of data passed into and out of the
1120
+ library, respectively. You should not try to change them. As of
1121
+ version 1.0, 64-bit counts are maintained, even on 32-bit
1122
+ platforms, using the <computeroutput>_hi32</computeroutput>
1123
+ fields to store the upper 32 bits of the count. So, for example,
1124
+ the total amount of data in is <computeroutput>(total_in_hi32
1125
+ &#60;&#60; 32) + total_in_lo32</computeroutput>.</para>
1126
+
1127
+ <para>Parameter <computeroutput>blockSize100k</computeroutput>
1128
+ specifies the block size to be used for compression. It should
1129
+ be a value between 1 and 9 inclusive, and the actual block size
1130
+ used is 100000 x this figure. 9 gives the best compression but
1131
+ takes most memory.</para>
1132
+
1133
+ <para>Parameter <computeroutput>verbosity</computeroutput> should
1134
+ be set to a number between 0 and 4 inclusive. 0 is silent, and
1135
+ greater numbers give increasingly verbose monitoring/debugging
1136
+ output. If the library has been compiled with
1137
+ <computeroutput>-DBZ_NO_STDIO</computeroutput>, no such output
1138
+ will appear for any verbosity setting.</para>
1139
+
1140
+ <para>Parameter <computeroutput>workFactor</computeroutput>
1141
+ controls how the compression phase behaves when presented with
1142
+ worst case, highly repetitive, input data. If compression runs
1143
+ into difficulties caused by repetitive data, the library switches
1144
+ from the standard sorting algorithm to a fallback algorithm. The
1145
+ fallback is slower than the standard algorithm by perhaps a
1146
+ factor of three, but always behaves reasonably, no matter how bad
1147
+ the input.</para>
1148
+
1149
+ <para>Lower values of <computeroutput>workFactor</computeroutput>
1150
+ reduce the amount of effort the standard algorithm will expend
1151
+ before resorting to the fallback. You should set this parameter
1152
+ carefully; too low, and many inputs will be handled by the
1153
+ fallback algorithm and so compress rather slowly, too high, and
1154
+ your average-to-worst case compression times can become very
1155
+ large. The default value of 30 gives reasonable behaviour over a
1156
+ wide range of circumstances.</para>
1157
+
1158
+ <para>Allowable values range from 0 to 250 inclusive. 0 is a
1159
+ special case, equivalent to using the default value of 30.</para>
1160
+
1161
+ <para>Note that the compressed output generated is the same
1162
+ regardless of whether or not the fallback algorithm is
1163
+ used.</para>
1164
+
1165
+ <para>Be aware also that this parameter may disappear entirely in
1166
+ future versions of the library. In principle it should be
1167
+ possible to devise a good way to automatically choose which
1168
+ algorithm to use. Such a mechanism would render the parameter
1169
+ obsolete.</para>
1170
+
1171
+ <para>Possible return values:</para>
1172
+
1173
+ <programlisting>
1174
+ BZ_CONFIG_ERROR
1175
+ if the library has been mis-compiled
1176
+ BZ_PARAM_ERROR
1177
+ if strm is NULL
1178
+ or blockSize < 1 or blockSize > 9
1179
+ or verbosity < 0 or verbosity > 4
1180
+ or workFactor < 0 or workFactor > 250
1181
+ BZ_MEM_ERROR
1182
+ if not enough memory is available
1183
+ BZ_OK
1184
+ otherwise
1185
+ </programlisting>
1186
+
1187
+ <para>Allowable next actions:</para>
1188
+
1189
+ <programlisting>
1190
+ BZ2_bzCompress
1191
+ if BZ_OK is returned
1192
+ no specific action needed in case of error
1193
+ </programlisting>
1194
+
1195
+ </sect2>
1196
+
1197
+
1198
+ <sect2 id="bzCompress" xreflabel="BZ2_bzCompress">
1199
+ <title>BZ2_bzCompress</title>
1200
+
1201
+ <programlisting>
1202
+ int BZ2_bzCompress ( bz_stream *strm, int action );
1203
+ </programlisting>
1204
+
1205
+ <para>Provides more input and/or output buffer space for the
1206
+ library. The caller maintains input and output buffers, and
1207
+ calls <computeroutput>BZ2_bzCompress</computeroutput> to transfer
1208
+ data between them.</para>
1209
+
1210
+ <para>Before each call to
1211
+ <computeroutput>BZ2_bzCompress</computeroutput>,
1212
+ <computeroutput>next_in</computeroutput> should point at the data
1213
+ to be compressed, and <computeroutput>avail_in</computeroutput>
1214
+ should indicate how many bytes the library may read.
1215
+ <computeroutput>BZ2_bzCompress</computeroutput> updates
1216
+ <computeroutput>next_in</computeroutput>,
1217
+ <computeroutput>avail_in</computeroutput> and
1218
+ <computeroutput>total_in</computeroutput> to reflect the number
1219
+ of bytes it has read.</para>
1220
+
1221
+ <para>Similarly, <computeroutput>next_out</computeroutput> should
1222
+ point to a buffer in which the compressed data is to be placed,
1223
+ with <computeroutput>avail_out</computeroutput> indicating how
1224
+ much output space is available.
1225
+ <computeroutput>BZ2_bzCompress</computeroutput> updates
1226
+ <computeroutput>next_out</computeroutput>,
1227
+ <computeroutput>avail_out</computeroutput> and
1228
+ <computeroutput>total_out</computeroutput> to reflect the number
1229
+ of bytes output.</para>
1230
+
1231
+ <para>You may provide and remove as little or as much data as you
1232
+ like on each call of
1233
+ <computeroutput>BZ2_bzCompress</computeroutput>. In the limit,
1234
+ it is acceptable to supply and remove data one byte at a time,
1235
+ although this would be terribly inefficient. You should always
1236
+ ensure that at least one byte of output space is available at
1237
+ each call.</para>
1238
+
1239
+ <para>A second purpose of
1240
+ <computeroutput>BZ2_bzCompress</computeroutput> is to request a
1241
+ change of mode of the compressed stream.</para>
1242
+
1243
+ <para>Conceptually, a compressed stream can be in one of four
1244
+ states: IDLE, RUNNING, FLUSHING and FINISHING. Before
1245
+ initialisation
1246
+ (<computeroutput>BZ2_bzCompressInit</computeroutput>) and after
1247
+ termination (<computeroutput>BZ2_bzCompressEnd</computeroutput>),
1248
+ a stream is regarded as IDLE.</para>
1249
+
1250
+ <para>Upon initialisation
1251
+ (<computeroutput>BZ2_bzCompressInit</computeroutput>), the stream
1252
+ is placed in the RUNNING state. Subsequent calls to
1253
+ <computeroutput>BZ2_bzCompress</computeroutput> should pass
1254
+ <computeroutput>BZ_RUN</computeroutput> as the requested action;
1255
+ other actions are illegal and will result in
1256
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput>.</para>
1257
+
1258
+ <para>At some point, the calling program will have provided all
1259
+ the input data it wants to. It will then want to finish up -- in
1260
+ effect, asking the library to process any data it might have
1261
+ buffered internally. In this state,
1262
+ <computeroutput>BZ2_bzCompress</computeroutput> will no longer
1263
+ attempt to read data from
1264
+ <computeroutput>next_in</computeroutput>, but it will want to
1265
+ write data to <computeroutput>next_out</computeroutput>. Because
1266
+ the output buffer supplied by the user can be arbitrarily small,
1267
+ the finishing-up operation cannot necessarily be done with a
1268
+ single call of
1269
+ <computeroutput>BZ2_bzCompress</computeroutput>.</para>
1270
+
1271
+ <para>Instead, the calling program passes
1272
+ <computeroutput>BZ_FINISH</computeroutput> as an action to
1273
+ <computeroutput>BZ2_bzCompress</computeroutput>. This changes
1274
+ the stream's state to FINISHING. Any remaining input (ie,
1275
+ <computeroutput>next_in[0 .. avail_in-1]</computeroutput>) is
1276
+ compressed and transferred to the output buffer. To do this,
1277
+ <computeroutput>BZ2_bzCompress</computeroutput> must be called
1278
+ repeatedly until all the output has been consumed. At that
1279
+ point, <computeroutput>BZ2_bzCompress</computeroutput> returns
1280
+ <computeroutput>BZ_STREAM_END</computeroutput>, and the stream's
1281
+ state is set back to IDLE.
1282
+ <computeroutput>BZ2_bzCompressEnd</computeroutput> should then be
1283
+ called.</para>
1284
+
1285
+ <para>Just to make sure the calling program does not cheat, the
1286
+ library makes a note of <computeroutput>avail_in</computeroutput>
1287
+ at the time of the first call to
1288
+ <computeroutput>BZ2_bzCompress</computeroutput> which has
1289
+ <computeroutput>BZ_FINISH</computeroutput> as an action (ie, at
1290
+ the time the program has announced its intention to not supply
1291
+ any more input). By comparing this value with that of
1292
+ <computeroutput>avail_in</computeroutput> over subsequent calls
1293
+ to <computeroutput>BZ2_bzCompress</computeroutput>, the library
1294
+ can detect any attempts to slip in more data to compress. Any
1295
+ calls for which this is detected will return
1296
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput>. This
1297
+ indicates a programming mistake which should be corrected.</para>
1298
+
1299
+ <para>Instead of asking to finish, the calling program may ask
1300
+ <computeroutput>BZ2_bzCompress</computeroutput> to take all the
1301
+ remaining input, compress it and terminate the current
1302
+ (Burrows-Wheeler) compression block. This could be useful for
1303
+ error control purposes. The mechanism is analogous to that for
1304
+ finishing: call <computeroutput>BZ2_bzCompress</computeroutput>
1305
+ with an action of <computeroutput>BZ_FLUSH</computeroutput>,
1306
+ remove output data, and persist with the
1307
+ <computeroutput>BZ_FLUSH</computeroutput> action until the value
1308
+ <computeroutput>BZ_RUN</computeroutput> is returned. As with
1309
+ finishing, <computeroutput>BZ2_bzCompress</computeroutput>
1310
+ detects any attempt to provide more input data once the flush has
1311
+ begun.</para>
1312
+
1313
+ <para>Once the flush is complete, the stream returns to the
1314
+ normal RUNNING state.</para>
1315
+
1316
+ <para>This all sounds pretty complex, but isn't really. Here's a
1317
+ table which shows which actions are allowable in each state, what
1318
+ action will be taken, what the next state is, and what the
1319
+ non-error return values are. Note that you can't explicitly ask
1320
+ what state the stream is in, but nor do you need to -- it can be
1321
+ inferred from the values returned by
1322
+ <computeroutput>BZ2_bzCompress</computeroutput>.</para>
1323
+
1324
+ <programlisting>
1325
+ IDLE/any
1326
+ Illegal. IDLE state only exists after BZ2_bzCompressEnd or
1327
+ before BZ2_bzCompressInit.
1328
+ Return value = BZ_SEQUENCE_ERROR
1329
+
1330
+ RUNNING/BZ_RUN
1331
+ Compress from next_in to next_out as much as possible.
1332
+ Next state = RUNNING
1333
+ Return value = BZ_RUN_OK
1334
+
1335
+ RUNNING/BZ_FLUSH
1336
+ Remember current value of next_in. Compress from next_in
1337
+ to next_out as much as possible, but do not accept any more input.
1338
+ Next state = FLUSHING
1339
+ Return value = BZ_FLUSH_OK
1340
+
1341
+ RUNNING/BZ_FINISH
1342
+ Remember current value of next_in. Compress from next_in
1343
+ to next_out as much as possible, but do not accept any more input.
1344
+ Next state = FINISHING
1345
+ Return value = BZ_FINISH_OK
1346
+
1347
+ FLUSHING/BZ_FLUSH
1348
+ Compress from next_in to next_out as much as possible,
1349
+ but do not accept any more input.
1350
+ If all the existing input has been used up and all compressed
1351
+ output has been removed
1352
+ Next state = RUNNING; Return value = BZ_RUN_OK
1353
+ else
1354
+ Next state = FLUSHING; Return value = BZ_FLUSH_OK
1355
+
1356
+ FLUSHING/other
1357
+ Illegal.
1358
+ Return value = BZ_SEQUENCE_ERROR
1359
+
1360
+ FINISHING/BZ_FINISH
1361
+ Compress from next_in to next_out as much as possible,
1362
+ but to not accept any more input.
1363
+ If all the existing input has been used up and all compressed
1364
+ output has been removed
1365
+ Next state = IDLE; Return value = BZ_STREAM_END
1366
+ else
1367
+ Next state = FINISHING; Return value = BZ_FINISH_OK
1368
+
1369
+ FINISHING/other
1370
+ Illegal.
1371
+ Return value = BZ_SEQUENCE_ERROR
1372
+ </programlisting>
1373
+
1374
+
1375
+ <para>That still looks complicated? Well, fair enough. The
1376
+ usual sequence of calls for compressing a load of data is:</para>
1377
+
1378
+ <orderedlist>
1379
+
1380
+ <listitem><para>Get started with
1381
+ <computeroutput>BZ2_bzCompressInit</computeroutput>.</para></listitem>
1382
+
1383
+ <listitem><para>Shovel data in and shlurp out its compressed form
1384
+ using zero or more calls of
1385
+ <computeroutput>BZ2_bzCompress</computeroutput> with action =
1386
+ <computeroutput>BZ_RUN</computeroutput>.</para></listitem>
1387
+
1388
+ <listitem><para>Finish up. Repeatedly call
1389
+ <computeroutput>BZ2_bzCompress</computeroutput> with action =
1390
+ <computeroutput>BZ_FINISH</computeroutput>, copying out the
1391
+ compressed output, until
1392
+ <computeroutput>BZ_STREAM_END</computeroutput> is
1393
+ returned.</para></listitem> <listitem><para>Close up and go home. Call
1394
+ <computeroutput>BZ2_bzCompressEnd</computeroutput>.</para></listitem>
1395
+
1396
+ </orderedlist>
1397
+
1398
+ <para>If the data you want to compress fits into your input
1399
+ buffer all at once, you can skip the calls of
1400
+ <computeroutput>BZ2_bzCompress ( ..., BZ_RUN )</computeroutput>
1401
+ and just do the <computeroutput>BZ2_bzCompress ( ..., BZ_FINISH
1402
+ )</computeroutput> calls.</para>
1403
+
1404
+ <para>All required memory is allocated by
1405
+ <computeroutput>BZ2_bzCompressInit</computeroutput>. The
1406
+ compression library can accept any data at all (obviously). So
1407
+ you shouldn't get any error return values from the
1408
+ <computeroutput>BZ2_bzCompress</computeroutput> calls. If you
1409
+ do, they will be
1410
+ <computeroutput>BZ_SEQUENCE_ERROR</computeroutput>, and indicate
1411
+ a bug in your programming.</para>
1412
+
1413
+ <para>Trivial other possible return values:</para>
1414
+
1415
+ <programlisting>
1416
+ BZ_PARAM_ERROR
1417
+ if strm is NULL, or strm->s is NULL
1418
+ </programlisting>
1419
+
1420
+ </sect2>
1421
+
1422
+
1423
+ <sect2 id="bzCompress-end" xreflabel="BZ2_bzCompressEnd">
1424
+ <title>BZ2_bzCompressEnd</title>
1425
+
1426
+ <programlisting>
1427
+ int BZ2_bzCompressEnd ( bz_stream *strm );
1428
+ </programlisting>
1429
+
1430
+ <para>Releases all memory associated with a compression
1431
+ stream.</para>
1432
+
1433
+ <para>Possible return values:</para>
1434
+
1435
+ <programlisting>
1436
+ BZ_PARAM_ERROR if strm is NULL or strm->s is NULL
1437
+ BZ_OK otherwise
1438
+ </programlisting>
1439
+
1440
+ </sect2>
1441
+
1442
+
1443
+ <sect2 id="bzDecompress-init" xreflabel="BZ2_bzDecompressInit">
1444
+ <title>BZ2_bzDecompressInit</title>
1445
+
1446
+ <programlisting>
1447
+ int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );
1448
+ </programlisting>
1449
+
1450
+ <para>Prepares for decompression. As with
1451
+ <computeroutput>BZ2_bzCompressInit</computeroutput>, a
1452
+ <computeroutput>bz_stream</computeroutput> record should be
1453
+ allocated and initialised before the call. Fields
1454
+ <computeroutput>bzalloc</computeroutput>,
1455
+ <computeroutput>bzfree</computeroutput> and
1456
+ <computeroutput>opaque</computeroutput> should be set if a custom
1457
+ memory allocator is required, or made
1458
+ <computeroutput>NULL</computeroutput> for the normal
1459
+ <computeroutput>malloc</computeroutput> /
1460
+ <computeroutput>free</computeroutput> routines. Upon return, the
1461
+ internal state will have been initialised, and
1462
+ <computeroutput>total_in</computeroutput> and
1463
+ <computeroutput>total_out</computeroutput> will be zero.</para>
1464
+
1465
+ <para>For the meaning of parameter
1466
+ <computeroutput>verbosity</computeroutput>, see
1467
+ <computeroutput>BZ2_bzCompressInit</computeroutput>.</para>
1468
+
1469
+ <para>If <computeroutput>small</computeroutput> is nonzero, the
1470
+ library will use an alternative decompression algorithm which
1471
+ uses less memory but at the cost of decompressing more slowly
1472
+ (roughly speaking, half the speed, but the maximum memory
1473
+ requirement drops to around 2300k). See <xref linkend="using"/>
1474
+ for more information on memory management.</para>
1475
+
1476
+ <para>Note that the amount of memory needed to decompress a
1477
+ stream cannot be determined until the stream's header has been
1478
+ read, so even if
1479
+ <computeroutput>BZ2_bzDecompressInit</computeroutput> succeeds, a
1480
+ subsequent <computeroutput>BZ2_bzDecompress</computeroutput>
1481
+ could fail with
1482
+ <computeroutput>BZ_MEM_ERROR</computeroutput>.</para>
1483
+
1484
+ <para>Possible return values:</para>
1485
+
1486
+ <programlisting>
1487
+ BZ_CONFIG_ERROR
1488
+ if the library has been mis-compiled
1489
+ BZ_PARAM_ERROR
1490
+ if ( small != 0 && small != 1 )
1491
+ or (verbosity <; 0 || verbosity > 4)
1492
+ BZ_MEM_ERROR
1493
+ if insufficient memory is available
1494
+ </programlisting>
1495
+
1496
+ <para>Allowable next actions:</para>
1497
+
1498
+ <programlisting>
1499
+ BZ2_bzDecompress
1500
+ if BZ_OK was returned
1501
+ no specific action required in case of error
1502
+ </programlisting>
1503
+
1504
+ </sect2>
1505
+
1506
+
1507
+ <sect2 id="bzDecompress" xreflabel="BZ2_bzDecompress">
1508
+ <title>BZ2_bzDecompress</title>
1509
+
1510
+ <programlisting>
1511
+ int BZ2_bzDecompress ( bz_stream *strm );
1512
+ </programlisting>
1513
+
1514
+ <para>Provides more input and/out output buffer space for the
1515
+ library. The caller maintains input and output buffers, and uses
1516
+ <computeroutput>BZ2_bzDecompress</computeroutput> to transfer
1517
+ data between them.</para>
1518
+
1519
+ <para>Before each call to
1520
+ <computeroutput>BZ2_bzDecompress</computeroutput>,
1521
+ <computeroutput>next_in</computeroutput> should point at the
1522
+ compressed data, and <computeroutput>avail_in</computeroutput>
1523
+ should indicate how many bytes the library may read.
1524
+ <computeroutput>BZ2_bzDecompress</computeroutput> updates
1525
+ <computeroutput>next_in</computeroutput>,
1526
+ <computeroutput>avail_in</computeroutput> and
1527
+ <computeroutput>total_in</computeroutput> to reflect the number
1528
+ of bytes it has read.</para>
1529
+
1530
+ <para>Similarly, <computeroutput>next_out</computeroutput> should
1531
+ point to a buffer in which the uncompressed output is to be
1532
+ placed, with <computeroutput>avail_out</computeroutput>
1533
+ indicating how much output space is available.
1534
+ <computeroutput>BZ2_bzCompress</computeroutput> updates
1535
+ <computeroutput>next_out</computeroutput>,
1536
+ <computeroutput>avail_out</computeroutput> and
1537
+ <computeroutput>total_out</computeroutput> to reflect the number
1538
+ of bytes output.</para>
1539
+
1540
+ <para>You may provide and remove as little or as much data as you
1541
+ like on each call of
1542
+ <computeroutput>BZ2_bzDecompress</computeroutput>. In the limit,
1543
+ it is acceptable to supply and remove data one byte at a time,
1544
+ although this would be terribly inefficient. You should always
1545
+ ensure that at least one byte of output space is available at
1546
+ each call.</para>
1547
+
1548
+ <para>Use of <computeroutput>BZ2_bzDecompress</computeroutput> is
1549
+ simpler than
1550
+ <computeroutput>BZ2_bzCompress</computeroutput>.</para>
1551
+
1552
+ <para>You should provide input and remove output as described
1553
+ above, and repeatedly call
1554
+ <computeroutput>BZ2_bzDecompress</computeroutput> until
1555
+ <computeroutput>BZ_STREAM_END</computeroutput> is returned.
1556
+ Appearance of <computeroutput>BZ_STREAM_END</computeroutput>
1557
+ denotes that <computeroutput>BZ2_bzDecompress</computeroutput>
1558
+ has detected the logical end of the compressed stream.
1559
+ <computeroutput>BZ2_bzDecompress</computeroutput> will not
1560
+ produce <computeroutput>BZ_STREAM_END</computeroutput> until all
1561
+ output data has been placed into the output buffer, so once
1562
+ <computeroutput>BZ_STREAM_END</computeroutput> appears, you are
1563
+ guaranteed to have available all the decompressed output, and
1564
+ <computeroutput>BZ2_bzDecompressEnd</computeroutput> can safely
1565
+ be called.</para>
1566
+
1567
+ <para>If case of an error return value, you should call
1568
+ <computeroutput>BZ2_bzDecompressEnd</computeroutput> to clean up
1569
+ and release memory.</para>
1570
+
1571
+ <para>Possible return values:</para>
1572
+
1573
+ <programlisting>
1574
+ BZ_PARAM_ERROR
1575
+ if strm is NULL or strm->s is NULL
1576
+ or strm->avail_out < 1
1577
+ BZ_DATA_ERROR
1578
+ if a data integrity error is detected in the compressed stream
1579
+ BZ_DATA_ERROR_MAGIC
1580
+ if the compressed stream doesn't begin with the right magic bytes
1581
+ BZ_MEM_ERROR
1582
+ if there wasn't enough memory available
1583
+ BZ_STREAM_END
1584
+ if the logical end of the data stream was detected and all
1585
+ output in has been consumed, eg s-->avail_out > 0
1586
+ BZ_SEQUENCE_ERROR
1587
+ if called after an earlier call already returned BZ_STREAM_END
1588
+ BZ_OK
1589
+ otherwise
1590
+ </programlisting>
1591
+
1592
+ <para>Allowable next actions:</para>
1593
+
1594
+ <programlisting>
1595
+ BZ2_bzDecompress
1596
+ if BZ_OK was returned
1597
+ BZ2_bzDecompressEnd
1598
+ otherwise
1599
+ </programlisting>
1600
+
1601
+ </sect2>
1602
+
1603
+
1604
+ <sect2 id="bzDecompress-end" xreflabel="BZ2_bzDecompressEnd">
1605
+ <title>BZ2_bzDecompressEnd</title>
1606
+
1607
+ <programlisting>
1608
+ int BZ2_bzDecompressEnd ( bz_stream *strm );
1609
+ </programlisting>
1610
+
1611
+ <para>Releases all memory associated with a decompression
1612
+ stream.</para>
1613
+
1614
+ <para>Possible return values:</para>
1615
+
1616
+ <programlisting>
1617
+ BZ_PARAM_ERROR
1618
+ if strm is NULL or strm->s is NULL
1619
+ BZ_OK
1620
+ otherwise
1621
+ </programlisting>
1622
+
1623
+ <para>Allowable next actions:</para>
1624
+
1625
+ <programlisting>
1626
+ None.
1627
+ </programlisting>
1628
+
1629
+ </sect2>
1630
+
1631
+ </sect1>
1632
+
1633
+
1634
+ <sect1 id="hl-interface" xreflabel="High-level interface">
1635
+ <title>High-level interface</title>
1636
+
1637
+ <para>This interface provides functions for reading and writing
1638
+ <computeroutput>bzip2</computeroutput> format files. First, some
1639
+ general points.</para>
1640
+
1641
+ <itemizedlist mark='bullet'>
1642
+
1643
+ <listitem><para>All of the functions take an
1644
+ <computeroutput>int*</computeroutput> first argument,
1645
+ <computeroutput>bzerror</computeroutput>. After each call,
1646
+ <computeroutput>bzerror</computeroutput> should be consulted
1647
+ first to determine the outcome of the call. If
1648
+ <computeroutput>bzerror</computeroutput> is
1649
+ <computeroutput>BZ_OK</computeroutput>, the call completed
1650
+ successfully, and only then should the return value of the
1651
+ function (if any) be consulted. If
1652
+ <computeroutput>bzerror</computeroutput> is
1653
+ <computeroutput>BZ_IO_ERROR</computeroutput>, there was an
1654
+ error reading/writing the underlying compressed file, and you
1655
+ should then consult <computeroutput>errno</computeroutput> /
1656
+ <computeroutput>perror</computeroutput> to determine the cause
1657
+ of the difficulty. <computeroutput>bzerror</computeroutput>
1658
+ may also be set to various other values; precise details are
1659
+ given on a per-function basis below.</para></listitem>
1660
+
1661
+ <listitem><para>If <computeroutput>bzerror</computeroutput> indicates
1662
+ an error (ie, anything except
1663
+ <computeroutput>BZ_OK</computeroutput> and
1664
+ <computeroutput>BZ_STREAM_END</computeroutput>), you should
1665
+ immediately call
1666
+ <computeroutput>BZ2_bzReadClose</computeroutput> (or
1667
+ <computeroutput>BZ2_bzWriteClose</computeroutput>, depending on
1668
+ whether you are attempting to read or to write) to free up all
1669
+ resources associated with the stream. Once an error has been
1670
+ indicated, behaviour of all calls except
1671
+ <computeroutput>BZ2_bzReadClose</computeroutput>
1672
+ (<computeroutput>BZ2_bzWriteClose</computeroutput>) is
1673
+ undefined. The implication is that (1)
1674
+ <computeroutput>bzerror</computeroutput> should be checked
1675
+ after each call, and (2) if
1676
+ <computeroutput>bzerror</computeroutput> indicates an error,
1677
+ <computeroutput>BZ2_bzReadClose</computeroutput>
1678
+ (<computeroutput>BZ2_bzWriteClose</computeroutput>) should then
1679
+ be called to clean up.</para></listitem>
1680
+
1681
+ <listitem><para>The <computeroutput>FILE*</computeroutput> arguments
1682
+ passed to <computeroutput>BZ2_bzReadOpen</computeroutput> /
1683
+ <computeroutput>BZ2_bzWriteOpen</computeroutput> should be set
1684
+ to binary mode. Most Unix systems will do this by default, but
1685
+ other platforms, including Windows and Mac, will not. If you
1686
+ omit this, you may encounter problems when moving code to new
1687
+ platforms.</para></listitem>
1688
+
1689
+ <listitem><para>Memory allocation requests are handled by
1690
+ <computeroutput>malloc</computeroutput> /
1691
+ <computeroutput>free</computeroutput>. At present there is no
1692
+ facility for user-defined memory allocators in the file I/O
1693
+ functions (could easily be added, though).</para></listitem>
1694
+
1695
+ </itemizedlist>
1696
+
1697
+
1698
+
1699
+ <sect2 id="bzreadopen" xreflabel="BZ2_bzReadOpen">
1700
+ <title>BZ2_bzReadOpen</title>
1701
+
1702
+ <programlisting>
1703
+ typedef void BZFILE;
1704
+
1705
+ BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f,
1706
+ int verbosity, int small,
1707
+ void *unused, int nUnused );
1708
+ </programlisting>
1709
+
1710
+ <para>Prepare to read compressed data from file handle
1711
+ <computeroutput>f</computeroutput>.
1712
+ <computeroutput>f</computeroutput> should refer to a file which
1713
+ has been opened for reading, and for which the error indicator
1714
+ (<computeroutput>ferror(f)</computeroutput>)is not set. If
1715
+ <computeroutput>small</computeroutput> is 1, the library will try
1716
+ to decompress using less memory, at the expense of speed.</para>
1717
+
1718
+ <para>For reasons explained below,
1719
+ <computeroutput>BZ2_bzRead</computeroutput> will decompress the
1720
+ <computeroutput>nUnused</computeroutput> bytes starting at
1721
+ <computeroutput>unused</computeroutput>, before starting to read
1722
+ from the file <computeroutput>f</computeroutput>. At most
1723
+ <computeroutput>BZ_MAX_UNUSED</computeroutput> bytes may be
1724
+ supplied like this. If this facility is not required, you should
1725
+ pass <computeroutput>NULL</computeroutput> and
1726
+ <computeroutput>0</computeroutput> for
1727
+ <computeroutput>unused</computeroutput> and
1728
+ n<computeroutput>Unused</computeroutput> respectively.</para>
1729
+
1730
+ <para>For the meaning of parameters
1731
+ <computeroutput>small</computeroutput> and
1732
+ <computeroutput>verbosity</computeroutput>, see
1733
+ <computeroutput>BZ2_bzDecompressInit</computeroutput>.</para>
1734
+
1735
+ <para>The amount of memory needed to decompress a file cannot be
1736
+ determined until the file's header has been read. So it is
1737
+ possible that <computeroutput>BZ2_bzReadOpen</computeroutput>
1738
+ returns <computeroutput>BZ_OK</computeroutput> but a subsequent
1739
+ call of <computeroutput>BZ2_bzRead</computeroutput> will return
1740
+ <computeroutput>BZ_MEM_ERROR</computeroutput>.</para>
1741
+
1742
+ <para>Possible assignments to
1743
+ <computeroutput>bzerror</computeroutput>:</para>
1744
+
1745
+ <programlisting>
1746
+ BZ_CONFIG_ERROR
1747
+ if the library has been mis-compiled
1748
+ BZ_PARAM_ERROR
1749
+ if f is NULL
1750
+ or small is neither 0 nor 1
1751
+ or ( unused == NULL && nUnused != 0 )
1752
+ or ( unused != NULL && !(0 <= nUnused <= BZ_MAX_UNUSED) )
1753
+ BZ_IO_ERROR
1754
+ if ferror(f) is nonzero
1755
+ BZ_MEM_ERROR
1756
+ if insufficient memory is available
1757
+ BZ_OK
1758
+ otherwise.
1759
+ </programlisting>
1760
+
1761
+ <para>Possible return values:</para>
1762
+
1763
+ <programlisting>
1764
+ Pointer to an abstract BZFILE
1765
+ if bzerror is BZ_OK
1766
+ NULL
1767
+ otherwise
1768
+ </programlisting>
1769
+
1770
+ <para>Allowable next actions:</para>
1771
+
1772
+ <programlisting>
1773
+ BZ2_bzRead
1774
+ if bzerror is BZ_OK
1775
+ BZ2_bzClose
1776
+ otherwise
1777
+ </programlisting>
1778
+
1779
+ </sect2>
1780
+
1781
+
1782
+ <sect2 id="bzread" xreflabel="BZ2_bzRead">
1783
+ <title>BZ2_bzRead</title>
1784
+
1785
+ <programlisting>
1786
+ int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );
1787
+ </programlisting>
1788
+
1789
+ <para>Reads up to <computeroutput>len</computeroutput>
1790
+ (uncompressed) bytes from the compressed file
1791
+ <computeroutput>b</computeroutput> into the buffer
1792
+ <computeroutput>buf</computeroutput>. If the read was
1793
+ successful, <computeroutput>bzerror</computeroutput> is set to
1794
+ <computeroutput>BZ_OK</computeroutput> and the number of bytes
1795
+ read is returned. If the logical end-of-stream was detected,
1796
+ <computeroutput>bzerror</computeroutput> will be set to
1797
+ <computeroutput>BZ_STREAM_END</computeroutput>, and the number of
1798
+ bytes read is returned. All other
1799
+ <computeroutput>bzerror</computeroutput> values denote an
1800
+ error.</para>
1801
+
1802
+ <para><computeroutput>BZ2_bzRead</computeroutput> will supply
1803
+ <computeroutput>len</computeroutput> bytes, unless the logical
1804
+ stream end is detected or an error occurs. Because of this, it
1805
+ is possible to detect the stream end by observing when the number
1806
+ of bytes returned is less than the number requested.
1807
+ Nevertheless, this is regarded as inadvisable; you should instead
1808
+ check <computeroutput>bzerror</computeroutput> after every call
1809
+ and watch out for
1810
+ <computeroutput>BZ_STREAM_END</computeroutput>.</para>
1811
+
1812
+ <para>Internally, <computeroutput>BZ2_bzRead</computeroutput>
1813
+ copies data from the compressed file in chunks of size
1814
+ <computeroutput>BZ_MAX_UNUSED</computeroutput> bytes before
1815
+ decompressing it. If the file contains more bytes than strictly
1816
+ needed to reach the logical end-of-stream,
1817
+ <computeroutput>BZ2_bzRead</computeroutput> will almost certainly
1818
+ read some of the trailing data before signalling
1819
+ <computeroutput>BZ_SEQUENCE_END</computeroutput>. To collect the
1820
+ read but unused data once
1821
+ <computeroutput>BZ_SEQUENCE_END</computeroutput> has appeared,
1822
+ call <computeroutput>BZ2_bzReadGetUnused</computeroutput>
1823
+ immediately before
1824
+ <computeroutput>BZ2_bzReadClose</computeroutput>.</para>
1825
+
1826
+ <para>Possible assignments to
1827
+ <computeroutput>bzerror</computeroutput>:</para>
1828
+
1829
+ <programlisting>
1830
+ BZ_PARAM_ERROR
1831
+ if b is NULL or buf is NULL or len < 0
1832
+ BZ_SEQUENCE_ERROR
1833
+ if b was opened with BZ2_bzWriteOpen
1834
+ BZ_IO_ERROR
1835
+ if there is an error reading from the compressed file
1836
+ BZ_UNEXPECTED_EOF
1837
+ if the compressed file ended before
1838
+ the logical end-of-stream was detected
1839
+ BZ_DATA_ERROR
1840
+ if a data integrity error was detected in the compressed stream
1841
+ BZ_DATA_ERROR_MAGIC
1842
+ if the stream does not begin with the requisite header bytes
1843
+ (ie, is not a bzip2 data file). This is really
1844
+ a special case of BZ_DATA_ERROR.
1845
+ BZ_MEM_ERROR
1846
+ if insufficient memory was available
1847
+ BZ_STREAM_END
1848
+ if the logical end of stream was detected.
1849
+ BZ_OK
1850
+ otherwise.
1851
+ </programlisting>
1852
+
1853
+ <para>Possible return values:</para>
1854
+
1855
+ <programlisting>
1856
+ number of bytes read
1857
+ if bzerror is BZ_OK or BZ_STREAM_END
1858
+ undefined
1859
+ otherwise
1860
+ </programlisting>
1861
+
1862
+ <para>Allowable next actions:</para>
1863
+
1864
+ <programlisting>
1865
+ collect data from buf, then BZ2_bzRead or BZ2_bzReadClose
1866
+ if bzerror is BZ_OK
1867
+ collect data from buf, then BZ2_bzReadClose or BZ2_bzReadGetUnused
1868
+ if bzerror is BZ_SEQUENCE_END
1869
+ BZ2_bzReadClose
1870
+ otherwise
1871
+ </programlisting>
1872
+
1873
+ </sect2>
1874
+
1875
+
1876
+ <sect2 id="bzreadgetunused" xreflabel="BZ2_bzReadGetUnused">
1877
+ <title>BZ2_bzReadGetUnused</title>
1878
+
1879
+ <programlisting>
1880
+ void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b,
1881
+ void** unused, int* nUnused );
1882
+ </programlisting>
1883
+
1884
+ <para>Returns data which was read from the compressed file but
1885
+ was not needed to get to the logical end-of-stream.
1886
+ <computeroutput>*unused</computeroutput> is set to the address of
1887
+ the data, and <computeroutput>*nUnused</computeroutput> to the
1888
+ number of bytes. <computeroutput>*nUnused</computeroutput> will
1889
+ be set to a value between <computeroutput>0</computeroutput> and
1890
+ <computeroutput>BZ_MAX_UNUSED</computeroutput> inclusive.</para>
1891
+
1892
+ <para>This function may only be called once
1893
+ <computeroutput>BZ2_bzRead</computeroutput> has signalled
1894
+ <computeroutput>BZ_STREAM_END</computeroutput> but before
1895
+ <computeroutput>BZ2_bzReadClose</computeroutput>.</para>
1896
+
1897
+ <para>Possible assignments to
1898
+ <computeroutput>bzerror</computeroutput>:</para>
1899
+
1900
+ <programlisting>
1901
+ BZ_PARAM_ERROR
1902
+ if b is NULL
1903
+ or unused is NULL or nUnused is NULL
1904
+ BZ_SEQUENCE_ERROR
1905
+ if BZ_STREAM_END has not been signalled
1906
+ or if b was opened with BZ2_bzWriteOpen
1907
+ BZ_OK
1908
+ otherwise
1909
+ </programlisting>
1910
+
1911
+ <para>Allowable next actions:</para>
1912
+
1913
+ <programlisting>
1914
+ BZ2_bzReadClose
1915
+ </programlisting>
1916
+
1917
+ </sect2>
1918
+
1919
+
1920
+ <sect2 id="bzreadclose" xreflabel="BZ2_bzReadClose">
1921
+ <title>BZ2_bzReadClose</title>
1922
+
1923
+ <programlisting>
1924
+ void BZ2_bzReadClose ( int *bzerror, BZFILE *b );
1925
+ </programlisting>
1926
+
1927
+ <para>Releases all memory pertaining to the compressed file
1928
+ <computeroutput>b</computeroutput>.
1929
+ <computeroutput>BZ2_bzReadClose</computeroutput> does not call
1930
+ <computeroutput>fclose</computeroutput> on the underlying file
1931
+ handle, so you should do that yourself if appropriate.
1932
+ <computeroutput>BZ2_bzReadClose</computeroutput> should be called
1933
+ to clean up after all error situations.</para>
1934
+
1935
+ <para>Possible assignments to
1936
+ <computeroutput>bzerror</computeroutput>:</para>
1937
+
1938
+ <programlisting>
1939
+ BZ_SEQUENCE_ERROR
1940
+ if b was opened with BZ2_bzOpenWrite
1941
+ BZ_OK
1942
+ otherwise
1943
+ </programlisting>
1944
+
1945
+ <para>Allowable next actions:</para>
1946
+
1947
+ <programlisting>
1948
+ none
1949
+ </programlisting>
1950
+
1951
+ </sect2>
1952
+
1953
+
1954
+ <sect2 id="bzwriteopen" xreflabel="BZ2_bzWriteOpen">
1955
+ <title>BZ2_bzWriteOpen</title>
1956
+
1957
+ <programlisting>
1958
+ BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f,
1959
+ int blockSize100k, int verbosity,
1960
+ int workFactor );
1961
+ </programlisting>
1962
+
1963
+ <para>Prepare to write compressed data to file handle
1964
+ <computeroutput>f</computeroutput>.
1965
+ <computeroutput>f</computeroutput> should refer to a file which
1966
+ has been opened for writing, and for which the error indicator
1967
+ (<computeroutput>ferror(f)</computeroutput>)is not set.</para>
1968
+
1969
+ <para>For the meaning of parameters
1970
+ <computeroutput>blockSize100k</computeroutput>,
1971
+ <computeroutput>verbosity</computeroutput> and
1972
+ <computeroutput>workFactor</computeroutput>, see
1973
+ <computeroutput>BZ2_bzCompressInit</computeroutput>.</para>
1974
+
1975
+ <para>All required memory is allocated at this stage, so if the
1976
+ call completes successfully,
1977
+ <computeroutput>BZ_MEM_ERROR</computeroutput> cannot be signalled
1978
+ by a subsequent call to
1979
+ <computeroutput>BZ2_bzWrite</computeroutput>.</para>
1980
+
1981
+ <para>Possible assignments to
1982
+ <computeroutput>bzerror</computeroutput>:</para>
1983
+
1984
+ <programlisting>
1985
+ BZ_CONFIG_ERROR
1986
+ if the library has been mis-compiled
1987
+ BZ_PARAM_ERROR
1988
+ if f is NULL
1989
+ or blockSize100k < 1 or blockSize100k > 9
1990
+ BZ_IO_ERROR
1991
+ if ferror(f) is nonzero
1992
+ BZ_MEM_ERROR
1993
+ if insufficient memory is available
1994
+ BZ_OK
1995
+ otherwise
1996
+ </programlisting>
1997
+
1998
+ <para>Possible return values:</para>
1999
+
2000
+ <programlisting>
2001
+ Pointer to an abstract BZFILE
2002
+ if bzerror is BZ_OK
2003
+ NULL
2004
+ otherwise
2005
+ </programlisting>
2006
+
2007
+ <para>Allowable next actions:</para>
2008
+
2009
+ <programlisting>
2010
+ BZ2_bzWrite
2011
+ if bzerror is BZ_OK
2012
+ (you could go directly to BZ2_bzWriteClose, but this would be pretty pointless)
2013
+ BZ2_bzWriteClose
2014
+ otherwise
2015
+ </programlisting>
2016
+
2017
+ </sect2>
2018
+
2019
+
2020
+ <sect2 id="bzwrite" xreflabel="BZ2_bzWrite">
2021
+ <title>BZ2_bzWrite</title>
2022
+
2023
+ <programlisting>
2024
+ void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );
2025
+ </programlisting>
2026
+
2027
+ <para>Absorbs <computeroutput>len</computeroutput> bytes from the
2028
+ buffer <computeroutput>buf</computeroutput>, eventually to be
2029
+ compressed and written to the file.</para>
2030
+
2031
+ <para>Possible assignments to
2032
+ <computeroutput>bzerror</computeroutput>:</para>
2033
+
2034
+ <programlisting>
2035
+ BZ_PARAM_ERROR
2036
+ if b is NULL or buf is NULL or len < 0
2037
+ BZ_SEQUENCE_ERROR
2038
+ if b was opened with BZ2_bzReadOpen
2039
+ BZ_IO_ERROR
2040
+ if there is an error writing the compressed file.
2041
+ BZ_OK
2042
+ otherwise
2043
+ </programlisting>
2044
+
2045
+ </sect2>
2046
+
2047
+
2048
+ <sect2 id="bzwriteclose" xreflabel="BZ2_bzWriteClose">
2049
+ <title>BZ2_bzWriteClose</title>
2050
+
2051
+ <programlisting>
2052
+ void BZ2_bzWriteClose( int *bzerror, BZFILE* f,
2053
+ int abandon,
2054
+ unsigned int* nbytes_in,
2055
+ unsigned int* nbytes_out );
2056
+
2057
+ void BZ2_bzWriteClose64( int *bzerror, BZFILE* f,
2058
+ int abandon,
2059
+ unsigned int* nbytes_in_lo32,
2060
+ unsigned int* nbytes_in_hi32,
2061
+ unsigned int* nbytes_out_lo32,
2062
+ unsigned int* nbytes_out_hi32 );
2063
+ </programlisting>
2064
+
2065
+ <para>Compresses and flushes to the compressed file all data so
2066
+ far supplied by <computeroutput>BZ2_bzWrite</computeroutput>.
2067
+ The logical end-of-stream markers are also written, so subsequent
2068
+ calls to <computeroutput>BZ2_bzWrite</computeroutput> are
2069
+ illegal. All memory associated with the compressed file
2070
+ <computeroutput>b</computeroutput> is released.
2071
+ <computeroutput>fflush</computeroutput> is called on the
2072
+ compressed file, but it is not
2073
+ <computeroutput>fclose</computeroutput>'d.</para>
2074
+
2075
+ <para>If <computeroutput>BZ2_bzWriteClose</computeroutput> is
2076
+ called to clean up after an error, the only action is to release
2077
+ the memory. The library records the error codes issued by
2078
+ previous calls, so this situation will be detected automatically.
2079
+ There is no attempt to complete the compression operation, nor to
2080
+ <computeroutput>fflush</computeroutput> the compressed file. You
2081
+ can force this behaviour to happen even in the case of no error,
2082
+ by passing a nonzero value to
2083
+ <computeroutput>abandon</computeroutput>.</para>
2084
+
2085
+ <para>If <computeroutput>nbytes_in</computeroutput> is non-null,
2086
+ <computeroutput>*nbytes_in</computeroutput> will be set to be the
2087
+ total volume of uncompressed data handled. Similarly,
2088
+ <computeroutput>nbytes_out</computeroutput> will be set to the
2089
+ total volume of compressed data written. For compatibility with
2090
+ older versions of the library,
2091
+ <computeroutput>BZ2_bzWriteClose</computeroutput> only yields the
2092
+ lower 32 bits of these counts. Use
2093
+ <computeroutput>BZ2_bzWriteClose64</computeroutput> if you want
2094
+ the full 64 bit counts. These two functions are otherwise
2095
+ absolutely identical.</para>
2096
+
2097
+ <para>Possible assignments to
2098
+ <computeroutput>bzerror</computeroutput>:</para>
2099
+
2100
+ <programlisting>
2101
+ BZ_SEQUENCE_ERROR
2102
+ if b was opened with BZ2_bzReadOpen
2103
+ BZ_IO_ERROR
2104
+ if there is an error writing the compressed file
2105
+ BZ_OK
2106
+ otherwise
2107
+ </programlisting>
2108
+
2109
+ </sect2>
2110
+
2111
+
2112
+ <sect2 id="embed" xreflabel="Handling embedded compressed data streams">
2113
+ <title>Handling embedded compressed data streams</title>
2114
+
2115
+ <para>The high-level library facilitates use of
2116
+ <computeroutput>bzip2</computeroutput> data streams which form
2117
+ some part of a surrounding, larger data stream.</para>
2118
+
2119
+ <itemizedlist mark='bullet'>
2120
+
2121
+ <listitem><para>For writing, the library takes an open file handle,
2122
+ writes compressed data to it,
2123
+ <computeroutput>fflush</computeroutput>es it but does not
2124
+ <computeroutput>fclose</computeroutput> it. The calling
2125
+ application can write its own data before and after the
2126
+ compressed data stream, using that same file handle.</para></listitem>
2127
+
2128
+ <listitem><para>Reading is more complex, and the facilities are not as
2129
+ general as they could be since generality is hard to reconcile
2130
+ with efficiency. <computeroutput>BZ2_bzRead</computeroutput>
2131
+ reads from the compressed file in blocks of size
2132
+ <computeroutput>BZ_MAX_UNUSED</computeroutput> bytes, and in
2133
+ doing so probably will overshoot the logical end of compressed
2134
+ stream. To recover this data once decompression has ended,
2135
+ call <computeroutput>BZ2_bzReadGetUnused</computeroutput> after
2136
+ the last call of <computeroutput>BZ2_bzRead</computeroutput>
2137
+ (the one returning
2138
+ <computeroutput>BZ_STREAM_END</computeroutput>) but before
2139
+ calling
2140
+ <computeroutput>BZ2_bzReadClose</computeroutput>.</para></listitem>
2141
+
2142
+ </itemizedlist>
2143
+
2144
+ <para>This mechanism makes it easy to decompress multiple
2145
+ <computeroutput>bzip2</computeroutput> streams placed end-to-end.
2146
+ As the end of one stream, when
2147
+ <computeroutput>BZ2_bzRead</computeroutput> returns
2148
+ <computeroutput>BZ_STREAM_END</computeroutput>, call
2149
+ <computeroutput>BZ2_bzReadGetUnused</computeroutput> to collect
2150
+ the unused data (copy it into your own buffer somewhere). That
2151
+ data forms the start of the next compressed stream. To start
2152
+ uncompressing that next stream, call
2153
+ <computeroutput>BZ2_bzReadOpen</computeroutput> again, feeding in
2154
+ the unused data via the <computeroutput>unused</computeroutput> /
2155
+ <computeroutput>nUnused</computeroutput> parameters. Keep doing
2156
+ this until <computeroutput>BZ_STREAM_END</computeroutput> return
2157
+ coincides with the physical end of file
2158
+ (<computeroutput>feof(f)</computeroutput>). In this situation
2159
+ <computeroutput>BZ2_bzReadGetUnused</computeroutput> will of
2160
+ course return no data.</para>
2161
+
2162
+ <para>This should give some feel for how the high-level interface
2163
+ can be used. If you require extra flexibility, you'll have to
2164
+ bite the bullet and get to grips with the low-level
2165
+ interface.</para>
2166
+
2167
+ </sect2>
2168
+
2169
+
2170
+ <sect2 id="std-rdwr" xreflabel="Standard file-reading/writing code">
2171
+ <title>Standard file-reading/writing code</title>
2172
+
2173
+ <para>Here's how you'd write data to a compressed file:</para>
2174
+
2175
+ <programlisting>
2176
+ FILE* f;
2177
+ BZFILE* b;
2178
+ int nBuf;
2179
+ char buf[ /* whatever size you like */ ];
2180
+ int bzerror;
2181
+ int nWritten;
2182
+
2183
+ f = fopen ( "myfile.bz2", "w" );
2184
+ if ( !f ) {
2185
+ /* handle error */
2186
+ }
2187
+ b = BZ2_bzWriteOpen( &bzerror, f, 9 );
2188
+ if (bzerror != BZ_OK) {
2189
+ BZ2_bzWriteClose ( b );
2190
+ /* handle error */
2191
+ }
2192
+
2193
+ while ( /* condition */ ) {
2194
+ /* get data to write into buf, and set nBuf appropriately */
2195
+ nWritten = BZ2_bzWrite ( &bzerror, b, buf, nBuf );
2196
+ if (bzerror == BZ_IO_ERROR) {
2197
+ BZ2_bzWriteClose ( &bzerror, b );
2198
+ /* handle error */
2199
+ }
2200
+ }
2201
+
2202
+ BZ2_bzWriteClose( &bzerror, b );
2203
+ if (bzerror == BZ_IO_ERROR) {
2204
+ /* handle error */
2205
+ }
2206
+ </programlisting>
2207
+
2208
+ <para>And to read from a compressed file:</para>
2209
+
2210
+ <programlisting>
2211
+ FILE* f;
2212
+ BZFILE* b;
2213
+ int nBuf;
2214
+ char buf[ /* whatever size you like */ ];
2215
+ int bzerror;
2216
+ int nWritten;
2217
+
2218
+ f = fopen ( "myfile.bz2", "r" );
2219
+ if ( !f ) {
2220
+ /* handle error */
2221
+ }
2222
+ b = BZ2_bzReadOpen ( &bzerror, f, 0, NULL, 0 );
2223
+ if ( bzerror != BZ_OK ) {
2224
+ BZ2_bzReadClose ( &bzerror, b );
2225
+ /* handle error */
2226
+ }
2227
+
2228
+ bzerror = BZ_OK;
2229
+ while ( bzerror == BZ_OK && /* arbitrary other conditions */) {
2230
+ nBuf = BZ2_bzRead ( &bzerror, b, buf, /* size of buf */ );
2231
+ if ( bzerror == BZ_OK ) {
2232
+ /* do something with buf[0 .. nBuf-1] */
2233
+ }
2234
+ }
2235
+ if ( bzerror != BZ_STREAM_END ) {
2236
+ BZ2_bzReadClose ( &bzerror, b );
2237
+ /* handle error */
2238
+ } else {
2239
+ BZ2_bzReadClose ( &bzerror, b );
2240
+ }
2241
+ </programlisting>
2242
+
2243
+ </sect2>
2244
+
2245
+ </sect1>
2246
+
2247
+
2248
+ <sect1 id="util-fns" xreflabel="Utility functions">
2249
+ <title>Utility functions</title>
2250
+
2251
+
2252
+ <sect2 id="bzbufftobuffcompress" xreflabel="BZ2_bzBuffToBuffCompress">
2253
+ <title>BZ2_bzBuffToBuffCompress</title>
2254
+
2255
+ <programlisting>
2256
+ int BZ2_bzBuffToBuffCompress( char* dest,
2257
+ unsigned int* destLen,
2258
+ char* source,
2259
+ unsigned int sourceLen,
2260
+ int blockSize100k,
2261
+ int verbosity,
2262
+ int workFactor );
2263
+ </programlisting>
2264
+
2265
+ <para>Attempts to compress the data in <computeroutput>source[0
2266
+ .. sourceLen-1]</computeroutput> into the destination buffer,
2267
+ <computeroutput>dest[0 .. *destLen-1]</computeroutput>. If the
2268
+ destination buffer is big enough,
2269
+ <computeroutput>*destLen</computeroutput> is set to the size of
2270
+ the compressed data, and <computeroutput>BZ_OK</computeroutput>
2271
+ is returned. If the compressed data won't fit,
2272
+ <computeroutput>*destLen</computeroutput> is unchanged, and
2273
+ <computeroutput>BZ_OUTBUFF_FULL</computeroutput> is
2274
+ returned.</para>
2275
+
2276
+ <para>Compression in this manner is a one-shot event, done with a
2277
+ single call to this function. The resulting compressed data is a
2278
+ complete <computeroutput>bzip2</computeroutput> format data
2279
+ stream. There is no mechanism for making additional calls to
2280
+ provide extra input data. If you want that kind of mechanism,
2281
+ use the low-level interface.</para>
2282
+
2283
+ <para>For the meaning of parameters
2284
+ <computeroutput>blockSize100k</computeroutput>,
2285
+ <computeroutput>verbosity</computeroutput> and
2286
+ <computeroutput>workFactor</computeroutput>, see
2287
+ <computeroutput>BZ2_bzCompressInit</computeroutput>.</para>
2288
+
2289
+ <para>To guarantee that the compressed data will fit in its
2290
+ buffer, allocate an output buffer of size 1% larger than the
2291
+ uncompressed data, plus six hundred extra bytes.</para>
2292
+
2293
+ <para><computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput>
2294
+ will not write data at or beyond
2295
+ <computeroutput>dest[*destLen]</computeroutput>, even in case of
2296
+ buffer overflow.</para>
2297
+
2298
+ <para>Possible return values:</para>
2299
+
2300
+ <programlisting>
2301
+ BZ_CONFIG_ERROR
2302
+ if the library has been mis-compiled
2303
+ BZ_PARAM_ERROR
2304
+ if dest is NULL or destLen is NULL
2305
+ or blockSize100k < 1 or blockSize100k > 9
2306
+ or verbosity < 0 or verbosity > 4
2307
+ or workFactor < 0 or workFactor > 250
2308
+ BZ_MEM_ERROR
2309
+ if insufficient memory is available
2310
+ BZ_OUTBUFF_FULL
2311
+ if the size of the compressed data exceeds *destLen
2312
+ BZ_OK
2313
+ otherwise
2314
+ </programlisting>
2315
+
2316
+ </sect2>
2317
+
2318
+
2319
+ <sect2 id="bzbufftobuffdecompress" xreflabel="BZ2_bzBuffToBuffDecompress">
2320
+ <title>BZ2_bzBuffToBuffDecompress</title>
2321
+
2322
+ <programlisting>
2323
+ int BZ2_bzBuffToBuffDecompress( char* dest,
2324
+ unsigned int* destLen,
2325
+ char* source,
2326
+ unsigned int sourceLen,
2327
+ int small,
2328
+ int verbosity );
2329
+ </programlisting>
2330
+
2331
+ <para>Attempts to decompress the data in <computeroutput>source[0
2332
+ .. sourceLen-1]</computeroutput> into the destination buffer,
2333
+ <computeroutput>dest[0 .. *destLen-1]</computeroutput>. If the
2334
+ destination buffer is big enough,
2335
+ <computeroutput>*destLen</computeroutput> is set to the size of
2336
+ the uncompressed data, and <computeroutput>BZ_OK</computeroutput>
2337
+ is returned. If the compressed data won't fit,
2338
+ <computeroutput>*destLen</computeroutput> is unchanged, and
2339
+ <computeroutput>BZ_OUTBUFF_FULL</computeroutput> is
2340
+ returned.</para>
2341
+
2342
+ <para><computeroutput>source</computeroutput> is assumed to hold
2343
+ a complete <computeroutput>bzip2</computeroutput> format data
2344
+ stream.
2345
+ <computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput> tries
2346
+ to decompress the entirety of the stream into the output
2347
+ buffer.</para>
2348
+
2349
+ <para>For the meaning of parameters
2350
+ <computeroutput>small</computeroutput> and
2351
+ <computeroutput>verbosity</computeroutput>, see
2352
+ <computeroutput>BZ2_bzDecompressInit</computeroutput>.</para>
2353
+
2354
+ <para>Because the compression ratio of the compressed data cannot
2355
+ be known in advance, there is no easy way to guarantee that the
2356
+ output buffer will be big enough. You may of course make
2357
+ arrangements in your code to record the size of the uncompressed
2358
+ data, but such a mechanism is beyond the scope of this
2359
+ library.</para>
2360
+
2361
+ <para><computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput>
2362
+ will not write data at or beyond
2363
+ <computeroutput>dest[*destLen]</computeroutput>, even in case of
2364
+ buffer overflow.</para>
2365
+
2366
+ <para>Possible return values:</para>
2367
+
2368
+ <programlisting>
2369
+ BZ_CONFIG_ERROR
2370
+ if the library has been mis-compiled
2371
+ BZ_PARAM_ERROR
2372
+ if dest is NULL or destLen is NULL
2373
+ or small != 0 && small != 1
2374
+ or verbosity < 0 or verbosity > 4
2375
+ BZ_MEM_ERROR
2376
+ if insufficient memory is available
2377
+ BZ_OUTBUFF_FULL
2378
+ if the size of the compressed data exceeds *destLen
2379
+ BZ_DATA_ERROR
2380
+ if a data integrity error was detected in the compressed data
2381
+ BZ_DATA_ERROR_MAGIC
2382
+ if the compressed data doesn't begin with the right magic bytes
2383
+ BZ_UNEXPECTED_EOF
2384
+ if the compressed data ends unexpectedly
2385
+ BZ_OK
2386
+ otherwise
2387
+ </programlisting>
2388
+
2389
+ </sect2>
2390
+
2391
+ </sect1>
2392
+
2393
+
2394
+ <sect1 id="zlib-compat" xreflabel="zlib compatibility functions">
2395
+ <title>zlib compatibility functions</title>
2396
+
2397
+ <para>Yoshioka Tsuneo has contributed some functions to give
2398
+ better <computeroutput>zlib</computeroutput> compatibility.
2399
+ These functions are <computeroutput>BZ2_bzopen</computeroutput>,
2400
+ <computeroutput>BZ2_bzread</computeroutput>,
2401
+ <computeroutput>BZ2_bzwrite</computeroutput>,
2402
+ <computeroutput>BZ2_bzflush</computeroutput>,
2403
+ <computeroutput>BZ2_bzclose</computeroutput>,
2404
+ <computeroutput>BZ2_bzerror</computeroutput> and
2405
+ <computeroutput>BZ2_bzlibVersion</computeroutput>. These
2406
+ functions are not (yet) officially part of the library. If they
2407
+ break, you get to keep all the pieces. Nevertheless, I think
2408
+ they work ok.</para>
2409
+
2410
+ <programlisting>
2411
+ typedef void BZFILE;
2412
+
2413
+ const char * BZ2_bzlibVersion ( void );
2414
+ </programlisting>
2415
+
2416
+ <para>Returns a string indicating the library version.</para>
2417
+
2418
+ <programlisting>
2419
+ BZFILE * BZ2_bzopen ( const char *path, const char *mode );
2420
+ BZFILE * BZ2_bzdopen ( int fd, const char *mode );
2421
+ </programlisting>
2422
+
2423
+ <para>Opens a <computeroutput>.bz2</computeroutput> file for
2424
+ reading or writing, using either its name or a pre-existing file
2425
+ descriptor. Analogous to <computeroutput>fopen</computeroutput>
2426
+ and <computeroutput>fdopen</computeroutput>.</para>
2427
+
2428
+ <programlisting>
2429
+ int BZ2_bzread ( BZFILE* b, void* buf, int len );
2430
+ int BZ2_bzwrite ( BZFILE* b, void* buf, int len );
2431
+ </programlisting>
2432
+
2433
+ <para>Reads/writes data from/to a previously opened
2434
+ <computeroutput>BZFILE</computeroutput>. Analogous to
2435
+ <computeroutput>fread</computeroutput> and
2436
+ <computeroutput>fwrite</computeroutput>.</para>
2437
+
2438
+ <programlisting>
2439
+ int BZ2_bzflush ( BZFILE* b );
2440
+ void BZ2_bzclose ( BZFILE* b );
2441
+ </programlisting>
2442
+
2443
+ <para>Flushes/closes a <computeroutput>BZFILE</computeroutput>.
2444
+ <computeroutput>BZ2_bzflush</computeroutput> doesn't actually do
2445
+ anything. Analogous to <computeroutput>fflush</computeroutput>
2446
+ and <computeroutput>fclose</computeroutput>.</para>
2447
+
2448
+ <programlisting>
2449
+ const char * BZ2_bzerror ( BZFILE *b, int *errnum )
2450
+ </programlisting>
2451
+
2452
+ <para>Returns a string describing the more recent error status of
2453
+ <computeroutput>b</computeroutput>, and also sets
2454
+ <computeroutput>*errnum</computeroutput> to its numerical
2455
+ value.</para>
2456
+
2457
+ </sect1>
2458
+
2459
+
2460
+ <sect1 id="stdio-free"
2461
+ xreflabel="Using the library in a stdio-free environment">
2462
+ <title>Using the library in a stdio-free environment</title>
2463
+
2464
+
2465
+ <sect2 id="stdio-bye" xreflabel="Getting rid of stdio">
2466
+ <title>Getting rid of stdio</title>
2467
+
2468
+ <para>In a deeply embedded application, you might want to use
2469
+ just the memory-to-memory functions. You can do this
2470
+ conveniently by compiling the library with preprocessor symbol
2471
+ <computeroutput>BZ_NO_STDIO</computeroutput> defined. Doing this
2472
+ gives you a library containing only the following eight
2473
+ functions:</para>
2474
+
2475
+ <para><computeroutput>BZ2_bzCompressInit</computeroutput>,
2476
+ <computeroutput>BZ2_bzCompress</computeroutput>,
2477
+ <computeroutput>BZ2_bzCompressEnd</computeroutput>
2478
+ <computeroutput>BZ2_bzDecompressInit</computeroutput>,
2479
+ <computeroutput>BZ2_bzDecompress</computeroutput>,
2480
+ <computeroutput>BZ2_bzDecompressEnd</computeroutput>
2481
+ <computeroutput>BZ2_bzBuffToBuffCompress</computeroutput>,
2482
+ <computeroutput>BZ2_bzBuffToBuffDecompress</computeroutput></para>
2483
+
2484
+ <para>When compiled like this, all functions will ignore
2485
+ <computeroutput>verbosity</computeroutput> settings.</para>
2486
+
2487
+ </sect2>
2488
+
2489
+
2490
+ <sect2 id="critical-error" xreflabel="Critical error handling">
2491
+ <title>Critical error handling</title>
2492
+
2493
+ <para><computeroutput>libbzip2</computeroutput> contains a number
2494
+ of internal assertion checks which should, needless to say, never
2495
+ be activated. Nevertheless, if an assertion should fail,
2496
+ behaviour depends on whether or not the library was compiled with
2497
+ <computeroutput>BZ_NO_STDIO</computeroutput> set.</para>
2498
+
2499
+ <para>For a normal compile, an assertion failure yields the
2500
+ message:</para>
2501
+
2502
+ <blockquote>
2503
+ <para>bzip2/libbzip2: internal error number N.</para>
2504
+ <para>This is a bug in bzip2/libbzip2, &bz-version; of &bz-date;.
2505
+ Please report it to: &bz-email;. If this happened
2506
+ when you were using some program which uses libbzip2 as a
2507
+ component, you should also report this bug to the author(s)
2508
+ of that program. Please make an effort to report this bug;
2509
+ timely and accurate bug reports eventually lead to higher
2510
+ quality software. Thanks.
2511
+ </para></blockquote>
2512
+
2513
+ <para>where <computeroutput>N</computeroutput> is some error code
2514
+ number. If <computeroutput>N == 1007</computeroutput>, it also
2515
+ prints some extra text advising the reader that unreliable memory
2516
+ is often associated with internal error 1007. (This is a
2517
+ frequently-observed-phenomenon with versions 1.0.0/1.0.1).</para>
2518
+
2519
+ <para><computeroutput>exit(3)</computeroutput> is then
2520
+ called.</para>
2521
+
2522
+ <para>For a <computeroutput>stdio</computeroutput>-free library,
2523
+ assertion failures result in a call to a function declared
2524
+ as:</para>
2525
+
2526
+ <programlisting>
2527
+ extern void bz_internal_error ( int errcode );
2528
+ </programlisting>
2529
+
2530
+ <para>The relevant code is passed as a parameter. You should
2531
+ supply such a function.</para>
2532
+
2533
+ <para>In either case, once an assertion failure has occurred, any
2534
+ <computeroutput>bz_stream</computeroutput> records involved can
2535
+ be regarded as invalid. You should not attempt to resume normal
2536
+ operation with them.</para>
2537
+
2538
+ <para>You may, of course, change critical error handling to suit
2539
+ your needs. As I said above, critical errors indicate bugs in
2540
+ the library and should not occur. All "normal" error situations
2541
+ are indicated via error return codes from functions, and can be
2542
+ recovered from.</para>
2543
+
2544
+ </sect2>
2545
+
2546
+ </sect1>
2547
+
2548
+
2549
+ <sect1 id="win-dll" xreflabel="Making a Windows DLL">
2550
+ <title>Making a Windows DLL</title>
2551
+
2552
+ <para>Everything related to Windows has been contributed by
2553
+ Yoshioka Tsuneo
2554
+ (<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>), so
2555
+ you should send your queries to him (but please Cc:
2556
+ <computeroutput>&bz-email;</computeroutput>).</para>
2557
+
2558
+ <para>My vague understanding of what to do is: using Visual C++
2559
+ 5.0, open the project file
2560
+ <computeroutput>libbz2.dsp</computeroutput>, and build. That's
2561
+ all.</para>
2562
+
2563
+ <para>If you can't open the project file for some reason, make a
2564
+ new one, naming these files:
2565
+ <computeroutput>blocksort.c</computeroutput>,
2566
+ <computeroutput>bzlib.c</computeroutput>,
2567
+ <computeroutput>compress.c</computeroutput>,
2568
+ <computeroutput>crctable.c</computeroutput>,
2569
+ <computeroutput>decompress.c</computeroutput>,
2570
+ <computeroutput>huffman.c</computeroutput>,
2571
+ <computeroutput>randtable.c</computeroutput> and
2572
+ <computeroutput>libbz2.def</computeroutput>. You will also need
2573
+ to name the header files <computeroutput>bzlib.h</computeroutput>
2574
+ and <computeroutput>bzlib_private.h</computeroutput>.</para>
2575
+
2576
+ <para>If you don't use VC++, you may need to define the
2577
+ proprocessor symbol
2578
+ <computeroutput>_WIN32</computeroutput>.</para>
2579
+
2580
+ <para>Finally, <computeroutput>dlltest.c</computeroutput> is a
2581
+ sample program using the DLL. It has a project file,
2582
+ <computeroutput>dlltest.dsp</computeroutput>.</para>
2583
+
2584
+ <para>If you just want a makefile for Visual C, have a look at
2585
+ <computeroutput>makefile.msc</computeroutput>.</para>
2586
+
2587
+ <para>Be aware that if you compile
2588
+ <computeroutput>bzip2</computeroutput> itself on Win32, you must
2589
+ set <computeroutput>BZ_UNIX</computeroutput> to 0 and
2590
+ <computeroutput>BZ_LCCWIN32</computeroutput> to 1, in the file
2591
+ <computeroutput>bzip2.c</computeroutput>, before compiling.
2592
+ Otherwise the resulting binary won't work correctly.</para>
2593
+
2594
+ <para>I haven't tried any of this stuff myself, but it all looks
2595
+ plausible.</para>
2596
+
2597
+ </sect1>
2598
+
2599
+ </chapter>
2600
+
2601
+
2602
+
2603
+ <chapter id="misc" xreflabel="Miscellanea">
2604
+ <title>Miscellanea</title>
2605
+
2606
+ <para>These are just some random thoughts of mine. Your mileage
2607
+ may vary.</para>
2608
+
2609
+
2610
+ <sect1 id="limits" xreflabel="Limitations of the compressed file format">
2611
+ <title>Limitations of the compressed file format</title>
2612
+
2613
+ <para><computeroutput>bzip2-1.0.X</computeroutput>,
2614
+ <computeroutput>0.9.5</computeroutput> and
2615
+ <computeroutput>0.9.0</computeroutput> use exactly the same file
2616
+ format as the original version,
2617
+ <computeroutput>bzip2-0.1</computeroutput>. This decision was
2618
+ made in the interests of stability. Creating yet another
2619
+ incompatible compressed file format would create further
2620
+ confusion and disruption for users.</para>
2621
+
2622
+ <para>Nevertheless, this is not a painless decision. Development
2623
+ work since the release of
2624
+ <computeroutput>bzip2-0.1</computeroutput> in August 1997 has
2625
+ shown complexities in the file format which slow down
2626
+ decompression and, in retrospect, are unnecessary. These
2627
+ are:</para>
2628
+
2629
+ <itemizedlist mark='bullet'>
2630
+
2631
+ <listitem><para>The run-length encoder, which is the first of the
2632
+ compression transformations, is entirely irrelevant. The
2633
+ original purpose was to protect the sorting algorithm from the
2634
+ very worst case input: a string of repeated symbols. But
2635
+ algorithm steps Q6a and Q6b in the original Burrows-Wheeler
2636
+ technical report (SRC-124) show how repeats can be handled
2637
+ without difficulty in block sorting.</para></listitem>
2638
+
2639
+ <listitem><para>The randomisation mechanism doesn't really need to be
2640
+ there. Udi Manber and Gene Myers published a suffix array
2641
+ construction algorithm a few years back, which can be employed
2642
+ to sort any block, no matter how repetitive, in O(N log N)
2643
+ time. Subsequent work by Kunihiko Sadakane has produced a
2644
+ derivative O(N (log N)^2) algorithm which usually outperforms
2645
+ the Manber-Myers algorithm.</para>
2646
+
2647
+ <para>I could have changed to Sadakane's algorithm, but I find
2648
+ it to be slower than <computeroutput>bzip2</computeroutput>'s
2649
+ existing algorithm for most inputs, and the randomisation
2650
+ mechanism protects adequately against bad cases. I didn't
2651
+ think it was a good tradeoff to make. Partly this is due to
2652
+ the fact that I was not flooded with email complaints about
2653
+ <computeroutput>bzip2-0.1</computeroutput>'s performance on
2654
+ repetitive data, so perhaps it isn't a problem for real
2655
+ inputs.</para>
2656
+
2657
+ <para>Probably the best long-term solution, and the one I have
2658
+ incorporated into 0.9.5 and above, is to use the existing
2659
+ sorting algorithm initially, and fall back to a O(N (log N)^2)
2660
+ algorithm if the standard algorithm gets into
2661
+ difficulties.</para></listitem>
2662
+
2663
+ <listitem><para>The compressed file format was never designed to be
2664
+ handled by a library, and I have had to jump though some hoops
2665
+ to produce an efficient implementation of decompression. It's
2666
+ a bit hairy. Try passing
2667
+ <computeroutput>decompress.c</computeroutput> through the C
2668
+ preprocessor and you'll see what I mean. Much of this
2669
+ complexity could have been avoided if the compressed size of
2670
+ each block of data was recorded in the data stream.</para></listitem>
2671
+
2672
+ <listitem><para>An Adler-32 checksum, rather than a CRC32 checksum,
2673
+ would be faster to compute.</para></listitem>
2674
+
2675
+ </itemizedlist>
2676
+
2677
+ <para>It would be fair to say that the
2678
+ <computeroutput>bzip2</computeroutput> format was frozen before I
2679
+ properly and fully understood the performance consequences of
2680
+ doing so.</para>
2681
+
2682
+ <para>Improvements which I was able to incorporate into 0.9.0,
2683
+ despite using the same file format, are:</para>
2684
+
2685
+ <itemizedlist mark='bullet'>
2686
+
2687
+ <listitem><para>Single array implementation of the inverse BWT. This
2688
+ significantly speeds up decompression, presumably because it
2689
+ reduces the number of cache misses.</para></listitem>
2690
+
2691
+ <listitem><para>Faster inverse MTF transform for large MTF values.
2692
+ The new implementation is based on the notion of sliding blocks
2693
+ of values.</para></listitem>
2694
+
2695
+ <listitem><para><computeroutput>bzip2-0.9.0</computeroutput> now reads
2696
+ and writes files with <computeroutput>fread</computeroutput>
2697
+ and <computeroutput>fwrite</computeroutput>; version 0.1 used
2698
+ <computeroutput>putc</computeroutput> and
2699
+ <computeroutput>getc</computeroutput>. Duh! Well, you live
2700
+ and learn.</para></listitem>
2701
+
2702
+ </itemizedlist>
2703
+
2704
+ <para>Further ahead, it would be nice to be able to do random
2705
+ access into files. This will require some careful design of
2706
+ compressed file formats.</para>
2707
+
2708
+ </sect1>
2709
+
2710
+
2711
+ <sect1 id="port-issues" xreflabel="Portability issues">
2712
+ <title>Portability issues</title>
2713
+
2714
+ <para>After some consideration, I have decided not to use GNU
2715
+ <computeroutput>autoconf</computeroutput> to configure 0.9.5 or
2716
+ 1.0.</para>
2717
+
2718
+ <para><computeroutput>autoconf</computeroutput>, admirable and
2719
+ wonderful though it is, mainly assists with portability problems
2720
+ between Unix-like platforms. But
2721
+ <computeroutput>bzip2</computeroutput> doesn't have much in the
2722
+ way of portability problems on Unix; most of the difficulties
2723
+ appear when porting to the Mac, or to Microsoft's operating
2724
+ systems. <computeroutput>autoconf</computeroutput> doesn't help
2725
+ in those cases, and brings in a whole load of new
2726
+ complexity.</para>
2727
+
2728
+ <para>Most people should be able to compile the library and
2729
+ program under Unix straight out-of-the-box, so to speak,
2730
+ especially if you have a version of GNU C available.</para>
2731
+
2732
+ <para>There are a couple of
2733
+ <computeroutput>__inline__</computeroutput> directives in the
2734
+ code. GNU C (<computeroutput>gcc</computeroutput>) should be
2735
+ able to handle them. If you're not using GNU C, your C compiler
2736
+ shouldn't see them at all. If your compiler does, for some
2737
+ reason, see them and doesn't like them, just
2738
+ <computeroutput>#define</computeroutput>
2739
+ <computeroutput>__inline__</computeroutput> to be
2740
+ <computeroutput>/* */</computeroutput>. One easy way to do this
2741
+ is to compile with the flag
2742
+ <computeroutput>-D__inline__=</computeroutput>, which should be
2743
+ understood by most Unix compilers.</para>
2744
+
2745
+ <para>If you still have difficulties, try compiling with the
2746
+ macro <computeroutput>BZ_STRICT_ANSI</computeroutput> defined.
2747
+ This should enable you to build the library in a strictly ANSI
2748
+ compliant environment. Building the program itself like this is
2749
+ dangerous and not supported, since you remove
2750
+ <computeroutput>bzip2</computeroutput>'s checks against
2751
+ compressing directories, symbolic links, devices, and other
2752
+ not-really-a-file entities. This could cause filesystem
2753
+ corruption!</para>
2754
+
2755
+ <para>One other thing: if you create a
2756
+ <computeroutput>bzip2</computeroutput> binary for public distribution,
2757
+ please consider linking it statically (<computeroutput>gcc
2758
+ -static</computeroutput>). This avoids all sorts of library-version
2759
+ issues that others may encounter later on.</para>
2760
+
2761
+ <para>If you build <computeroutput>bzip2</computeroutput> on
2762
+ Win32, you must set <computeroutput>BZ_UNIX</computeroutput> to 0
2763
+ and <computeroutput>BZ_LCCWIN32</computeroutput> to 1, in the
2764
+ file <computeroutput>bzip2.c</computeroutput>, before compiling.
2765
+ Otherwise the resulting binary won't work correctly.</para>
2766
+
2767
+ </sect1>
2768
+
2769
+
2770
+ <sect1 id="bugs" xreflabel="Reporting bugs">
2771
+ <title>Reporting bugs</title>
2772
+
2773
+ <para>I tried pretty hard to make sure
2774
+ <computeroutput>bzip2</computeroutput> is bug free, both by
2775
+ design and by testing. Hopefully you'll never need to read this
2776
+ section for real.</para>
2777
+
2778
+ <para>Nevertheless, if <computeroutput>bzip2</computeroutput> dies
2779
+ with a segmentation fault, a bus error or an internal assertion
2780
+ failure, it will ask you to email me a bug report. Experience from
2781
+ years of feedback of bzip2 users indicates that almost all these
2782
+ problems can be traced to either compiler bugs or hardware
2783
+ problems.</para>
2784
+
2785
+ <itemizedlist mark='bullet'>
2786
+
2787
+ <listitem><para>Recompile the program with no optimisation, and
2788
+ see if it works. And/or try a different compiler. I heard all
2789
+ sorts of stories about various flavours of GNU C (and other
2790
+ compilers) generating bad code for
2791
+ <computeroutput>bzip2</computeroutput>, and I've run across two
2792
+ such examples myself.</para>
2793
+
2794
+ <para>2.7.X versions of GNU C are known to generate bad code
2795
+ from time to time, at high optimisation levels. If you get
2796
+ problems, try using the flags
2797
+ <computeroutput>-O2</computeroutput>
2798
+ <computeroutput>-fomit-frame-pointer</computeroutput>
2799
+ <computeroutput>-fno-strength-reduce</computeroutput>. You
2800
+ should specifically <emphasis>not</emphasis> use
2801
+ <computeroutput>-funroll-loops</computeroutput>.</para>
2802
+
2803
+ <para>You may notice that the Makefile runs six tests as part
2804
+ of the build process. If the program passes all of these, it's
2805
+ a pretty good (but not 100%) indication that the compiler has
2806
+ done its job correctly.</para></listitem>
2807
+
2808
+ <listitem><para>If <computeroutput>bzip2</computeroutput>
2809
+ crashes randomly, and the crashes are not repeatable, you may
2810
+ have a flaky memory subsystem.
2811
+ <computeroutput>bzip2</computeroutput> really hammers your
2812
+ memory hierarchy, and if it's a bit marginal, you may get these
2813
+ problems. Ditto if your disk or I/O subsystem is slowly
2814
+ failing. Yup, this really does happen.</para>
2815
+
2816
+ <para>Try using a different machine of the same type, and see
2817
+ if you can repeat the problem.</para></listitem>
2818
+
2819
+ <listitem><para>This isn't really a bug, but ... If
2820
+ <computeroutput>bzip2</computeroutput> tells you your file is
2821
+ corrupted on decompression, and you obtained the file via FTP,
2822
+ there is a possibility that you forgot to tell FTP to do a
2823
+ binary mode transfer. That absolutely will cause the file to
2824
+ be non-decompressible. You'll have to transfer it
2825
+ again.</para></listitem>
2826
+
2827
+ </itemizedlist>
2828
+
2829
+ <para>If you've incorporated
2830
+ <computeroutput>libbzip2</computeroutput> into your own program
2831
+ and are getting problems, please, please, please, check that the
2832
+ parameters you are passing in calls to the library, are correct,
2833
+ and in accordance with what the documentation says is allowable.
2834
+ I have tried to make the library robust against such problems,
2835
+ but I'm sure I haven't succeeded.</para>
2836
+
2837
+ <para>Finally, if the above comments don't help, you'll have to
2838
+ send me a bug report. Now, it's just amazing how many people
2839
+ will send me a bug report saying something like:</para>
2840
+
2841
+ <programlisting>
2842
+ bzip2 crashed with segmentation fault on my machine
2843
+ </programlisting>
2844
+
2845
+ <para>and absolutely nothing else. Needless to say, a such a
2846
+ report is <emphasis>totally, utterly, completely and
2847
+ comprehensively 100% useless; a waste of your time, my time, and
2848
+ net bandwidth</emphasis>. With no details at all, there's no way
2849
+ I can possibly begin to figure out what the problem is.</para>
2850
+
2851
+ <para>The rules of the game are: facts, facts, facts. Don't omit
2852
+ them because "oh, they won't be relevant". At the bare
2853
+ minimum:</para>
2854
+
2855
+ <programlisting>
2856
+ Machine type. Operating system version.
2857
+ Exact version of bzip2 (do bzip2 -V).
2858
+ Exact version of the compiler used.
2859
+ Flags passed to the compiler.
2860
+ </programlisting>
2861
+
2862
+ <para>However, the most important single thing that will help me
2863
+ is the file that you were trying to compress or decompress at the
2864
+ time the problem happened. Without that, my ability to do
2865
+ anything more than speculate about the cause, is limited.</para>
2866
+
2867
+ </sect1>
2868
+
2869
+
2870
+ <sect1 id="package" xreflabel="Did you get the right package?">
2871
+ <title>Did you get the right package?</title>
2872
+
2873
+ <para><computeroutput>bzip2</computeroutput> is a resource hog.
2874
+ It soaks up large amounts of CPU cycles and memory. Also, it
2875
+ gives very large latencies. In the worst case, you can feed many
2876
+ megabytes of uncompressed data into the library before getting
2877
+ any compressed output, so this probably rules out applications
2878
+ requiring interactive behaviour.</para>
2879
+
2880
+ <para>These aren't faults of my implementation, I hope, but more
2881
+ an intrinsic property of the Burrows-Wheeler transform
2882
+ (unfortunately). Maybe this isn't what you want.</para>
2883
+
2884
+ <para>If you want a compressor and/or library which is faster,
2885
+ uses less memory but gets pretty good compression, and has
2886
+ minimal latency, consider Jean-loup Gailly's and Mark Adler's
2887
+ work, <computeroutput>zlib-1.2.1</computeroutput> and
2888
+ <computeroutput>gzip-1.2.4</computeroutput>. Look for them at
2889
+ <ulink url="http://www.zlib.org">http://www.zlib.org</ulink> and
2890
+ <ulink url="http://www.gzip.org">http://www.gzip.org</ulink>
2891
+ respectively.</para>
2892
+
2893
+ <para>For something faster and lighter still, you might try Markus F
2894
+ X J Oberhumer's <computeroutput>LZO</computeroutput> real-time
2895
+ compression/decompression library, at
2896
+ <ulink url="http://www.oberhumer.com/opensource">http://www.oberhumer.com/opensource</ulink>.</para>
2897
+
2898
+ </sect1>
2899
+
2900
+
2901
+
2902
+ <sect1 id="reading" xreflabel="Further Reading">
2903
+ <title>Further Reading</title>
2904
+
2905
+ <para><computeroutput>bzip2</computeroutput> is not research
2906
+ work, in the sense that it doesn't present any new ideas.
2907
+ Rather, it's an engineering exercise based on existing
2908
+ ideas.</para>
2909
+
2910
+ <para>Four documents describe essentially all the ideas behind
2911
+ <computeroutput>bzip2</computeroutput>:</para>
2912
+
2913
+ <literallayout>Michael Burrows and D. J. Wheeler:
2914
+ "A block-sorting lossless data compression algorithm"
2915
+ 10th May 1994.
2916
+ Digital SRC Research Report 124.
2917
+ ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz
2918
+ If you have trouble finding it, try searching at the
2919
+ New Zealand Digital Library, http://www.nzdl.org.
2920
+
2921
+ Daniel S. Hirschberg and Debra A. LeLewer
2922
+ "Efficient Decoding of Prefix Codes"
2923
+ Communications of the ACM, April 1990, Vol 33, Number 4.
2924
+ You might be able to get an electronic copy of this
2925
+ from the ACM Digital Library.
2926
+
2927
+ David J. Wheeler
2928
+ Program bred3.c and accompanying document bred3.ps.
2929
+ This contains the idea behind the multi-table Huffman coding scheme.
2930
+ ftp://ftp.cl.cam.ac.uk/users/djw3/
2931
+
2932
+ Jon L. Bentley and Robert Sedgewick
2933
+ "Fast Algorithms for Sorting and Searching Strings"
2934
+ Available from Sedgewick's web page,
2935
+ www.cs.princeton.edu/~rs
2936
+ </literallayout>
2937
+
2938
+ <para>The following paper gives valuable additional insights into
2939
+ the algorithm, but is not immediately the basis of any code used
2940
+ in bzip2.</para>
2941
+
2942
+ <literallayout>Peter Fenwick:
2943
+ Block Sorting Text Compression
2944
+ Proceedings of the 19th Australasian Computer Science Conference,
2945
+ Melbourne, Australia. Jan 31 - Feb 2, 1996.
2946
+ ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps</literallayout>
2947
+
2948
+ <para>Kunihiko Sadakane's sorting algorithm, mentioned above, is
2949
+ available from:</para>
2950
+
2951
+ <literallayout>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz
2952
+ </literallayout>
2953
+
2954
+ <para>The Manber-Myers suffix array construction algorithm is
2955
+ described in a paper available from:</para>
2956
+
2957
+ <literallayout>http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps
2958
+ </literallayout>
2959
+
2960
+ <para>Finally, the following papers document some
2961
+ investigations I made into the performance of sorting
2962
+ and decompression algorithms:</para>
2963
+
2964
+ <literallayout>Julian Seward
2965
+ On the Performance of BWT Sorting Algorithms
2966
+ Proceedings of the IEEE Data Compression Conference 2000
2967
+ Snowbird, Utah. 28-30 March 2000.
2968
+
2969
+ Julian Seward
2970
+ Space-time Tradeoffs in the Inverse B-W Transform
2971
+ Proceedings of the IEEE Data Compression Conference 2001
2972
+ Snowbird, Utah. 27-29 March 2001.
2973
+ </literallayout>
2974
+
2975
+ </sect1>
2976
+
2977
+ </chapter>
2978
+
2979
+ </book>