kolmoc 1.0.0__tar.gz

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 (297) hide show
  1. kolmoc-1.0.0/MANIFEST.in +7 -0
  2. kolmoc-1.0.0/PKG-INFO +36 -0
  3. kolmoc-1.0.0/README.md +21 -0
  4. kolmoc-1.0.0/kolmo.py +109 -0
  5. kolmoc-1.0.0/kolmoc.egg-info/PKG-INFO +36 -0
  6. kolmoc-1.0.0/kolmoc.egg-info/SOURCES.txt +295 -0
  7. kolmoc-1.0.0/kolmoc.egg-info/dependency_links.txt +1 -0
  8. kolmoc-1.0.0/kolmoc.egg-info/top_level.txt +1 -0
  9. kolmoc-1.0.0/native/src/cli.c +94 -0
  10. kolmoc-1.0.0/native/src/cm.inc +334 -0
  11. kolmoc-1.0.0/native/src/czn.c +1801 -0
  12. kolmoc-1.0.0/native/src/czn.h +71 -0
  13. kolmoc-1.0.0/native/src/log.inc +395 -0
  14. kolmoc-1.0.0/native/src/sci.inc +471 -0
  15. kolmoc-1.0.0/native/src/stream.inc +106 -0
  16. kolmoc-1.0.0/native/src/tbl2.inc +1316 -0
  17. kolmoc-1.0.0/native/src/word.inc +193 -0
  18. kolmoc-1.0.0/native/vendor/brotli/LICENSE +19 -0
  19. kolmoc-1.0.0/native/vendor/brotli/common/constants.c +15 -0
  20. kolmoc-1.0.0/native/vendor/brotli/common/constants.h +201 -0
  21. kolmoc-1.0.0/native/vendor/brotli/common/context.c +156 -0
  22. kolmoc-1.0.0/native/vendor/brotli/common/context.h +113 -0
  23. kolmoc-1.0.0/native/vendor/brotli/common/dictionary.bin +432 -0
  24. kolmoc-1.0.0/native/vendor/brotli/common/dictionary.bin.br +0 -0
  25. kolmoc-1.0.0/native/vendor/brotli/common/dictionary.c +5916 -0
  26. kolmoc-1.0.0/native/vendor/brotli/common/dictionary.h +64 -0
  27. kolmoc-1.0.0/native/vendor/brotli/common/platform.c +23 -0
  28. kolmoc-1.0.0/native/vendor/brotli/common/platform.h +541 -0
  29. kolmoc-1.0.0/native/vendor/brotli/common/shared_dictionary.c +521 -0
  30. kolmoc-1.0.0/native/vendor/brotli/common/shared_dictionary_internal.h +75 -0
  31. kolmoc-1.0.0/native/vendor/brotli/common/transform.c +291 -0
  32. kolmoc-1.0.0/native/vendor/brotli/common/transform.h +85 -0
  33. kolmoc-1.0.0/native/vendor/brotli/common/version.h +51 -0
  34. kolmoc-1.0.0/native/vendor/brotli/dec/bit_reader.c +78 -0
  35. kolmoc-1.0.0/native/vendor/brotli/dec/bit_reader.h +423 -0
  36. kolmoc-1.0.0/native/vendor/brotli/dec/decode.c +2875 -0
  37. kolmoc-1.0.0/native/vendor/brotli/dec/huffman.c +342 -0
  38. kolmoc-1.0.0/native/vendor/brotli/dec/huffman.h +122 -0
  39. kolmoc-1.0.0/native/vendor/brotli/dec/prefix.h +733 -0
  40. kolmoc-1.0.0/native/vendor/brotli/dec/state.c +183 -0
  41. kolmoc-1.0.0/native/vendor/brotli/dec/state.h +400 -0
  42. kolmoc-1.0.0/native/vendor/brotli/enc/backward_references.c +207 -0
  43. kolmoc-1.0.0/native/vendor/brotli/enc/backward_references.h +40 -0
  44. kolmoc-1.0.0/native/vendor/brotli/enc/backward_references_hq.c +939 -0
  45. kolmoc-1.0.0/native/vendor/brotli/enc/backward_references_hq.h +96 -0
  46. kolmoc-1.0.0/native/vendor/brotli/enc/backward_references_inc.h +189 -0
  47. kolmoc-1.0.0/native/vendor/brotli/enc/bit_cost.c +36 -0
  48. kolmoc-1.0.0/native/vendor/brotli/enc/bit_cost.h +64 -0
  49. kolmoc-1.0.0/native/vendor/brotli/enc/bit_cost_inc.h +127 -0
  50. kolmoc-1.0.0/native/vendor/brotli/enc/block_encoder_inc.h +34 -0
  51. kolmoc-1.0.0/native/vendor/brotli/enc/block_splitter.c +217 -0
  52. kolmoc-1.0.0/native/vendor/brotli/enc/block_splitter.h +52 -0
  53. kolmoc-1.0.0/native/vendor/brotli/enc/block_splitter_inc.h +481 -0
  54. kolmoc-1.0.0/native/vendor/brotli/enc/brotli_bit_stream.c +1336 -0
  55. kolmoc-1.0.0/native/vendor/brotli/enc/brotli_bit_stream.h +89 -0
  56. kolmoc-1.0.0/native/vendor/brotli/enc/cluster.c +57 -0
  57. kolmoc-1.0.0/native/vendor/brotli/enc/cluster.h +49 -0
  58. kolmoc-1.0.0/native/vendor/brotli/enc/cluster_inc.h +325 -0
  59. kolmoc-1.0.0/native/vendor/brotli/enc/command.c +28 -0
  60. kolmoc-1.0.0/native/vendor/brotli/enc/command.h +191 -0
  61. kolmoc-1.0.0/native/vendor/brotli/enc/compound_dictionary.c +207 -0
  62. kolmoc-1.0.0/native/vendor/brotli/enc/compound_dictionary.h +74 -0
  63. kolmoc-1.0.0/native/vendor/brotli/enc/compress_fragment.c +800 -0
  64. kolmoc-1.0.0/native/vendor/brotli/enc/compress_fragment.h +86 -0
  65. kolmoc-1.0.0/native/vendor/brotli/enc/compress_fragment_two_pass.c +657 -0
  66. kolmoc-1.0.0/native/vendor/brotli/enc/compress_fragment_two_pass.h +72 -0
  67. kolmoc-1.0.0/native/vendor/brotli/enc/dictionary_hash.c +1848 -0
  68. kolmoc-1.0.0/native/vendor/brotli/enc/dictionary_hash.h +25 -0
  69. kolmoc-1.0.0/native/vendor/brotli/enc/encode.c +1996 -0
  70. kolmoc-1.0.0/native/vendor/brotli/enc/encoder_dict.c +640 -0
  71. kolmoc-1.0.0/native/vendor/brotli/enc/encoder_dict.h +157 -0
  72. kolmoc-1.0.0/native/vendor/brotli/enc/entropy_encode.c +504 -0
  73. kolmoc-1.0.0/native/vendor/brotli/enc/entropy_encode.h +123 -0
  74. kolmoc-1.0.0/native/vendor/brotli/enc/entropy_encode_static.h +542 -0
  75. kolmoc-1.0.0/native/vendor/brotli/enc/fast_log.c +105 -0
  76. kolmoc-1.0.0/native/vendor/brotli/enc/fast_log.h +67 -0
  77. kolmoc-1.0.0/native/vendor/brotli/enc/find_match_length.h +72 -0
  78. kolmoc-1.0.0/native/vendor/brotli/enc/hash.h +728 -0
  79. kolmoc-1.0.0/native/vendor/brotli/enc/hash_composite_inc.h +140 -0
  80. kolmoc-1.0.0/native/vendor/brotli/enc/hash_forgetful_chain_inc.h +295 -0
  81. kolmoc-1.0.0/native/vendor/brotli/enc/hash_longest_match64_inc.h +262 -0
  82. kolmoc-1.0.0/native/vendor/brotli/enc/hash_longest_match_inc.h +258 -0
  83. kolmoc-1.0.0/native/vendor/brotli/enc/hash_longest_match_quickly_inc.h +266 -0
  84. kolmoc-1.0.0/native/vendor/brotli/enc/hash_rolling_inc.h +212 -0
  85. kolmoc-1.0.0/native/vendor/brotli/enc/hash_to_binary_tree_inc.h +330 -0
  86. kolmoc-1.0.0/native/vendor/brotli/enc/histogram.c +100 -0
  87. kolmoc-1.0.0/native/vendor/brotli/enc/histogram.h +64 -0
  88. kolmoc-1.0.0/native/vendor/brotli/enc/histogram_inc.h +51 -0
  89. kolmoc-1.0.0/native/vendor/brotli/enc/literal_cost.c +180 -0
  90. kolmoc-1.0.0/native/vendor/brotli/enc/literal_cost.h +32 -0
  91. kolmoc-1.0.0/native/vendor/brotli/enc/memory.c +194 -0
  92. kolmoc-1.0.0/native/vendor/brotli/enc/memory.h +131 -0
  93. kolmoc-1.0.0/native/vendor/brotli/enc/metablock.c +677 -0
  94. kolmoc-1.0.0/native/vendor/brotli/enc/metablock.h +106 -0
  95. kolmoc-1.0.0/native/vendor/brotli/enc/metablock_inc.h +185 -0
  96. kolmoc-1.0.0/native/vendor/brotli/enc/params.h +47 -0
  97. kolmoc-1.0.0/native/vendor/brotli/enc/prefix.h +54 -0
  98. kolmoc-1.0.0/native/vendor/brotli/enc/quality.h +202 -0
  99. kolmoc-1.0.0/native/vendor/brotli/enc/ringbuffer.h +168 -0
  100. kolmoc-1.0.0/native/vendor/brotli/enc/state.h +104 -0
  101. kolmoc-1.0.0/native/vendor/brotli/enc/static_dict.c +542 -0
  102. kolmoc-1.0.0/native/vendor/brotli/enc/static_dict.h +41 -0
  103. kolmoc-1.0.0/native/vendor/brotli/enc/static_dict_lut.h +5866 -0
  104. kolmoc-1.0.0/native/vendor/brotli/enc/utf8_util.c +85 -0
  105. kolmoc-1.0.0/native/vendor/brotli/enc/utf8_util.h +33 -0
  106. kolmoc-1.0.0/native/vendor/brotli/enc/write_bits.h +88 -0
  107. kolmoc-1.0.0/native/vendor/brotli/include/brotli/decode.h +409 -0
  108. kolmoc-1.0.0/native/vendor/brotli/include/brotli/encode.h +501 -0
  109. kolmoc-1.0.0/native/vendor/brotli/include/brotli/port.h +305 -0
  110. kolmoc-1.0.0/native/vendor/brotli/include/brotli/shared_dictionary.h +100 -0
  111. kolmoc-1.0.0/native/vendor/brotli/include/brotli/types.h +83 -0
  112. kolmoc-1.0.0/native/vendor/libbsc/LICENSE +202 -0
  113. kolmoc-1.0.0/native/vendor/libbsc/VERSION +1 -0
  114. kolmoc-1.0.0/native/vendor/libbsc/libbsc/adler32/adler32.cpp +304 -0
  115. kolmoc-1.0.0/native/vendor/libbsc/libbsc/adler32/adler32.h +66 -0
  116. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/bwt.cpp +349 -0
  117. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/bwt.h +78 -0
  118. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libcubwt/AUTHORS +11 -0
  119. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libcubwt/CHANGES +18 -0
  120. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libcubwt/LICENSE +201 -0
  121. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libcubwt/VERSION +1 -0
  122. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libcubwt/libcubwt.cuh +107 -0
  123. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libsais/CHANGES +110 -0
  124. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libsais/LICENSE +219 -0
  125. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libsais/VERSION +1 -0
  126. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libsais/libsais.c +13861 -0
  127. kolmoc-1.0.0/native/vendor/libbsc/libbsc/bwt/libsais/libsais.h +531 -0
  128. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/coder.cpp +462 -0
  129. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/coder.h +76 -0
  130. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/common/predictor.h +238 -0
  131. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/common/rangecoder.h +277 -0
  132. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/common/tables.h +1872 -0
  133. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/qlfc/qlfc.cpp +2362 -0
  134. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/qlfc/qlfc.h +139 -0
  135. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/qlfc/qlfc_model.cpp +89 -0
  136. kolmoc-1.0.0/native/vendor/libbsc/libbsc/coder/qlfc/qlfc_model.h +269 -0
  137. kolmoc-1.0.0/native/vendor/libbsc/libbsc/filters/detectors.cpp +585 -0
  138. kolmoc-1.0.0/native/vendor/libbsc/libbsc/filters/preprocessing.cpp +180 -0
  139. kolmoc-1.0.0/native/vendor/libbsc/libbsc/filters/tables.h +754 -0
  140. kolmoc-1.0.0/native/vendor/libbsc/libbsc/filters.h +125 -0
  141. kolmoc-1.0.0/native/vendor/libbsc/libbsc/libbsc/libbsc.cpp +667 -0
  142. kolmoc-1.0.0/native/vendor/libbsc/libbsc/libbsc.h +184 -0
  143. kolmoc-1.0.0/native/vendor/libbsc/libbsc/lzp/lzp.cpp +1261 -0
  144. kolmoc-1.0.0/native/vendor/libbsc/libbsc/lzp/lzp.h +73 -0
  145. kolmoc-1.0.0/native/vendor/libbsc/libbsc/platform/platform.cpp +278 -0
  146. kolmoc-1.0.0/native/vendor/libbsc/libbsc/platform/platform.h +246 -0
  147. kolmoc-1.0.0/native/vendor/libbsc/libbsc/st/st.cpp +1533 -0
  148. kolmoc-1.0.0/native/vendor/libbsc/libbsc/st/st.cuh +69 -0
  149. kolmoc-1.0.0/native/vendor/libbsc/libbsc/st/st.h +80 -0
  150. kolmoc-1.0.0/native/vendor/lz4/LICENSE +12 -0
  151. kolmoc-1.0.0/native/vendor/lz4/lz4.c +2829 -0
  152. kolmoc-1.0.0/native/vendor/lz4/lz4.h +884 -0
  153. kolmoc-1.0.0/native/vendor/lz4/lz4hc.c +2192 -0
  154. kolmoc-1.0.0/native/vendor/lz4/lz4hc.h +414 -0
  155. kolmoc-1.0.0/native/vendor/xxhash/LICENSE +26 -0
  156. kolmoc-1.0.0/native/vendor/xxhash/czn_xxh3.c +7 -0
  157. kolmoc-1.0.0/native/vendor/xxhash/xxhash.h +6773 -0
  158. kolmoc-1.0.0/native/vendor/zstd/.gitignore +3 -0
  159. kolmoc-1.0.0/native/vendor/zstd/BUCK +232 -0
  160. kolmoc-1.0.0/native/vendor/zstd/LICENSE +30 -0
  161. kolmoc-1.0.0/native/vendor/zstd/Makefile +389 -0
  162. kolmoc-1.0.0/native/vendor/zstd/README.md +248 -0
  163. kolmoc-1.0.0/native/vendor/zstd/common/allocations.h +55 -0
  164. kolmoc-1.0.0/native/vendor/zstd/common/bits.h +205 -0
  165. kolmoc-1.0.0/native/vendor/zstd/common/bitstream.h +454 -0
  166. kolmoc-1.0.0/native/vendor/zstd/common/compiler.h +464 -0
  167. kolmoc-1.0.0/native/vendor/zstd/common/cpu.h +249 -0
  168. kolmoc-1.0.0/native/vendor/zstd/common/debug.c +30 -0
  169. kolmoc-1.0.0/native/vendor/zstd/common/debug.h +107 -0
  170. kolmoc-1.0.0/native/vendor/zstd/common/entropy_common.c +340 -0
  171. kolmoc-1.0.0/native/vendor/zstd/common/error_private.c +64 -0
  172. kolmoc-1.0.0/native/vendor/zstd/common/error_private.h +158 -0
  173. kolmoc-1.0.0/native/vendor/zstd/common/fse.h +625 -0
  174. kolmoc-1.0.0/native/vendor/zstd/common/fse_decompress.c +315 -0
  175. kolmoc-1.0.0/native/vendor/zstd/common/huf.h +277 -0
  176. kolmoc-1.0.0/native/vendor/zstd/common/mem.h +422 -0
  177. kolmoc-1.0.0/native/vendor/zstd/common/pool.c +371 -0
  178. kolmoc-1.0.0/native/vendor/zstd/common/pool.h +81 -0
  179. kolmoc-1.0.0/native/vendor/zstd/common/portability_macros.h +171 -0
  180. kolmoc-1.0.0/native/vendor/zstd/common/threading.c +182 -0
  181. kolmoc-1.0.0/native/vendor/zstd/common/threading.h +142 -0
  182. kolmoc-1.0.0/native/vendor/zstd/common/xxhash.c +18 -0
  183. kolmoc-1.0.0/native/vendor/zstd/common/xxhash.h +7094 -0
  184. kolmoc-1.0.0/native/vendor/zstd/common/zstd_common.c +48 -0
  185. kolmoc-1.0.0/native/vendor/zstd/common/zstd_deps.h +123 -0
  186. kolmoc-1.0.0/native/vendor/zstd/common/zstd_internal.h +324 -0
  187. kolmoc-1.0.0/native/vendor/zstd/common/zstd_trace.h +156 -0
  188. kolmoc-1.0.0/native/vendor/zstd/compress/clevels.h +134 -0
  189. kolmoc-1.0.0/native/vendor/zstd/compress/fse_compress.c +625 -0
  190. kolmoc-1.0.0/native/vendor/zstd/compress/hist.c +191 -0
  191. kolmoc-1.0.0/native/vendor/zstd/compress/hist.h +82 -0
  192. kolmoc-1.0.0/native/vendor/zstd/compress/huf_compress.c +1464 -0
  193. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress.c +7843 -0
  194. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress_internal.h +1636 -0
  195. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress_literals.c +235 -0
  196. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress_literals.h +39 -0
  197. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress_sequences.c +442 -0
  198. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress_sequences.h +55 -0
  199. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress_superblock.c +688 -0
  200. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_compress_superblock.h +32 -0
  201. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_cwksp.h +765 -0
  202. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_double_fast.c +778 -0
  203. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_double_fast.h +42 -0
  204. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_fast.c +985 -0
  205. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_fast.h +30 -0
  206. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_lazy.c +2199 -0
  207. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_lazy.h +193 -0
  208. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_ldm.c +745 -0
  209. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_ldm.h +109 -0
  210. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_ldm_geartab.h +106 -0
  211. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_opt.c +1580 -0
  212. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_opt.h +72 -0
  213. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_preSplit.c +238 -0
  214. kolmoc-1.0.0/native/vendor/zstd/compress/zstd_preSplit.h +33 -0
  215. kolmoc-1.0.0/native/vendor/zstd/compress/zstdmt_compress.c +1923 -0
  216. kolmoc-1.0.0/native/vendor/zstd/compress/zstdmt_compress.h +102 -0
  217. kolmoc-1.0.0/native/vendor/zstd/decompress/huf_decompress.c +1944 -0
  218. kolmoc-1.0.0/native/vendor/zstd/decompress/huf_decompress_amd64.S +602 -0
  219. kolmoc-1.0.0/native/vendor/zstd/decompress/zstd_ddict.c +244 -0
  220. kolmoc-1.0.0/native/vendor/zstd/decompress/zstd_ddict.h +44 -0
  221. kolmoc-1.0.0/native/vendor/zstd/decompress/zstd_decompress.c +2410 -0
  222. kolmoc-1.0.0/native/vendor/zstd/decompress/zstd_decompress_block.c +2209 -0
  223. kolmoc-1.0.0/native/vendor/zstd/decompress/zstd_decompress_block.h +73 -0
  224. kolmoc-1.0.0/native/vendor/zstd/decompress/zstd_decompress_internal.h +240 -0
  225. kolmoc-1.0.0/native/vendor/zstd/deprecated/zbuff.h +214 -0
  226. kolmoc-1.0.0/native/vendor/zstd/deprecated/zbuff_common.c +26 -0
  227. kolmoc-1.0.0/native/vendor/zstd/deprecated/zbuff_compress.c +167 -0
  228. kolmoc-1.0.0/native/vendor/zstd/deprecated/zbuff_decompress.c +77 -0
  229. kolmoc-1.0.0/native/vendor/zstd/dictBuilder/cover.c +1302 -0
  230. kolmoc-1.0.0/native/vendor/zstd/dictBuilder/cover.h +152 -0
  231. kolmoc-1.0.0/native/vendor/zstd/dictBuilder/divsufsort.c +1913 -0
  232. kolmoc-1.0.0/native/vendor/zstd/dictBuilder/divsufsort.h +57 -0
  233. kolmoc-1.0.0/native/vendor/zstd/dictBuilder/fastcover.c +766 -0
  234. kolmoc-1.0.0/native/vendor/zstd/dictBuilder/zdict.c +1133 -0
  235. kolmoc-1.0.0/native/vendor/zstd/dll/example/Makefile +48 -0
  236. kolmoc-1.0.0/native/vendor/zstd/dll/example/README.md +63 -0
  237. kolmoc-1.0.0/native/vendor/zstd/dll/example/build_package.bat +20 -0
  238. kolmoc-1.0.0/native/vendor/zstd/dll/example/fullbench-dll.sln +25 -0
  239. kolmoc-1.0.0/native/vendor/zstd/dll/example/fullbench-dll.vcxproj +181 -0
  240. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_legacy.h +452 -0
  241. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v01.c +2127 -0
  242. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v01.h +94 -0
  243. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v02.c +3465 -0
  244. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v02.h +93 -0
  245. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v03.c +3105 -0
  246. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v03.h +93 -0
  247. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v04.c +3598 -0
  248. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v04.h +142 -0
  249. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v05.c +4005 -0
  250. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v05.h +162 -0
  251. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v06.c +4110 -0
  252. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v06.h +172 -0
  253. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v07.c +4490 -0
  254. kolmoc-1.0.0/native/vendor/zstd/legacy/zstd_v07.h +187 -0
  255. kolmoc-1.0.0/native/vendor/zstd/libzstd.mk +235 -0
  256. kolmoc-1.0.0/native/vendor/zstd/libzstd.pc.in +16 -0
  257. kolmoc-1.0.0/native/vendor/zstd/module.modulemap +35 -0
  258. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/cover.d +48 -0
  259. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/debug.d +4 -0
  260. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/divsufsort.d +4 -0
  261. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/entropy_common.d +24 -0
  262. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/error_private.d +14 -0
  263. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/fastcover.d +68 -0
  264. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/fse_compress.d +38 -0
  265. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/fse_decompress.d +22 -0
  266. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/hist.d +22 -0
  267. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/huf_compress.d +38 -0
  268. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/huf_decompress.d +50 -0
  269. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/pool.d +22 -0
  270. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/threading.d +6 -0
  271. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/xxhash.d +4 -0
  272. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zdict.d +72 -0
  273. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_common.d +36 -0
  274. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress.d +82 -0
  275. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress_literals.d +52 -0
  276. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress_sequences.d +54 -0
  277. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress_superblock.d +64 -0
  278. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_ddict.d +68 -0
  279. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_decompress.d +74 -0
  280. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_decompress_block.d +58 -0
  281. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_double_fast.d +54 -0
  282. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_fast.d +54 -0
  283. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_lazy.d +52 -0
  284. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_ldm.d +66 -0
  285. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_opt.d +56 -0
  286. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_preSplit.d +46 -0
  287. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_v05.d +18 -0
  288. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_v06.d +18 -0
  289. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_v07.d +20 -0
  290. kolmoc-1.0.0/native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstdmt_compress.d +64 -0
  291. kolmoc-1.0.0/native/vendor/zstd/zdict.h +481 -0
  292. kolmoc-1.0.0/native/vendor/zstd/zstd.h +3198 -0
  293. kolmoc-1.0.0/native/vendor/zstd/zstd_errors.h +107 -0
  294. kolmoc-1.0.0/pyproject.toml +27 -0
  295. kolmoc-1.0.0/setup.cfg +4 -0
  296. kolmoc-1.0.0/setup.py +182 -0
  297. kolmoc-1.0.0/sync-native.sh +11 -0
@@ -0,0 +1,7 @@
1
+ # Ship the native core in the sdist so `pip install kolmo` can build it anywhere.
2
+ graft native/src
3
+ graft native/vendor
4
+ include README.md
5
+ include sync-native.sh
6
+ global-exclude *.o *.a *.so *.dylib
7
+ prune native/**/build
kolmoc-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: kolmoc
3
+ Version: 1.0.0
4
+ Summary: kolmo — structure-aware lossless compressor: best ratio across tables, logs and scientific data, with decode that scales across cores. Installs as `kolmoc`, imports as `kolmo`.
5
+ Author: Adnane Aqartit and contributors
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/adnaneben/kolmo
8
+ Project-URL: Repository, https://github.com/adnaneben/kolmo
9
+ Keywords: compression,lossless,columnar,zstd,simd
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Topic :: System :: Archiving :: Compression
12
+ Classifier: Programming Language :: Python :: 3
13
+ Requires-Python: >=3.8
14
+ Description-Content-Type: text/markdown
15
+
16
+ # kolmo (Python binding)
17
+
18
+ Python bindings for [kolmo](https://github.com/adnaneben/kolmo), a structure-aware lossless
19
+ compressor. Thin `ctypes` wrappers over the native core; the shared library is built and
20
+ bundled at install time, so there is no runtime build dependency.
21
+
22
+ ```bash
23
+ pip install kolmoc # the distribution is "kolmoc" ("kolmo" was taken on PyPI); it imports as kolmo
24
+ ```
25
+
26
+ ```python
27
+ import kolmo
28
+ blob = kolmo.compress(open("data.csv", "rb").read(), mode="hc") # rt|fast|eco|hc|max|ultra
29
+ data = kolmo.decompress(blob) # whole file
30
+ part = kolmo.read_range(blob, 1_000_000, 4096) # decode only the overlapping blocks
31
+ ```
32
+
33
+ `threads=0` (the default) uses all cores. Apache-2.0.
34
+
35
+ Installing from source needs a C toolchain and `liblzma`. Distributable wheels (one per
36
+ platform, no toolchain needed) are produced in CI with `cibuildwheel` / `python -m build`.
kolmoc-1.0.0/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # kolmo (Python binding)
2
+
3
+ Python bindings for [kolmo](https://github.com/adnaneben/kolmo), a structure-aware lossless
4
+ compressor. Thin `ctypes` wrappers over the native core; the shared library is built and
5
+ bundled at install time, so there is no runtime build dependency.
6
+
7
+ ```bash
8
+ pip install kolmoc # the distribution is "kolmoc" ("kolmo" was taken on PyPI); it imports as kolmo
9
+ ```
10
+
11
+ ```python
12
+ import kolmo
13
+ blob = kolmo.compress(open("data.csv", "rb").read(), mode="hc") # rt|fast|eco|hc|max|ultra
14
+ data = kolmo.decompress(blob) # whole file
15
+ part = kolmo.read_range(blob, 1_000_000, 4096) # decode only the overlapping blocks
16
+ ```
17
+
18
+ `threads=0` (the default) uses all cores. Apache-2.0.
19
+
20
+ Installing from source needs a C toolchain and `liblzma`. Distributable wheels (one per
21
+ platform, no toolchain needed) are produced in CI with `cibuildwheel` / `python -m build`.
kolmoc-1.0.0/kolmo.py ADDED
@@ -0,0 +1,109 @@
1
+ """kolmo — Python binding for the kolmo compressor (ctypes over libkolmo).
2
+
3
+ import kolmo
4
+ blob = kolmo.compress(open("data.csv","rb").read(), mode="hc")
5
+ data = kolmo.decompress(blob) # whole file
6
+ part = kolmo.read_range(blob, 1_000_000, 4096) # bytes [off, off+len) without decoding the rest
7
+
8
+ Build the library first: make lib (produces build/libkolmo.so / .dylib).
9
+ """
10
+ import ctypes, os, sys
11
+
12
+ _MODES = {"rt": 0, "fast": 1, "eco": 2, "hc": 3, "max": 4, "ultra": 5}
13
+
14
+ def _load():
15
+ here = os.path.dirname(os.path.abspath(__file__))
16
+ name = "libkolmo.dylib" if sys.platform == "darwin" else "libkolmo.so"
17
+ for p in (os.environ.get("KOLMO_LIB"), os.path.join(here, name), os.path.join(here, "..", "..", "build", name), name):
18
+ if not p:
19
+ continue
20
+ try:
21
+ return ctypes.CDLL(p)
22
+ except OSError:
23
+ continue
24
+ raise OSError("libkolmo not found; run `make lib` and/or set KOLMO_LIB to the shared library path")
25
+
26
+ _lib = _load()
27
+
28
+ class _Params(ctypes.Structure):
29
+ _fields_ = [("mode", ctypes.c_int), ("level", ctypes.c_int), ("threads", ctypes.c_int),
30
+ ("block", ctypes.c_uint32), ("transforms", ctypes.c_int)]
31
+
32
+ _lib.czn_bound.restype = ctypes.c_size_t
33
+ _lib.czn_bound.argtypes = [ctypes.c_size_t, ctypes.POINTER(_Params)]
34
+ _lib.czn_compress.restype = ctypes.c_int64
35
+ _lib.czn_compress.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.c_char_p, ctypes.c_size_t, ctypes.POINTER(_Params)]
36
+ _lib.czn_original_size.restype = ctypes.c_int64
37
+ _lib.czn_original_size.argtypes = [ctypes.c_char_p, ctypes.c_size_t]
38
+ _lib.czn_decompress.restype = ctypes.c_int64
39
+ _lib.czn_decompress.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.c_char_p, ctypes.c_size_t, ctypes.c_int]
40
+ _lib.czn_read_range.restype = ctypes.c_int64
41
+ _lib.czn_read_range.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.c_uint64, ctypes.c_size_t, ctypes.c_char_p, ctypes.c_int]
42
+ _lib.czn_strerror.restype = ctypes.c_char_p
43
+ _lib.czn_strerror.argtypes = [ctypes.c_int64]
44
+ _lib.czn_train_dict.restype = ctypes.c_int64
45
+ _lib.czn_train_dict.argtypes = [ctypes.c_char_p, ctypes.POINTER(ctypes.c_size_t), ctypes.c_size_t,
46
+ ctypes.c_char_p, ctypes.c_size_t]
47
+ _lib.czn_compress_dict.restype = ctypes.c_int64
48
+ _lib.czn_compress_dict.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.c_char_p, ctypes.c_size_t,
49
+ ctypes.POINTER(_Params), ctypes.c_char_p, ctypes.c_size_t]
50
+ _lib.czn_decompress_dict.restype = ctypes.c_int64
51
+ _lib.czn_decompress_dict.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.c_char_p, ctypes.c_size_t,
52
+ ctypes.c_int, ctypes.c_char_p, ctypes.c_size_t]
53
+
54
+ def _check(code):
55
+ if code < 0:
56
+ raise ValueError("kolmo: " + _lib.czn_strerror(code).decode())
57
+ return code
58
+
59
+ def original_size(blob):
60
+ """Original byte length recorded in a compressed blob's header."""
61
+ blob = bytes(blob)
62
+ return _check(_lib.czn_original_size(blob, len(blob)))
63
+
64
+ def read_range(blob, off, length, threads=0):
65
+ """Return bytes [off, off+length) of the original, decoding only the blocks that overlap."""
66
+ blob = bytes(blob)
67
+ out = ctypes.create_string_buffer(length if length else 1)
68
+ got = _check(_lib.czn_read_range(blob, len(blob), off, length, out, threads))
69
+ return out.raw[:got]
70
+
71
+ def train_dict(samples, dict_cap=112 * 1024):
72
+ """Train a dictionary from an iterable of sample bytes (small, similar files). Returns the
73
+ dictionary bytes. Use it with compress(..., dict=d) / decompress(..., dict=d)."""
74
+ samples = [bytes(s) for s in samples]
75
+ if not samples:
76
+ raise ValueError("train_dict: need at least one sample")
77
+ blob = b"".join(samples)
78
+ sizes = (ctypes.c_size_t * len(samples))(*[len(s) for s in samples])
79
+ out = ctypes.create_string_buffer(dict_cap)
80
+ n = _check(_lib.czn_train_dict(blob, sizes, len(samples), out, dict_cap))
81
+ return out.raw[:n]
82
+
83
+ def compress(data, mode="fast", threads=0, block=0, transforms=True, level=0, dict=None): # noqa: A002
84
+ """Compress bytes; returns the compressed bytes. mode: rt|fast|eco|hc|max|ultra.
85
+ Pass dict=<bytes from train_dict> to compress small files against a trained dictionary."""
86
+ if mode not in _MODES:
87
+ raise ValueError("mode must be one of " + ", ".join(_MODES))
88
+ data = bytes(data)
89
+ p = _Params(_MODES[mode], level, threads, block, 1 if transforms else 0)
90
+ cap = _lib.czn_bound(len(data), ctypes.byref(p))
91
+ out = ctypes.create_string_buffer(cap)
92
+ if dict:
93
+ d = bytes(dict)
94
+ n = _check(_lib.czn_compress_dict(data, len(data), out, cap, ctypes.byref(p), d, len(d)))
95
+ else:
96
+ n = _check(_lib.czn_compress(data, len(data), out, cap, ctypes.byref(p)))
97
+ return out.raw[:n]
98
+
99
+ def decompress(blob, threads=0, dict=None): # noqa: A002
100
+ """Decompress a whole blob; returns the original bytes. Pass the same dict used to compress."""
101
+ blob = bytes(blob)
102
+ n = original_size(blob)
103
+ out = ctypes.create_string_buffer(n if n else 1)
104
+ if dict:
105
+ d = bytes(dict)
106
+ got = _check(_lib.czn_decompress_dict(blob, len(blob), out, n, threads, d, len(d)))
107
+ else:
108
+ got = _check(_lib.czn_decompress(blob, len(blob), out, n, threads))
109
+ return out.raw[:got]
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: kolmoc
3
+ Version: 1.0.0
4
+ Summary: kolmo — structure-aware lossless compressor: best ratio across tables, logs and scientific data, with decode that scales across cores. Installs as `kolmoc`, imports as `kolmo`.
5
+ Author: Adnane Aqartit and contributors
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/adnaneben/kolmo
8
+ Project-URL: Repository, https://github.com/adnaneben/kolmo
9
+ Keywords: compression,lossless,columnar,zstd,simd
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Topic :: System :: Archiving :: Compression
12
+ Classifier: Programming Language :: Python :: 3
13
+ Requires-Python: >=3.8
14
+ Description-Content-Type: text/markdown
15
+
16
+ # kolmo (Python binding)
17
+
18
+ Python bindings for [kolmo](https://github.com/adnaneben/kolmo), a structure-aware lossless
19
+ compressor. Thin `ctypes` wrappers over the native core; the shared library is built and
20
+ bundled at install time, so there is no runtime build dependency.
21
+
22
+ ```bash
23
+ pip install kolmoc # the distribution is "kolmoc" ("kolmo" was taken on PyPI); it imports as kolmo
24
+ ```
25
+
26
+ ```python
27
+ import kolmo
28
+ blob = kolmo.compress(open("data.csv", "rb").read(), mode="hc") # rt|fast|eco|hc|max|ultra
29
+ data = kolmo.decompress(blob) # whole file
30
+ part = kolmo.read_range(blob, 1_000_000, 4096) # decode only the overlapping blocks
31
+ ```
32
+
33
+ `threads=0` (the default) uses all cores. Apache-2.0.
34
+
35
+ Installing from source needs a C toolchain and `liblzma`. Distributable wheels (one per
36
+ platform, no toolchain needed) are produced in CI with `cibuildwheel` / `python -m build`.
@@ -0,0 +1,295 @@
1
+ MANIFEST.in
2
+ README.md
3
+ kolmo.py
4
+ pyproject.toml
5
+ setup.py
6
+ sync-native.sh
7
+ kolmoc.egg-info/PKG-INFO
8
+ kolmoc.egg-info/SOURCES.txt
9
+ kolmoc.egg-info/dependency_links.txt
10
+ kolmoc.egg-info/top_level.txt
11
+ native/src/cli.c
12
+ native/src/cm.inc
13
+ native/src/czn.c
14
+ native/src/czn.h
15
+ native/src/log.inc
16
+ native/src/sci.inc
17
+ native/src/stream.inc
18
+ native/src/tbl2.inc
19
+ native/src/word.inc
20
+ native/vendor/brotli/LICENSE
21
+ native/vendor/brotli/common/constants.c
22
+ native/vendor/brotli/common/constants.h
23
+ native/vendor/brotli/common/context.c
24
+ native/vendor/brotli/common/context.h
25
+ native/vendor/brotli/common/dictionary.bin
26
+ native/vendor/brotli/common/dictionary.bin.br
27
+ native/vendor/brotli/common/dictionary.c
28
+ native/vendor/brotli/common/dictionary.h
29
+ native/vendor/brotli/common/platform.c
30
+ native/vendor/brotli/common/platform.h
31
+ native/vendor/brotli/common/shared_dictionary.c
32
+ native/vendor/brotli/common/shared_dictionary_internal.h
33
+ native/vendor/brotli/common/transform.c
34
+ native/vendor/brotli/common/transform.h
35
+ native/vendor/brotli/common/version.h
36
+ native/vendor/brotli/dec/bit_reader.c
37
+ native/vendor/brotli/dec/bit_reader.h
38
+ native/vendor/brotli/dec/decode.c
39
+ native/vendor/brotli/dec/huffman.c
40
+ native/vendor/brotli/dec/huffman.h
41
+ native/vendor/brotli/dec/prefix.h
42
+ native/vendor/brotli/dec/state.c
43
+ native/vendor/brotli/dec/state.h
44
+ native/vendor/brotli/enc/backward_references.c
45
+ native/vendor/brotli/enc/backward_references.h
46
+ native/vendor/brotli/enc/backward_references_hq.c
47
+ native/vendor/brotli/enc/backward_references_hq.h
48
+ native/vendor/brotli/enc/backward_references_inc.h
49
+ native/vendor/brotli/enc/bit_cost.c
50
+ native/vendor/brotli/enc/bit_cost.h
51
+ native/vendor/brotli/enc/bit_cost_inc.h
52
+ native/vendor/brotli/enc/block_encoder_inc.h
53
+ native/vendor/brotli/enc/block_splitter.c
54
+ native/vendor/brotli/enc/block_splitter.h
55
+ native/vendor/brotli/enc/block_splitter_inc.h
56
+ native/vendor/brotli/enc/brotli_bit_stream.c
57
+ native/vendor/brotli/enc/brotli_bit_stream.h
58
+ native/vendor/brotli/enc/cluster.c
59
+ native/vendor/brotli/enc/cluster.h
60
+ native/vendor/brotli/enc/cluster_inc.h
61
+ native/vendor/brotli/enc/command.c
62
+ native/vendor/brotli/enc/command.h
63
+ native/vendor/brotli/enc/compound_dictionary.c
64
+ native/vendor/brotli/enc/compound_dictionary.h
65
+ native/vendor/brotli/enc/compress_fragment.c
66
+ native/vendor/brotli/enc/compress_fragment.h
67
+ native/vendor/brotli/enc/compress_fragment_two_pass.c
68
+ native/vendor/brotli/enc/compress_fragment_two_pass.h
69
+ native/vendor/brotli/enc/dictionary_hash.c
70
+ native/vendor/brotli/enc/dictionary_hash.h
71
+ native/vendor/brotli/enc/encode.c
72
+ native/vendor/brotli/enc/encoder_dict.c
73
+ native/vendor/brotli/enc/encoder_dict.h
74
+ native/vendor/brotli/enc/entropy_encode.c
75
+ native/vendor/brotli/enc/entropy_encode.h
76
+ native/vendor/brotli/enc/entropy_encode_static.h
77
+ native/vendor/brotli/enc/fast_log.c
78
+ native/vendor/brotli/enc/fast_log.h
79
+ native/vendor/brotli/enc/find_match_length.h
80
+ native/vendor/brotli/enc/hash.h
81
+ native/vendor/brotli/enc/hash_composite_inc.h
82
+ native/vendor/brotli/enc/hash_forgetful_chain_inc.h
83
+ native/vendor/brotli/enc/hash_longest_match64_inc.h
84
+ native/vendor/brotli/enc/hash_longest_match_inc.h
85
+ native/vendor/brotli/enc/hash_longest_match_quickly_inc.h
86
+ native/vendor/brotli/enc/hash_rolling_inc.h
87
+ native/vendor/brotli/enc/hash_to_binary_tree_inc.h
88
+ native/vendor/brotli/enc/histogram.c
89
+ native/vendor/brotli/enc/histogram.h
90
+ native/vendor/brotli/enc/histogram_inc.h
91
+ native/vendor/brotli/enc/literal_cost.c
92
+ native/vendor/brotli/enc/literal_cost.h
93
+ native/vendor/brotli/enc/memory.c
94
+ native/vendor/brotli/enc/memory.h
95
+ native/vendor/brotli/enc/metablock.c
96
+ native/vendor/brotli/enc/metablock.h
97
+ native/vendor/brotli/enc/metablock_inc.h
98
+ native/vendor/brotli/enc/params.h
99
+ native/vendor/brotli/enc/prefix.h
100
+ native/vendor/brotli/enc/quality.h
101
+ native/vendor/brotli/enc/ringbuffer.h
102
+ native/vendor/brotli/enc/state.h
103
+ native/vendor/brotli/enc/static_dict.c
104
+ native/vendor/brotli/enc/static_dict.h
105
+ native/vendor/brotli/enc/static_dict_lut.h
106
+ native/vendor/brotli/enc/utf8_util.c
107
+ native/vendor/brotli/enc/utf8_util.h
108
+ native/vendor/brotli/enc/write_bits.h
109
+ native/vendor/brotli/include/brotli/decode.h
110
+ native/vendor/brotli/include/brotli/encode.h
111
+ native/vendor/brotli/include/brotli/port.h
112
+ native/vendor/brotli/include/brotli/shared_dictionary.h
113
+ native/vendor/brotli/include/brotli/types.h
114
+ native/vendor/libbsc/LICENSE
115
+ native/vendor/libbsc/VERSION
116
+ native/vendor/libbsc/libbsc/filters.h
117
+ native/vendor/libbsc/libbsc/libbsc.h
118
+ native/vendor/libbsc/libbsc/adler32/adler32.cpp
119
+ native/vendor/libbsc/libbsc/adler32/adler32.h
120
+ native/vendor/libbsc/libbsc/bwt/bwt.cpp
121
+ native/vendor/libbsc/libbsc/bwt/bwt.h
122
+ native/vendor/libbsc/libbsc/bwt/libcubwt/AUTHORS
123
+ native/vendor/libbsc/libbsc/bwt/libcubwt/CHANGES
124
+ native/vendor/libbsc/libbsc/bwt/libcubwt/LICENSE
125
+ native/vendor/libbsc/libbsc/bwt/libcubwt/VERSION
126
+ native/vendor/libbsc/libbsc/bwt/libcubwt/libcubwt.cuh
127
+ native/vendor/libbsc/libbsc/bwt/libsais/CHANGES
128
+ native/vendor/libbsc/libbsc/bwt/libsais/LICENSE
129
+ native/vendor/libbsc/libbsc/bwt/libsais/VERSION
130
+ native/vendor/libbsc/libbsc/bwt/libsais/libsais.c
131
+ native/vendor/libbsc/libbsc/bwt/libsais/libsais.h
132
+ native/vendor/libbsc/libbsc/coder/coder.cpp
133
+ native/vendor/libbsc/libbsc/coder/coder.h
134
+ native/vendor/libbsc/libbsc/coder/common/predictor.h
135
+ native/vendor/libbsc/libbsc/coder/common/rangecoder.h
136
+ native/vendor/libbsc/libbsc/coder/common/tables.h
137
+ native/vendor/libbsc/libbsc/coder/qlfc/qlfc.cpp
138
+ native/vendor/libbsc/libbsc/coder/qlfc/qlfc.h
139
+ native/vendor/libbsc/libbsc/coder/qlfc/qlfc_model.cpp
140
+ native/vendor/libbsc/libbsc/coder/qlfc/qlfc_model.h
141
+ native/vendor/libbsc/libbsc/filters/detectors.cpp
142
+ native/vendor/libbsc/libbsc/filters/preprocessing.cpp
143
+ native/vendor/libbsc/libbsc/filters/tables.h
144
+ native/vendor/libbsc/libbsc/libbsc/libbsc.cpp
145
+ native/vendor/libbsc/libbsc/lzp/lzp.cpp
146
+ native/vendor/libbsc/libbsc/lzp/lzp.h
147
+ native/vendor/libbsc/libbsc/platform/platform.cpp
148
+ native/vendor/libbsc/libbsc/platform/platform.h
149
+ native/vendor/libbsc/libbsc/st/st.cpp
150
+ native/vendor/libbsc/libbsc/st/st.cuh
151
+ native/vendor/libbsc/libbsc/st/st.h
152
+ native/vendor/lz4/LICENSE
153
+ native/vendor/lz4/lz4.c
154
+ native/vendor/lz4/lz4.h
155
+ native/vendor/lz4/lz4hc.c
156
+ native/vendor/lz4/lz4hc.h
157
+ native/vendor/xxhash/LICENSE
158
+ native/vendor/xxhash/czn_xxh3.c
159
+ native/vendor/xxhash/xxhash.h
160
+ native/vendor/zstd/.gitignore
161
+ native/vendor/zstd/BUCK
162
+ native/vendor/zstd/LICENSE
163
+ native/vendor/zstd/Makefile
164
+ native/vendor/zstd/README.md
165
+ native/vendor/zstd/libzstd.mk
166
+ native/vendor/zstd/libzstd.pc.in
167
+ native/vendor/zstd/module.modulemap
168
+ native/vendor/zstd/zdict.h
169
+ native/vendor/zstd/zstd.h
170
+ native/vendor/zstd/zstd_errors.h
171
+ native/vendor/zstd/common/allocations.h
172
+ native/vendor/zstd/common/bits.h
173
+ native/vendor/zstd/common/bitstream.h
174
+ native/vendor/zstd/common/compiler.h
175
+ native/vendor/zstd/common/cpu.h
176
+ native/vendor/zstd/common/debug.c
177
+ native/vendor/zstd/common/debug.h
178
+ native/vendor/zstd/common/entropy_common.c
179
+ native/vendor/zstd/common/error_private.c
180
+ native/vendor/zstd/common/error_private.h
181
+ native/vendor/zstd/common/fse.h
182
+ native/vendor/zstd/common/fse_decompress.c
183
+ native/vendor/zstd/common/huf.h
184
+ native/vendor/zstd/common/mem.h
185
+ native/vendor/zstd/common/pool.c
186
+ native/vendor/zstd/common/pool.h
187
+ native/vendor/zstd/common/portability_macros.h
188
+ native/vendor/zstd/common/threading.c
189
+ native/vendor/zstd/common/threading.h
190
+ native/vendor/zstd/common/xxhash.c
191
+ native/vendor/zstd/common/xxhash.h
192
+ native/vendor/zstd/common/zstd_common.c
193
+ native/vendor/zstd/common/zstd_deps.h
194
+ native/vendor/zstd/common/zstd_internal.h
195
+ native/vendor/zstd/common/zstd_trace.h
196
+ native/vendor/zstd/compress/clevels.h
197
+ native/vendor/zstd/compress/fse_compress.c
198
+ native/vendor/zstd/compress/hist.c
199
+ native/vendor/zstd/compress/hist.h
200
+ native/vendor/zstd/compress/huf_compress.c
201
+ native/vendor/zstd/compress/zstd_compress.c
202
+ native/vendor/zstd/compress/zstd_compress_internal.h
203
+ native/vendor/zstd/compress/zstd_compress_literals.c
204
+ native/vendor/zstd/compress/zstd_compress_literals.h
205
+ native/vendor/zstd/compress/zstd_compress_sequences.c
206
+ native/vendor/zstd/compress/zstd_compress_sequences.h
207
+ native/vendor/zstd/compress/zstd_compress_superblock.c
208
+ native/vendor/zstd/compress/zstd_compress_superblock.h
209
+ native/vendor/zstd/compress/zstd_cwksp.h
210
+ native/vendor/zstd/compress/zstd_double_fast.c
211
+ native/vendor/zstd/compress/zstd_double_fast.h
212
+ native/vendor/zstd/compress/zstd_fast.c
213
+ native/vendor/zstd/compress/zstd_fast.h
214
+ native/vendor/zstd/compress/zstd_lazy.c
215
+ native/vendor/zstd/compress/zstd_lazy.h
216
+ native/vendor/zstd/compress/zstd_ldm.c
217
+ native/vendor/zstd/compress/zstd_ldm.h
218
+ native/vendor/zstd/compress/zstd_ldm_geartab.h
219
+ native/vendor/zstd/compress/zstd_opt.c
220
+ native/vendor/zstd/compress/zstd_opt.h
221
+ native/vendor/zstd/compress/zstd_preSplit.c
222
+ native/vendor/zstd/compress/zstd_preSplit.h
223
+ native/vendor/zstd/compress/zstdmt_compress.c
224
+ native/vendor/zstd/compress/zstdmt_compress.h
225
+ native/vendor/zstd/decompress/huf_decompress.c
226
+ native/vendor/zstd/decompress/huf_decompress_amd64.S
227
+ native/vendor/zstd/decompress/zstd_ddict.c
228
+ native/vendor/zstd/decompress/zstd_ddict.h
229
+ native/vendor/zstd/decompress/zstd_decompress.c
230
+ native/vendor/zstd/decompress/zstd_decompress_block.c
231
+ native/vendor/zstd/decompress/zstd_decompress_block.h
232
+ native/vendor/zstd/decompress/zstd_decompress_internal.h
233
+ native/vendor/zstd/deprecated/zbuff.h
234
+ native/vendor/zstd/deprecated/zbuff_common.c
235
+ native/vendor/zstd/deprecated/zbuff_compress.c
236
+ native/vendor/zstd/deprecated/zbuff_decompress.c
237
+ native/vendor/zstd/dictBuilder/cover.c
238
+ native/vendor/zstd/dictBuilder/cover.h
239
+ native/vendor/zstd/dictBuilder/divsufsort.c
240
+ native/vendor/zstd/dictBuilder/divsufsort.h
241
+ native/vendor/zstd/dictBuilder/fastcover.c
242
+ native/vendor/zstd/dictBuilder/zdict.c
243
+ native/vendor/zstd/dll/example/Makefile
244
+ native/vendor/zstd/dll/example/README.md
245
+ native/vendor/zstd/dll/example/build_package.bat
246
+ native/vendor/zstd/dll/example/fullbench-dll.sln
247
+ native/vendor/zstd/dll/example/fullbench-dll.vcxproj
248
+ native/vendor/zstd/legacy/zstd_legacy.h
249
+ native/vendor/zstd/legacy/zstd_v01.c
250
+ native/vendor/zstd/legacy/zstd_v01.h
251
+ native/vendor/zstd/legacy/zstd_v02.c
252
+ native/vendor/zstd/legacy/zstd_v02.h
253
+ native/vendor/zstd/legacy/zstd_v03.c
254
+ native/vendor/zstd/legacy/zstd_v03.h
255
+ native/vendor/zstd/legacy/zstd_v04.c
256
+ native/vendor/zstd/legacy/zstd_v04.h
257
+ native/vendor/zstd/legacy/zstd_v05.c
258
+ native/vendor/zstd/legacy/zstd_v05.h
259
+ native/vendor/zstd/legacy/zstd_v06.c
260
+ native/vendor/zstd/legacy/zstd_v06.h
261
+ native/vendor/zstd/legacy/zstd_v07.c
262
+ native/vendor/zstd/legacy/zstd_v07.h
263
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/cover.d
264
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/debug.d
265
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/divsufsort.d
266
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/entropy_common.d
267
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/error_private.d
268
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/fastcover.d
269
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/fse_compress.d
270
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/fse_decompress.d
271
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/hist.d
272
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/huf_compress.d
273
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/huf_decompress.d
274
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/pool.d
275
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/threading.d
276
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/xxhash.d
277
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zdict.d
278
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_common.d
279
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress.d
280
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress_literals.d
281
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress_sequences.d
282
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_compress_superblock.d
283
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_ddict.d
284
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_decompress.d
285
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_decompress_block.d
286
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_double_fast.d
287
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_fast.d
288
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_lazy.d
289
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_ldm.d
290
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_opt.d
291
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_preSplit.d
292
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_v05.d
293
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_v06.d
294
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstd_v07.d
295
+ native/vendor/zstd/obj/conf_8055287114409e2ae6b110871ea321ce/static/zstdmt_compress.d
@@ -0,0 +1 @@
1
+ kolmo
@@ -0,0 +1,94 @@
1
+ /* kolmo command line: kolmo [-m rt|fast|eco|hc|max|ultra] [-l level] [-T threads] [-B MiB] [-n] [-D dict] in out
2
+ * kolmo -s ... (streaming: bounded memory, large inputs)
3
+ * kolmo -d [-T threads] [-D dict] in out (auto-detects one-shot vs streamed)
4
+ * kolmo -r offset:length in out (random access read)
5
+ * kolmo -t dict.bin sample1 sample2 ... (train a dictionary from sample files) */
6
+ #include "czn.h"
7
+ #include <stdio.h>
8
+ #include <stdlib.h>
9
+ #include <string.h>
10
+ #include <unistd.h>
11
+ #include <fcntl.h>
12
+
13
+ static uint8_t *slurp(const char *p, size_t *n) {
14
+ FILE *f = fopen(p, "rb"); if (!f) { perror(p); exit(1); }
15
+ fseek(f, 0, SEEK_END); long s = ftell(f); fseek(f, 0, SEEK_SET);
16
+ uint8_t *b = malloc(s ? s : 1); if (s && fread(b, 1, s, f) != (size_t)s) { perror("read"); exit(1); }
17
+ fclose(f); *n = s; return b;
18
+ }
19
+ static void spit(const char *p, const uint8_t *b, size_t n) {
20
+ FILE *f = fopen(p, "wb"); if (!f || fwrite(b, 1, n, f) != n) { perror(p); exit(1); } fclose(f);
21
+ }
22
+ int main(int argc, char **argv) {
23
+ czn_params P = {CZN_FAST, 0, 0, 0, 1}; int dec = 0, stream = 0, opt, seg = 0; char *range = NULL;
24
+ char *dictpath = NULL, *trainpath = NULL;
25
+ while ((opt = getopt(argc, argv, "m:l:T:B:ndr:sS:D:t:")) != -1) switch (opt) {
26
+ case 'm': P.mode = !strcmp(optarg, "rt") ? CZN_RT : !strcmp(optarg, "fast") ? CZN_FAST : !strcmp(optarg, "eco") ? CZN_ECO :
27
+ !strcmp(optarg, "max") ? CZN_MAX : !strcmp(optarg, "ultra") ? CZN_ULTRA : CZN_HC; break;
28
+ case 'l': P.level = atoi(optarg); break;
29
+ case 'T': P.threads = atoi(optarg); break;
30
+ case 'B': P.block = (uint32_t)(atof(optarg) * 1048576); break;
31
+ case 'n': P.transforms = 0; break;
32
+ case 'd': dec = 1; break;
33
+ case 'r': range = optarg; break;
34
+ case 's': stream = 1; break;
35
+ case 'S': stream = 1; seg = atoi(optarg); break;
36
+ case 'D': dictpath = optarg; break;
37
+ case 't': trainpath = optarg; break;
38
+ default: fprintf(stderr, "usage: kolmo [-m rt|fast|eco|hc|max|ultra] [-l lvl] [-T thr] [-B MiB] [-n] [-D dict] [-s|-S segMiB] | -d [-D dict] | -r off:len | -t dict samples... in out\n"); return 2;
39
+ }
40
+
41
+ /* Training mode: concatenate the sample files given as positional args and write a dictionary. */
42
+ if (trainpath) {
43
+ int nf = argc - optind; if (nf < 1) { fprintf(stderr, "kolmo -t: need at least one sample file\n"); return 2; }
44
+ size_t *sz = malloc(nf * sizeof(size_t)), tot = 0; uint8_t **buf = malloc(nf * sizeof(uint8_t *));
45
+ for (int i = 0; i < nf; i++) { buf[i] = slurp(argv[optind + i], &sz[i]); tot += sz[i]; }
46
+ uint8_t *samp = malloc(tot ? tot : 1); size_t off = 0;
47
+ for (int i = 0; i < nf; i++) { memcpy(samp + off, buf[i], sz[i]); off += sz[i]; free(buf[i]); }
48
+ size_t dcap = 112 * 1024; uint8_t *dict = malloc(dcap);
49
+ int64_t dl = czn_train_dict(samp, sz, nf, dict, dcap);
50
+ if (dl < 0) { fprintf(stderr, "kolmo: train: %s\n", czn_strerror(dl)); return 1; }
51
+ spit(trainpath, dict, (size_t)dl);
52
+ fprintf(stderr, "kolmo: wrote %lld-byte dictionary from %d samples to %s\n", (long long)dl, nf, trainpath);
53
+ return 0;
54
+ }
55
+
56
+ if (argc - optind != 2) { fprintf(stderr, "need input and output paths\n"); return 2; }
57
+ const char *inp = argv[optind], *outp = argv[optind + 1];
58
+
59
+ size_t dictlen = 0; uint8_t *dict = NULL;
60
+ if (dictpath) dict = slurp(dictpath, &dictlen);
61
+
62
+ /* Streaming compress, or decode of a streamed (CZNS) file: bounded memory via file descriptors. */
63
+ int streamed_in = 0;
64
+ if (dec) {
65
+ FILE *pf = fopen(inp, "rb"); if (!pf) { perror(inp); return 1; }
66
+ char mg[4] = {0}; size_t g = fread(mg, 1, 4, pf); fclose(pf);
67
+ streamed_in = (g == 4 && !memcmp(mg, "CZNS", 4));
68
+ }
69
+ if ((stream && !dec && !range) || (dec && streamed_in)) {
70
+ int ifd = open(inp, O_RDONLY); if (ifd < 0) { perror(inp); return 1; }
71
+ int ofd = open(outp, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (ofd < 0) { perror(outp); close(ifd); return 1; }
72
+ int64_t sr = dec ? czn_stream_decompress(ifd, ofd, P.threads)
73
+ : czn_stream_compress(ifd, ofd, &P, (uint32_t)(seg > 0 ? seg : 0));
74
+ close(ifd); close(ofd);
75
+ if (sr < 0) { fprintf(stderr, "kolmo: %s\n", czn_strerror(sr)); return 1; }
76
+ return 0;
77
+ }
78
+
79
+ size_t n; uint8_t *in = slurp(inp, &n), *out; int64_t r;
80
+ if (range) {
81
+ unsigned long long off = strtoull(range, NULL, 10); char *c = strchr(range, ':'); size_t len = c ? strtoull(c + 1, NULL, 10) : 0;
82
+ out = malloc(len ? len : 1); r = czn_read_range(in, n, off, len, out, P.threads);
83
+ } else if (dec) {
84
+ int64_t o = czn_original_size(in, n); if (o < 0) { fprintf(stderr, "kolmo: %s\n", czn_strerror(o)); return 1; }
85
+ out = malloc(o ? o : 1);
86
+ r = dict ? czn_decompress_dict(in, n, out, o, P.threads, dict, dictlen) : czn_decompress(in, n, out, o, P.threads);
87
+ } else {
88
+ size_t cap = czn_bound(n, &P); out = malloc(cap);
89
+ r = dict ? czn_compress_dict(in, n, out, cap, &P, dict, dictlen) : czn_compress(in, n, out, cap, &P);
90
+ }
91
+ if (r < 0) { fprintf(stderr, "kolmo: %s\n", czn_strerror(r)); return 1; }
92
+ spit(outp, out, (size_t)r);
93
+ return 0;
94
+ }