koffi 2.3.6-beta.6 → 2.3.7

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 (276) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +2 -2
  3. package/src/cnoke/cnoke.js +3 -7
  4. package/src/cnoke/src/builder.js +9 -6
  5. package/src/cnoke/src/index.js +2 -2
  6. package/src/koffi/build/2.3.7/koffi_darwin_arm64/koffi.node +0 -0
  7. package/src/koffi/build/2.3.7/koffi_darwin_x64/koffi.node +0 -0
  8. package/src/koffi/build/2.3.7/koffi_freebsd_arm64/koffi.node +0 -0
  9. package/src/koffi/build/2.3.7/koffi_freebsd_ia32/koffi.node +0 -0
  10. package/src/koffi/build/2.3.7/koffi_freebsd_x64/koffi.node +0 -0
  11. package/src/koffi/build/2.3.7/koffi_linux_arm32hf/koffi.node +0 -0
  12. package/src/koffi/build/2.3.7/koffi_linux_arm64/koffi.node +0 -0
  13. package/src/koffi/build/2.3.7/koffi_linux_ia32/koffi.node +0 -0
  14. package/src/koffi/build/2.3.7/koffi_linux_riscv64hf64/koffi.node +0 -0
  15. package/src/koffi/build/2.3.7/koffi_linux_x64/koffi.node +0 -0
  16. package/src/koffi/build/2.3.7/koffi_openbsd_ia32/koffi.node +0 -0
  17. package/src/koffi/build/2.3.7/koffi_openbsd_x64/koffi.node +0 -0
  18. package/src/koffi/build/2.3.7/koffi_win32_arm64/koffi.node +0 -0
  19. package/src/koffi/build/2.3.7/koffi_win32_ia32/koffi.node +0 -0
  20. package/src/koffi/build/2.3.7/koffi_win32_x64/koffi.node +0 -0
  21. package/src/koffi/src/ffi.cc +2 -2
  22. package/src/koffi/src/index.d.ts +2 -2
  23. package/src/koffi/src/index.js +1 -0
  24. package/src/koffi/build/2.3.6-beta.6/koffi_darwin_arm64/koffi.node +0 -0
  25. package/src/koffi/build/2.3.6-beta.6/koffi_darwin_x64/koffi.node +0 -0
  26. package/src/koffi/build/2.3.6-beta.6/koffi_freebsd_arm64/koffi.node +0 -0
  27. package/src/koffi/build/2.3.6-beta.6/koffi_freebsd_ia32/koffi.node +0 -0
  28. package/src/koffi/build/2.3.6-beta.6/koffi_freebsd_x64/koffi.node +0 -0
  29. package/src/koffi/build/2.3.6-beta.6/koffi_linux_arm32hf/koffi.node +0 -0
  30. package/src/koffi/build/2.3.6-beta.6/koffi_linux_arm64/koffi.node +0 -0
  31. package/src/koffi/build/2.3.6-beta.6/koffi_linux_ia32/koffi.node +0 -0
  32. package/src/koffi/build/2.3.6-beta.6/koffi_linux_riscv64hf64/koffi.node +0 -0
  33. package/src/koffi/build/2.3.6-beta.6/koffi_linux_x64/koffi.node +0 -0
  34. package/src/koffi/build/2.3.6-beta.6/koffi_openbsd_ia32/koffi.node +0 -0
  35. package/src/koffi/build/2.3.6-beta.6/koffi_openbsd_x64/koffi.node +0 -0
  36. package/src/koffi/build/2.3.6-beta.6/koffi_win32_arm64/koffi.node +0 -0
  37. package/src/koffi/build/2.3.6-beta.6/koffi_win32_arm64/koffi.pdb +0 -0
  38. package/src/koffi/build/2.3.6-beta.6/koffi_win32_ia32/koffi.node +0 -0
  39. package/src/koffi/build/2.3.6-beta.6/koffi_win32_ia32/koffi.pdb +0 -0
  40. package/src/koffi/build/2.3.6-beta.6/koffi_win32_x64/koffi.node +0 -0
  41. package/src/koffi/build/2.3.6-beta.6/koffi_win32_x64/koffi.pdb +0 -0
  42. package/vendor/brotli/BUILD +0 -144
  43. package/vendor/brotli/CMakeLists.txt +0 -421
  44. package/vendor/brotli/CONTRIBUTING.md +0 -27
  45. package/vendor/brotli/LICENSE +0 -19
  46. package/vendor/brotli/MANIFEST.in +0 -17
  47. package/vendor/brotli/Makefile +0 -55
  48. package/vendor/brotli/Makefile.am +0 -38
  49. package/vendor/brotli/README +0 -15
  50. package/vendor/brotli/README.md +0 -104
  51. package/vendor/brotli/WORKSPACE +0 -21
  52. package/vendor/brotli/bootstrap +0 -35
  53. package/vendor/brotli/c/common/constants.c +0 -15
  54. package/vendor/brotli/c/common/constants.h +0 -200
  55. package/vendor/brotli/c/common/context.c +0 -156
  56. package/vendor/brotli/c/common/context.h +0 -113
  57. package/vendor/brotli/c/common/dictionary.c +0 -5914
  58. package/vendor/brotli/c/common/dictionary.h +0 -64
  59. package/vendor/brotli/c/common/platform.c +0 -22
  60. package/vendor/brotli/c/common/platform.h +0 -596
  61. package/vendor/brotli/c/common/transform.c +0 -291
  62. package/vendor/brotli/c/common/transform.h +0 -85
  63. package/vendor/brotli/c/common/version.h +0 -26
  64. package/vendor/brotli/c/dec/bit_reader.c +0 -76
  65. package/vendor/brotli/c/dec/bit_reader.h +0 -351
  66. package/vendor/brotli/c/dec/decode.c +0 -2608
  67. package/vendor/brotli/c/dec/huffman.c +0 -339
  68. package/vendor/brotli/c/dec/huffman.h +0 -121
  69. package/vendor/brotli/c/dec/prefix.h +0 -732
  70. package/vendor/brotli/c/dec/state.c +0 -159
  71. package/vendor/brotli/c/dec/state.h +0 -365
  72. package/vendor/brotli/c/enc/backward_references.c +0 -145
  73. package/vendor/brotli/c/enc/backward_references.h +0 -39
  74. package/vendor/brotli/c/enc/backward_references_hq.c +0 -843
  75. package/vendor/brotli/c/enc/backward_references_hq.h +0 -95
  76. package/vendor/brotli/c/enc/backward_references_inc.h +0 -163
  77. package/vendor/brotli/c/enc/bit_cost.c +0 -35
  78. package/vendor/brotli/c/enc/bit_cost.h +0 -63
  79. package/vendor/brotli/c/enc/bit_cost_inc.h +0 -127
  80. package/vendor/brotli/c/enc/block_encoder_inc.h +0 -34
  81. package/vendor/brotli/c/enc/block_splitter.c +0 -194
  82. package/vendor/brotli/c/enc/block_splitter.h +0 -51
  83. package/vendor/brotli/c/enc/block_splitter_inc.h +0 -440
  84. package/vendor/brotli/c/enc/brotli_bit_stream.c +0 -1314
  85. package/vendor/brotli/c/enc/brotli_bit_stream.h +0 -84
  86. package/vendor/brotli/c/enc/cluster.c +0 -56
  87. package/vendor/brotli/c/enc/cluster.h +0 -48
  88. package/vendor/brotli/c/enc/cluster_inc.h +0 -320
  89. package/vendor/brotli/c/enc/command.c +0 -28
  90. package/vendor/brotli/c/enc/command.h +0 -190
  91. package/vendor/brotli/c/enc/compress_fragment.c +0 -790
  92. package/vendor/brotli/c/enc/compress_fragment.h +0 -61
  93. package/vendor/brotli/c/enc/compress_fragment_two_pass.c +0 -645
  94. package/vendor/brotli/c/enc/compress_fragment_two_pass.h +0 -54
  95. package/vendor/brotli/c/enc/dictionary_hash.c +0 -1846
  96. package/vendor/brotli/c/enc/dictionary_hash.h +0 -25
  97. package/vendor/brotli/c/enc/encode.c +0 -1927
  98. package/vendor/brotli/c/enc/encoder_dict.c +0 -33
  99. package/vendor/brotli/c/enc/encoder_dict.h +0 -43
  100. package/vendor/brotli/c/enc/entropy_encode.c +0 -503
  101. package/vendor/brotli/c/enc/entropy_encode.h +0 -122
  102. package/vendor/brotli/c/enc/entropy_encode_static.h +0 -539
  103. package/vendor/brotli/c/enc/fast_log.c +0 -105
  104. package/vendor/brotli/c/enc/fast_log.h +0 -66
  105. package/vendor/brotli/c/enc/find_match_length.h +0 -79
  106. package/vendor/brotli/c/enc/hash.h +0 -488
  107. package/vendor/brotli/c/enc/hash_composite_inc.h +0 -125
  108. package/vendor/brotli/c/enc/hash_forgetful_chain_inc.h +0 -293
  109. package/vendor/brotli/c/enc/hash_longest_match64_inc.h +0 -267
  110. package/vendor/brotli/c/enc/hash_longest_match_inc.h +0 -262
  111. package/vendor/brotli/c/enc/hash_longest_match_quickly_inc.h +0 -266
  112. package/vendor/brotli/c/enc/hash_rolling_inc.h +0 -212
  113. package/vendor/brotli/c/enc/hash_to_binary_tree_inc.h +0 -329
  114. package/vendor/brotli/c/enc/histogram.c +0 -100
  115. package/vendor/brotli/c/enc/histogram.h +0 -63
  116. package/vendor/brotli/c/enc/histogram_inc.h +0 -51
  117. package/vendor/brotli/c/enc/literal_cost.c +0 -175
  118. package/vendor/brotli/c/enc/literal_cost.h +0 -30
  119. package/vendor/brotli/c/enc/memory.c +0 -170
  120. package/vendor/brotli/c/enc/memory.h +0 -114
  121. package/vendor/brotli/c/enc/metablock.c +0 -663
  122. package/vendor/brotli/c/enc/metablock.h +0 -105
  123. package/vendor/brotli/c/enc/metablock_inc.h +0 -183
  124. package/vendor/brotli/c/enc/params.h +0 -46
  125. package/vendor/brotli/c/enc/prefix.h +0 -53
  126. package/vendor/brotli/c/enc/quality.h +0 -165
  127. package/vendor/brotli/c/enc/ringbuffer.h +0 -167
  128. package/vendor/brotli/c/enc/static_dict.c +0 -486
  129. package/vendor/brotli/c/enc/static_dict.h +0 -40
  130. package/vendor/brotli/c/enc/static_dict_lut.h +0 -5864
  131. package/vendor/brotli/c/enc/utf8_util.c +0 -85
  132. package/vendor/brotli/c/enc/utf8_util.h +0 -32
  133. package/vendor/brotli/c/enc/write_bits.h +0 -87
  134. package/vendor/brotli/c/include/brotli/decode.h +0 -344
  135. package/vendor/brotli/c/include/brotli/encode.h +0 -448
  136. package/vendor/brotli/c/include/brotli/port.h +0 -288
  137. package/vendor/brotli/c/include/brotli/types.h +0 -83
  138. package/vendor/brotli/c/tools/brotli.c +0 -1116
  139. package/vendor/brotli/c/tools/brotli.md +0 -107
  140. package/vendor/brotli/compiler_config_setting.bzl +0 -28
  141. package/vendor/brotli/configure +0 -8
  142. package/vendor/brotli/configure-cmake +0 -318
  143. package/vendor/brotli/configure.ac +0 -14
  144. package/vendor/brotli/docs/brotli.1 +0 -132
  145. package/vendor/brotli/docs/constants.h.3 +0 -47
  146. package/vendor/brotli/docs/decode.h.3 +0 -415
  147. package/vendor/brotli/docs/encode.h.3 +0 -586
  148. package/vendor/brotli/docs/types.h.3 +0 -117
  149. package/vendor/brotli/premake5.lua +0 -78
  150. package/vendor/brotli/python/Makefile +0 -57
  151. package/vendor/brotli/python/README.md +0 -54
  152. package/vendor/brotli/python/_brotli.cc +0 -753
  153. package/vendor/brotli/python/bro.py +0 -160
  154. package/vendor/brotli/python/brotli.py +0 -56
  155. package/vendor/brotli/python/tests/__init__.py +0 -0
  156. package/vendor/brotli/python/tests/_test_utils.py +0 -112
  157. package/vendor/brotli/python/tests/bro_test.py +0 -102
  158. package/vendor/brotli/python/tests/compress_test.py +0 -41
  159. package/vendor/brotli/python/tests/compressor_test.py +0 -94
  160. package/vendor/brotli/python/tests/decompress_test.py +0 -42
  161. package/vendor/brotli/python/tests/decompressor_test.py +0 -59
  162. package/vendor/brotli/scripts/libbrotlicommon.pc.in +0 -11
  163. package/vendor/brotli/scripts/libbrotlidec.pc.in +0 -12
  164. package/vendor/brotli/scripts/libbrotlienc.pc.in +0 -12
  165. package/vendor/brotli/scripts/sources.lst +0 -104
  166. package/vendor/brotli/setup.cfg +0 -5
  167. package/vendor/brotli/setup.py +0 -293
  168. package/vendor/brotli/tests/Makefile +0 -17
  169. package/vendor/brotli/tests/compatibility_test.sh +0 -25
  170. package/vendor/brotli/tests/roundtrip_test.sh +0 -36
  171. package/vendor/brotli/tests/run-compatibility-test.cmake +0 -31
  172. package/vendor/brotli/tests/run-roundtrip-test.cmake +0 -36
  173. package/vendor/brotli/tests/testdata/empty +0 -0
  174. package/vendor/brotli/tests/testdata/empty.compressed +0 -1
  175. package/vendor/brotli/tests/testdata/ukkonooa +0 -1
  176. package/vendor/brotli/tests/testdata/ukkonooa.compressed +0 -0
  177. package/vendor/dragonbox/CMakeLists.txt +0 -123
  178. package/vendor/dragonbox/LICENSE-Apache2-LLVM +0 -218
  179. package/vendor/dragonbox/LICENSE-Boost +0 -23
  180. package/vendor/dragonbox/README.md +0 -277
  181. package/vendor/dragonbox/cmake/dragonboxConfig.cmake +0 -1
  182. package/vendor/dragonbox/include/dragonbox/dragonbox.h +0 -2674
  183. package/vendor/dragonbox/include/dragonbox/dragonbox_to_chars.h +0 -108
  184. package/vendor/dragonbox/other_files/Dragonbox.pdf +0 -0
  185. package/vendor/dragonbox/other_files/Dragonbox_old.pdf +0 -0
  186. package/vendor/dragonbox/other_files/milo_benchmark.png +0 -0
  187. package/vendor/dragonbox/other_files/unknown_win64_vc2019.html +0 -540
  188. package/vendor/dragonbox/other_files/unknown_win64_vc2019_randomdigit_time.png +0 -0
  189. package/vendor/dragonbox/source/dragonbox_to_chars.cpp +0 -303
  190. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/CMakeLists.txt +0 -24
  191. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.cpp +0 -238
  192. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.h +0 -95
  193. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/grisu_exact.h +0 -2666
  194. package/vendor/dragonbox/subproject/3rdparty/ryu/CMakeLists.txt +0 -16
  195. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/common.h +0 -114
  196. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s.c +0 -509
  197. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_full_table.h +0 -367
  198. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_intrinsics.h +0 -357
  199. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/digit_table.h +0 -35
  200. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s.c +0 -345
  201. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_full_table.h +0 -55
  202. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_intrinsics.h +0 -128
  203. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/ryu.h +0 -46
  204. package/vendor/dragonbox/subproject/3rdparty/schubfach/CMakeLists.txt +0 -22
  205. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.cc +0 -699
  206. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.h +0 -31
  207. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.cc +0 -1354
  208. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.h +0 -31
  209. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/example_shaded_plots.m +0 -68
  210. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/license.txt +0 -25
  211. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution.m +0 -92
  212. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution_prctile.m +0 -121
  213. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_histogram_shaded.m +0 -99
  214. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_shaded.m +0 -93
  215. package/vendor/dragonbox/subproject/benchmark/CMakeLists.txt +0 -65
  216. package/vendor/dragonbox/subproject/benchmark/include/benchmark.h +0 -40
  217. package/vendor/dragonbox/subproject/benchmark/matlab/plot_benchmarks.m +0 -22
  218. package/vendor/dragonbox/subproject/benchmark/matlab/plot_digit_benchmark.m +0 -78
  219. package/vendor/dragonbox/subproject/benchmark/matlab/plot_uniform_benchmark.m +0 -95
  220. package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary32_clang.png +0 -0
  221. package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary32_msvc.png +0 -0
  222. package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary64_clang.png +0 -0
  223. package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary64_msvc.png +0 -0
  224. package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary32_clang.png +0 -0
  225. package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary32_msvc.png +0 -0
  226. package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary64_clang.png +0 -0
  227. package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary64_msvc.png +0 -0
  228. package/vendor/dragonbox/subproject/benchmark/source/benchmark.cpp +0 -238
  229. package/vendor/dragonbox/subproject/benchmark/source/dragonbox.cpp +0 -30
  230. package/vendor/dragonbox/subproject/benchmark/source/grisu_exact.cpp +0 -36
  231. package/vendor/dragonbox/subproject/benchmark/source/ryu.cpp +0 -27
  232. package/vendor/dragonbox/subproject/benchmark/source/schubfach.cpp +0 -31
  233. package/vendor/dragonbox/subproject/common/CMakeLists.txt +0 -42
  234. package/vendor/dragonbox/subproject/common/include/best_rational_approx.h +0 -97
  235. package/vendor/dragonbox/subproject/common/include/big_uint.h +0 -218
  236. package/vendor/dragonbox/subproject/common/include/continued_fractions.h +0 -174
  237. package/vendor/dragonbox/subproject/common/include/good_rational_approx.h +0 -267
  238. package/vendor/dragonbox/subproject/common/include/random_float.h +0 -182
  239. package/vendor/dragonbox/subproject/common/include/rational_continued_fractions.h +0 -57
  240. package/vendor/dragonbox/subproject/common/source/big_uint.cpp +0 -602
  241. package/vendor/dragonbox/subproject/meta/CMakeLists.txt +0 -41
  242. package/vendor/dragonbox/subproject/meta/results/binary32_generated_cache.txt +0 -82
  243. package/vendor/dragonbox/subproject/meta/results/binary64_compressed_cache_error_table.txt +0 -10
  244. package/vendor/dragonbox/subproject/meta/results/binary64_generated_cache.txt +0 -623
  245. package/vendor/dragonbox/subproject/meta/source/generate_cache.cpp +0 -126
  246. package/vendor/dragonbox/subproject/meta/source/live_test.cpp +0 -81
  247. package/vendor/dragonbox/subproject/meta/source/perf_test.cpp +0 -104
  248. package/vendor/dragonbox/subproject/meta/source/sandbox.cpp +0 -20
  249. package/vendor/dragonbox/subproject/test/CMakeLists.txt +0 -70
  250. package/vendor/dragonbox/subproject/test/results/binary32.csv +0 -255
  251. package/vendor/dragonbox/subproject/test/results/binary64.csv +0 -2047
  252. package/vendor/dragonbox/subproject/test/results/plot_required_bits.m +0 -18
  253. package/vendor/dragonbox/subproject/test/source/test_all_shorter_interval_cases.cpp +0 -88
  254. package/vendor/dragonbox/subproject/test/source/uniform_random_test.cpp +0 -95
  255. package/vendor/dragonbox/subproject/test/source/verify_cache_precision.cpp +0 -338
  256. package/vendor/dragonbox/subproject/test/source/verify_compressed_cache.cpp +0 -154
  257. package/vendor/dragonbox/subproject/test/source/verify_fast_multiplication.cpp +0 -168
  258. package/vendor/dragonbox/subproject/test/source/verify_log_computation.cpp +0 -251
  259. package/vendor/dragonbox/subproject/test/source/verify_magic_division.cpp +0 -113
  260. package/vendor/miniz/ChangeLog.md +0 -239
  261. package/vendor/miniz/LICENSE +0 -22
  262. package/vendor/miniz/examples/example1.c +0 -105
  263. package/vendor/miniz/examples/example2.c +0 -164
  264. package/vendor/miniz/examples/example3.c +0 -269
  265. package/vendor/miniz/examples/example4.c +0 -102
  266. package/vendor/miniz/examples/example5.c +0 -327
  267. package/vendor/miniz/examples/example6.c +0 -166
  268. package/vendor/miniz/miniz.c +0 -7835
  269. package/vendor/miniz/miniz.h +0 -1422
  270. package/vendor/miniz/readme.md +0 -46
  271. /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_arm64/koffi.exp +0 -0
  272. /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_arm64/koffi.lib +0 -0
  273. /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_ia32/koffi.exp +0 -0
  274. /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_ia32/koffi.lib +0 -0
  275. /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_x64/koffi.exp +0 -0
  276. /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_x64/koffi.lib +0 -0
@@ -1,586 +0,0 @@
1
- .TH "encode.h" 3 "Thu Feb 22 2018" "Brotli" \" -*- nroff -*-
2
- .ad l
3
- .nh
4
- .SH NAME
5
- encode.h \- API for Brotli compression\&.
6
-
7
- .SH SYNOPSIS
8
- .br
9
- .PP
10
- .SS "Macros"
11
-
12
- .in +1c
13
- .ti -1c
14
- .RI "#define \fBBROTLI_DEFAULT_MODE\fP \fBBROTLI_MODE_GENERIC\fP"
15
- .br
16
- .RI "\fIDefault value for \fBBROTLI_PARAM_MODE\fP parameter\&. \fP"
17
- .ti -1c
18
- .RI "#define \fBBROTLI_DEFAULT_QUALITY\fP 11"
19
- .br
20
- .RI "\fIDefault value for \fBBROTLI_PARAM_QUALITY\fP parameter\&. \fP"
21
- .ti -1c
22
- .RI "#define \fBBROTLI_DEFAULT_WINDOW\fP 22"
23
- .br
24
- .RI "\fIDefault value for \fBBROTLI_PARAM_LGWIN\fP parameter\&. \fP"
25
- .ti -1c
26
- .RI "#define \fBBROTLI_LARGE_MAX_WINDOW_BITS\fP 30"
27
- .br
28
- .RI "\fIMaximal value for \fBBROTLI_PARAM_LGWIN\fP parameter in 'Large Window Brotli' (32-bit)\&. \fP"
29
- .ti -1c
30
- .RI "#define \fBBROTLI_MAX_INPUT_BLOCK_BITS\fP 24"
31
- .br
32
- .RI "\fIMaximal value for \fBBROTLI_PARAM_LGBLOCK\fP parameter\&. \fP"
33
- .ti -1c
34
- .RI "#define \fBBROTLI_MAX_QUALITY\fP 11"
35
- .br
36
- .RI "\fIMaximal value for \fBBROTLI_PARAM_QUALITY\fP parameter\&. \fP"
37
- .ti -1c
38
- .RI "#define \fBBROTLI_MAX_WINDOW_BITS\fP 24"
39
- .br
40
- .RI "\fIMaximal value for \fBBROTLI_PARAM_LGWIN\fP parameter\&. \fP"
41
- .ti -1c
42
- .RI "#define \fBBROTLI_MIN_INPUT_BLOCK_BITS\fP 16"
43
- .br
44
- .RI "\fIMinimal value for \fBBROTLI_PARAM_LGBLOCK\fP parameter\&. \fP"
45
- .ti -1c
46
- .RI "#define \fBBROTLI_MIN_QUALITY\fP 0"
47
- .br
48
- .RI "\fIMinimal value for \fBBROTLI_PARAM_QUALITY\fP parameter\&. \fP"
49
- .ti -1c
50
- .RI "#define \fBBROTLI_MIN_WINDOW_BITS\fP 10"
51
- .br
52
- .RI "\fIMinimal value for \fBBROTLI_PARAM_LGWIN\fP parameter\&. \fP"
53
- .in -1c
54
- .SS "Typedefs"
55
-
56
- .in +1c
57
- .ti -1c
58
- .RI "typedef enum \fBBrotliEncoderMode\fP \fBBrotliEncoderMode\fP"
59
- .br
60
- .RI "\fIOptions for \fBBROTLI_PARAM_MODE\fP parameter\&. \fP"
61
- .ti -1c
62
- .RI "typedef enum \fBBrotliEncoderOperation\fP \fBBrotliEncoderOperation\fP"
63
- .br
64
- .RI "\fIOperations that can be performed by streaming encoder\&. \fP"
65
- .ti -1c
66
- .RI "typedef enum \fBBrotliEncoderParameter\fP \fBBrotliEncoderParameter\fP"
67
- .br
68
- .RI "\fIOptions to be used with \fBBrotliEncoderSetParameter\fP\&. \fP"
69
- .ti -1c
70
- .RI "typedef struct BrotliEncoderStateStruct \fBBrotliEncoderState\fP"
71
- .br
72
- .RI "\fIOpaque structure that holds encoder state\&. \fP"
73
- .in -1c
74
- .SS "Enumerations"
75
- .SS "Functions"
76
-
77
- .in +1c
78
- .ti -1c
79
- .RI "\fBBROTLI_BOOL\fP \fBBrotliEncoderCompress\fP (int quality, int lgwin, \fBBrotliEncoderMode\fP mode, size_t input_size, const uint8_t input_buffer[input_size], size_t *encoded_size, uint8_t encoded_buffer[*encoded_size])"
80
- .br
81
- .RI "\fIPerforms one-shot memory-to-memory compression\&. \fP"
82
- .ti -1c
83
- .RI "\fBBROTLI_BOOL\fP \fBBrotliEncoderCompressStream\fP (\fBBrotliEncoderState\fP *state, \fBBrotliEncoderOperation\fP op, size_t *available_in, const uint8_t **next_in, size_t *available_out, uint8_t **next_out, size_t *total_out)"
84
- .br
85
- .RI "\fICompresses input stream to output stream\&. \fP"
86
- .ti -1c
87
- .RI "\fBBrotliEncoderState\fP * \fBBrotliEncoderCreateInstance\fP (\fBbrotli_alloc_func\fP alloc_func, \fBbrotli_free_func\fP free_func, void *opaque)"
88
- .br
89
- .RI "\fICreates an instance of \fBBrotliEncoderState\fP and initializes it\&. \fP"
90
- .ti -1c
91
- .RI "void \fBBrotliEncoderDestroyInstance\fP (\fBBrotliEncoderState\fP *state)"
92
- .br
93
- .RI "\fIDeinitializes and frees \fBBrotliEncoderState\fP instance\&. \fP"
94
- .ti -1c
95
- .RI "\fBBROTLI_BOOL\fP \fBBrotliEncoderHasMoreOutput\fP (\fBBrotliEncoderState\fP *state)"
96
- .br
97
- .RI "\fIChecks if encoder has more output\&. \fP"
98
- .ti -1c
99
- .RI "\fBBROTLI_BOOL\fP \fBBrotliEncoderIsFinished\fP (\fBBrotliEncoderState\fP *state)"
100
- .br
101
- .RI "\fIChecks if encoder instance reached the final state\&. \fP"
102
- .ti -1c
103
- .RI "size_t \fBBrotliEncoderMaxCompressedSize\fP (size_t input_size)"
104
- .br
105
- .RI "\fICalculates the output size bound for the given \fCinput_size\fP\&. \fP"
106
- .ti -1c
107
- .RI "\fBBROTLI_BOOL\fP \fBBrotliEncoderSetParameter\fP (\fBBrotliEncoderState\fP *state, \fBBrotliEncoderParameter\fP param, uint32_t value)"
108
- .br
109
- .RI "\fISets the specified parameter to the given encoder instance\&. \fP"
110
- .ti -1c
111
- .RI "const uint8_t * \fBBrotliEncoderTakeOutput\fP (\fBBrotliEncoderState\fP *state, size_t *size)"
112
- .br
113
- .RI "\fIAcquires pointer to internal output buffer\&. \fP"
114
- .ti -1c
115
- .RI "uint32_t \fBBrotliEncoderVersion\fP (void)"
116
- .br
117
- .RI "\fIGets an encoder library version\&. \fP"
118
- .in -1c
119
- .SH "Detailed Description"
120
- .PP
121
- API for Brotli compression\&.
122
-
123
-
124
- .SH "Macro Definition Documentation"
125
- .PP
126
- .SS "#define BROTLI_DEFAULT_MODE \fBBROTLI_MODE_GENERIC\fP"
127
-
128
- .PP
129
- Default value for \fBBROTLI_PARAM_MODE\fP parameter\&.
130
- .SS "#define BROTLI_DEFAULT_QUALITY 11"
131
-
132
- .PP
133
- Default value for \fBBROTLI_PARAM_QUALITY\fP parameter\&.
134
- .SS "#define BROTLI_DEFAULT_WINDOW 22"
135
-
136
- .PP
137
- Default value for \fBBROTLI_PARAM_LGWIN\fP parameter\&.
138
- .SS "#define BROTLI_MAX_INPUT_BLOCK_BITS 24"
139
-
140
- .PP
141
- Maximal value for \fBBROTLI_PARAM_LGBLOCK\fP parameter\&.
142
- .SS "#define BROTLI_MAX_QUALITY 11"
143
-
144
- .PP
145
- Maximal value for \fBBROTLI_PARAM_QUALITY\fP parameter\&.
146
- .SS "#define BROTLI_MAX_WINDOW_BITS 24"
147
-
148
- .PP
149
- Maximal value for \fBBROTLI_PARAM_LGWIN\fP parameter\&.
150
- .PP
151
- \fBNote:\fP
152
- .RS 4
153
- equal to \fCBROTLI_MAX_DISTANCE_BITS\fP constant\&.
154
- .RE
155
- .PP
156
-
157
- .SS "#define BROTLI_MIN_INPUT_BLOCK_BITS 16"
158
-
159
- .PP
160
- Minimal value for \fBBROTLI_PARAM_LGBLOCK\fP parameter\&.
161
- .SS "#define BROTLI_MIN_QUALITY 0"
162
-
163
- .PP
164
- Minimal value for \fBBROTLI_PARAM_QUALITY\fP parameter\&.
165
- .SS "#define BROTLI_MIN_WINDOW_BITS 10"
166
-
167
- .PP
168
- Minimal value for \fBBROTLI_PARAM_LGWIN\fP parameter\&.
169
- .SH "Typedef Documentation"
170
- .PP
171
- .SS "typedef enum \fBBrotliEncoderMode\fP \fBBrotliEncoderMode\fP"
172
-
173
- .PP
174
- Options for \fBBROTLI_PARAM_MODE\fP parameter\&.
175
- .SS "typedef enum \fBBrotliEncoderOperation\fP \fBBrotliEncoderOperation\fP"
176
-
177
- .PP
178
- Operations that can be performed by streaming encoder\&.
179
- .SS "typedef enum \fBBrotliEncoderParameter\fP \fBBrotliEncoderParameter\fP"
180
-
181
- .PP
182
- Options to be used with \fBBrotliEncoderSetParameter\fP\&.
183
- .SS "typedef struct BrotliEncoderStateStruct \fBBrotliEncoderState\fP"
184
-
185
- .PP
186
- Opaque structure that holds encoder state\&. Allocated and initialized with \fBBrotliEncoderCreateInstance\fP\&. Cleaned up and deallocated with \fBBrotliEncoderDestroyInstance\fP\&.
187
- .SH "Enumeration Type Documentation"
188
- .PP
189
- .SS "enum \fBBrotliEncoderMode\fP"
190
-
191
- .PP
192
- Options for \fBBROTLI_PARAM_MODE\fP parameter\&.
193
- .PP
194
- \fBEnumerator\fP
195
- .in +1c
196
- .TP
197
- \fB\fIBROTLI_MODE_GENERIC \fP\fP
198
- Default compression mode\&. In this mode compressor does not know anything in advance about the properties of the input\&.
199
- .TP
200
- \fB\fIBROTLI_MODE_TEXT \fP\fP
201
- Compression mode for UTF-8 formatted text input\&.
202
- .TP
203
- \fB\fIBROTLI_MODE_FONT \fP\fP
204
- Compression mode used in WOFF 2\&.0\&.
205
- .SS "enum \fBBrotliEncoderOperation\fP"
206
-
207
- .PP
208
- Operations that can be performed by streaming encoder\&.
209
- .PP
210
- \fBEnumerator\fP
211
- .in +1c
212
- .TP
213
- \fB\fIBROTLI_OPERATION_PROCESS \fP\fP
214
- Process input\&. Encoder may postpone producing output, until it has processed enough input\&.
215
- .TP
216
- \fB\fIBROTLI_OPERATION_FLUSH \fP\fP
217
- Produce output for all processed input\&. Actual flush is performed when input stream is depleted and there is enough space in output stream\&. This means that client should repeat \fBBROTLI_OPERATION_FLUSH\fP operation until \fCavailable_in\fP becomes \fC0\fP, and \fBBrotliEncoderHasMoreOutput\fP returns \fBBROTLI_FALSE\fP\&. If output is acquired via \fBBrotliEncoderTakeOutput\fP, then operation should be repeated after output buffer is drained\&.
218
- .PP
219
- \fBWarning:\fP
220
- .RS 4
221
- Until flush is complete, client \fBSHOULD\fP \fBNOT\fP swap, reduce or extend input stream\&.
222
- .RE
223
- .PP
224
- When flush is complete, output data will be sufficient for decoder to reproduce all the given input\&.
225
- .TP
226
- \fB\fIBROTLI_OPERATION_FINISH \fP\fP
227
- Finalize the stream\&. Actual finalization is performed when input stream is depleted and there is enough space in output stream\&. This means that client should repeat \fBBROTLI_OPERATION_FINISH\fP operation until \fCavailable_in\fP becomes \fC0\fP, and \fBBrotliEncoderHasMoreOutput\fP returns \fBBROTLI_FALSE\fP\&. If output is acquired via \fBBrotliEncoderTakeOutput\fP, then operation should be repeated after output buffer is drained\&.
228
- .PP
229
- \fBWarning:\fP
230
- .RS 4
231
- Until finalization is complete, client \fBSHOULD\fP \fBNOT\fP swap, reduce or extend input stream\&.
232
- .RE
233
- .PP
234
- Helper function \fBBrotliEncoderIsFinished\fP checks if stream is finalized and output fully dumped\&.
235
- .PP
236
- Adding more input data to finalized stream is impossible\&.
237
- .TP
238
- \fB\fIBROTLI_OPERATION_EMIT_METADATA \fP\fP
239
- Emit metadata block to stream\&. Metadata is opaque to Brotli: neither encoder, nor decoder processes this data or relies on it\&. It may be used to pass some extra information from encoder client to decoder client without interfering with main data stream\&.
240
- .PP
241
- \fBNote:\fP
242
- .RS 4
243
- Encoder may emit empty metadata blocks internally, to pad encoded stream to byte boundary\&.
244
- .RE
245
- .PP
246
- \fBWarning:\fP
247
- .RS 4
248
- Until emitting metadata is complete client \fBSHOULD\fP \fBNOT\fP swap, reduce or extend input stream\&.
249
- .PP
250
- The whole content of input buffer is considered to be the content of metadata block\&. Do \fBNOT\fP \fIappend\fP metadata to input stream, before it is depleted with other operations\&.
251
- .RE
252
- .PP
253
- Stream is soft-flushed before metadata block is emitted\&. Metadata block \fBMUST\fP be no longer than than 16MiB\&.
254
- .SS "enum \fBBrotliEncoderParameter\fP"
255
-
256
- .PP
257
- Options to be used with \fBBrotliEncoderSetParameter\fP\&.
258
- .PP
259
- \fBEnumerator\fP
260
- .in +1c
261
- .TP
262
- \fB\fIBROTLI_PARAM_MODE \fP\fP
263
- Tune encoder for specific input\&. \fBBrotliEncoderMode\fP enumerates all available values\&.
264
- .TP
265
- \fB\fIBROTLI_PARAM_QUALITY \fP\fP
266
- The main compression speed-density lever\&. The higher the quality, the slower the compression\&. Range is from \fBBROTLI_MIN_QUALITY\fP to \fBBROTLI_MAX_QUALITY\fP\&.
267
- .TP
268
- \fB\fIBROTLI_PARAM_LGWIN \fP\fP
269
- Recommended sliding LZ77 window size\&. Encoder may reduce this value, e\&.g\&. if input is much smaller than window size\&.
270
- .PP
271
- Window size is \fC(1 << value) - 16\fP\&.
272
- .PP
273
- Range is from \fBBROTLI_MIN_WINDOW_BITS\fP to \fBBROTLI_MAX_WINDOW_BITS\fP\&.
274
- .TP
275
- \fB\fIBROTLI_PARAM_LGBLOCK \fP\fP
276
- Recommended input block size\&. Encoder may reduce this value, e\&.g\&. if input is much smaller than input block size\&.
277
- .PP
278
- Range is from \fBBROTLI_MIN_INPUT_BLOCK_BITS\fP to \fBBROTLI_MAX_INPUT_BLOCK_BITS\fP\&.
279
- .PP
280
- \fBNote:\fP
281
- .RS 4
282
- Bigger input block size allows better compression, but consumes more memory\&.
283
- .br
284
- The rough formula of memory used for temporary input storage is \fC3 << lgBlock\fP\&.
285
- .RE
286
- .PP
287
-
288
- .TP
289
- \fB\fIBROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING \fP\fP
290
- Flag that affects usage of 'literal context modeling' format feature\&. This flag is a 'decoding-speed vs compression ratio' trade-off\&.
291
- .TP
292
- \fB\fIBROTLI_PARAM_SIZE_HINT \fP\fP
293
- Estimated total input size for all \fBBrotliEncoderCompressStream\fP calls\&. The default value is 0, which means that the total input size is unknown\&.
294
- .TP
295
- \fB\fIBROTLI_PARAM_LARGE_WINDOW \fP\fP
296
- Flag that determines if 'Large Window Brotli' is used\&.
297
- .TP
298
- \fB\fIBROTLI_PARAM_NPOSTFIX \fP\fP
299
- Recommended number of postfix bits (NPOSTFIX)\&. Encoder may change this value\&.
300
- .PP
301
- Range is from 0 to \fBBROTLI_MAX_NPOSTFIX\fP\&.
302
- .TP
303
- \fB\fIBROTLI_PARAM_NDIRECT \fP\fP
304
- Recommended number of direct distance codes (NDIRECT)\&. Encoder may change this value\&.
305
- .PP
306
- Range is from 0 to (15 << NPOSTFIX) in steps of (1 << NPOSTFIX)\&.
307
- .TP
308
- \fB\fIBROTLI_PARAM_STREAM_OFFSET \fP\fP
309
- Number of bytes of input stream already processed by a different instance\&.
310
- .PP
311
- \fBNote:\fP
312
- .RS 4
313
- It is important to configure all the encoder instances with same parameters (except this one) in order to allow all the encoded parts obey the same restrictions implied by header\&.
314
- .RE
315
- .PP
316
- If offset is not 0, then stream header is omitted\&. In any case output start is byte aligned, so for proper streams stitching 'predecessor' stream must be flushed\&.
317
- .PP
318
- Range is not artificially limited, but all the values greater or equal to maximal window size have the same effect\&. Values greater than 2**30 are not allowed\&.
319
- .SH "Function Documentation"
320
- .PP
321
- .SS "\fBBROTLI_BOOL\fP BrotliEncoderCompress (int quality, int lgwin, \fBBrotliEncoderMode\fP mode, size_t input_size, const uint8_t input_buffer[input_size], size_t * encoded_size, uint8_t encoded_buffer[*encoded_size])"
322
-
323
- .PP
324
- Performs one-shot memory-to-memory compression\&. Compresses the data in \fCinput_buffer\fP into \fCencoded_buffer\fP, and sets \fC*encoded_size\fP to the compressed length\&.
325
- .PP
326
- \fBNote:\fP
327
- .RS 4
328
- If \fBBrotliEncoderMaxCompressedSize\fP(\fCinput_size\fP) returns non-zero value, then output is guaranteed to be no longer than that\&.
329
- .PP
330
- If \fClgwin\fP is greater than \fBBROTLI_MAX_WINDOW_BITS\fP then resulting stream might be incompatible with RFC 7932; to decode such streams, decoder should be configured with \fBBROTLI_DECODER_PARAM_LARGE_WINDOW\fP = \fC1\fP
331
- .RE
332
- .PP
333
- \fBParameters:\fP
334
- .RS 4
335
- \fIquality\fP quality parameter value, e\&.g\&. \fBBROTLI_DEFAULT_QUALITY\fP
336
- .br
337
- \fIlgwin\fP lgwin parameter value, e\&.g\&. \fBBROTLI_DEFAULT_WINDOW\fP
338
- .br
339
- \fImode\fP mode parameter value, e\&.g\&. \fBBROTLI_DEFAULT_MODE\fP
340
- .br
341
- \fIinput_size\fP size of \fCinput_buffer\fP
342
- .br
343
- \fIinput_buffer\fP input data buffer with at least \fCinput_size\fP addressable bytes
344
- .br
345
- \fIencoded_size\fP \fBin:\fP size of \fCencoded_buffer\fP;
346
- .br
347
- \fBout:\fP length of compressed data written to \fCencoded_buffer\fP, or \fC0\fP if compression fails
348
- .br
349
- \fIencoded_buffer\fP compressed data destination buffer
350
- .RE
351
- .PP
352
- \fBReturns:\fP
353
- .RS 4
354
- \fBBROTLI_FALSE\fP in case of compression error
355
- .PP
356
- \fBBROTLI_FALSE\fP if output buffer is too small
357
- .PP
358
- \fBBROTLI_TRUE\fP otherwise
359
- .RE
360
- .PP
361
-
362
- .SS "\fBBROTLI_BOOL\fP BrotliEncoderCompressStream (\fBBrotliEncoderState\fP * state, \fBBrotliEncoderOperation\fP op, size_t * available_in, const uint8_t ** next_in, size_t * available_out, uint8_t ** next_out, size_t * total_out)"
363
-
364
- .PP
365
- Compresses input stream to output stream\&. The values \fC*available_in\fP and \fC*available_out\fP must specify the number of bytes addressable at \fC*next_in\fP and \fC*next_out\fP respectively\&. When \fC*available_out\fP is \fC0\fP, \fCnext_out\fP is allowed to be \fCNULL\fP\&.
366
- .PP
367
- After each call, \fC*available_in\fP will be decremented by the amount of input bytes consumed, and the \fC*next_in\fP pointer will be incremented by that amount\&. Similarly, \fC*available_out\fP will be decremented by the amount of output bytes written, and the \fC*next_out\fP pointer will be incremented by that amount\&.
368
- .PP
369
- \fCtotal_out\fP, if it is not a null-pointer, will be set to the number of bytes compressed since the last \fCstate\fP initialization\&.
370
- .PP
371
- Internally workflow consists of 3 tasks:
372
- .IP "1." 4
373
- (optionally) copy input data to internal buffer
374
- .IP "2." 4
375
- actually compress data and (optionally) store it to internal buffer
376
- .IP "3." 4
377
- (optionally) copy compressed bytes from internal buffer to output stream
378
- .PP
379
- .PP
380
- Whenever all 3 tasks can't move forward anymore, or error occurs, this method returns the control flow to caller\&.
381
- .PP
382
- \fCop\fP is used to perform flush, finish the stream, or inject metadata block\&. See \fBBrotliEncoderOperation\fP for more information\&.
383
- .PP
384
- Flushing the stream means forcing encoding of all input passed to encoder and completing the current output block, so it could be fully decoded by stream decoder\&. To perform flush set \fCop\fP to \fBBROTLI_OPERATION_FLUSH\fP\&. Under some circumstances (e\&.g\&. lack of output stream capacity) this operation would require several calls to \fBBrotliEncoderCompressStream\fP\&. The method must be called again until both input stream is depleted and encoder has no more output (see \fBBrotliEncoderHasMoreOutput\fP) after the method is called\&.
385
- .PP
386
- Finishing the stream means encoding of all input passed to encoder and adding specific 'final' marks, so stream decoder could determine that stream is complete\&. To perform finish set \fCop\fP to \fBBROTLI_OPERATION_FINISH\fP\&. Under some circumstances (e\&.g\&. lack of output stream capacity) this operation would require several calls to \fBBrotliEncoderCompressStream\fP\&. The method must be called again until both input stream is depleted and encoder has no more output (see \fBBrotliEncoderHasMoreOutput\fP) after the method is called\&.
387
- .PP
388
- \fBWarning:\fP
389
- .RS 4
390
- When flushing and finishing, \fCop\fP should not change until operation is complete; input stream should not be swapped, reduced or extended as well\&.
391
- .RE
392
- .PP
393
- \fBParameters:\fP
394
- .RS 4
395
- \fIstate\fP encoder instance
396
- .br
397
- \fIop\fP requested operation
398
- .br
399
- \fIavailable_in\fP \fBin:\fP amount of available input;
400
- .br
401
- \fBout:\fP amount of unused input
402
- .br
403
- \fInext_in\fP pointer to the next input byte
404
- .br
405
- \fIavailable_out\fP \fBin:\fP length of output buffer;
406
- .br
407
- \fBout:\fP remaining size of output buffer
408
- .br
409
- \fInext_out\fP compressed output buffer cursor; can be \fCNULL\fP if \fCavailable_out\fP is \fC0\fP
410
- .br
411
- \fItotal_out\fP number of bytes produced so far; can be \fCNULL\fP
412
- .RE
413
- .PP
414
- \fBReturns:\fP
415
- .RS 4
416
- \fBBROTLI_FALSE\fP if there was an error
417
- .PP
418
- \fBBROTLI_TRUE\fP otherwise
419
- .RE
420
- .PP
421
-
422
- .SS "\fBBrotliEncoderState\fP* BrotliEncoderCreateInstance (\fBbrotli_alloc_func\fP alloc_func, \fBbrotli_free_func\fP free_func, void * opaque)"
423
-
424
- .PP
425
- Creates an instance of \fBBrotliEncoderState\fP and initializes it\&. \fCalloc_func\fP and \fCfree_func\fP \fBMUST\fP be both zero or both non-zero\&. In the case they are both zero, default memory allocators are used\&. \fCopaque\fP is passed to \fCalloc_func\fP and \fCfree_func\fP when they are called\&. \fCfree_func\fP has to return without doing anything when asked to free a NULL pointer\&.
426
- .PP
427
- \fBParameters:\fP
428
- .RS 4
429
- \fIalloc_func\fP custom memory allocation function
430
- .br
431
- \fIfree_func\fP custom memory free function
432
- .br
433
- \fIopaque\fP custom memory manager handle
434
- .RE
435
- .PP
436
- \fBReturns:\fP
437
- .RS 4
438
- \fC0\fP if instance can not be allocated or initialized
439
- .PP
440
- pointer to initialized \fBBrotliEncoderState\fP otherwise
441
- .RE
442
- .PP
443
-
444
- .SS "void BrotliEncoderDestroyInstance (\fBBrotliEncoderState\fP * state)"
445
-
446
- .PP
447
- Deinitializes and frees \fBBrotliEncoderState\fP instance\&.
448
- .PP
449
- \fBParameters:\fP
450
- .RS 4
451
- \fIstate\fP decoder instance to be cleaned up and deallocated
452
- .RE
453
- .PP
454
-
455
- .SS "\fBBROTLI_BOOL\fP BrotliEncoderHasMoreOutput (\fBBrotliEncoderState\fP * state)"
456
-
457
- .PP
458
- Checks if encoder has more output\&.
459
- .PP
460
- \fBParameters:\fP
461
- .RS 4
462
- \fIstate\fP encoder instance
463
- .RE
464
- .PP
465
- \fBReturns:\fP
466
- .RS 4
467
- \fBBROTLI_TRUE\fP, if encoder has some unconsumed output
468
- .PP
469
- \fBBROTLI_FALSE\fP otherwise
470
- .RE
471
- .PP
472
-
473
- .SS "\fBBROTLI_BOOL\fP BrotliEncoderIsFinished (\fBBrotliEncoderState\fP * state)"
474
-
475
- .PP
476
- Checks if encoder instance reached the final state\&.
477
- .PP
478
- \fBParameters:\fP
479
- .RS 4
480
- \fIstate\fP encoder instance
481
- .RE
482
- .PP
483
- \fBReturns:\fP
484
- .RS 4
485
- \fBBROTLI_TRUE\fP if encoder is in a state where it reached the end of the input and produced all of the output
486
- .PP
487
- \fBBROTLI_FALSE\fP otherwise
488
- .RE
489
- .PP
490
-
491
- .SS "size_t BrotliEncoderMaxCompressedSize (size_t input_size)"
492
-
493
- .PP
494
- Calculates the output size bound for the given \fCinput_size\fP\&.
495
- .PP
496
- \fBWarning:\fP
497
- .RS 4
498
- Result is only valid if quality is at least \fC2\fP and, in case \fBBrotliEncoderCompressStream\fP was used, no flushes (\fBBROTLI_OPERATION_FLUSH\fP) were performed\&.
499
- .RE
500
- .PP
501
- \fBParameters:\fP
502
- .RS 4
503
- \fIinput_size\fP size of projected input
504
- .RE
505
- .PP
506
- \fBReturns:\fP
507
- .RS 4
508
- \fC0\fP if result does not fit \fCsize_t\fP
509
- .RE
510
- .PP
511
-
512
- .SS "\fBBROTLI_BOOL\fP BrotliEncoderSetParameter (\fBBrotliEncoderState\fP * state, \fBBrotliEncoderParameter\fP param, uint32_t value)"
513
-
514
- .PP
515
- Sets the specified parameter to the given encoder instance\&.
516
- .PP
517
- \fBParameters:\fP
518
- .RS 4
519
- \fIstate\fP encoder instance
520
- .br
521
- \fIparam\fP parameter to set
522
- .br
523
- \fIvalue\fP new parameter value
524
- .RE
525
- .PP
526
- \fBReturns:\fP
527
- .RS 4
528
- \fBBROTLI_FALSE\fP if parameter is unrecognized, or value is invalid
529
- .PP
530
- \fBBROTLI_FALSE\fP if value of parameter can not be changed at current encoder state (e\&.g\&. when encoding is started, window size might be already encoded and therefore it is impossible to change it)
531
- .PP
532
- \fBBROTLI_TRUE\fP if value is accepted
533
- .RE
534
- .PP
535
- \fBWarning:\fP
536
- .RS 4
537
- invalid values might be accepted in case they would not break encoding process\&.
538
- .RE
539
- .PP
540
-
541
- .SS "const uint8_t* BrotliEncoderTakeOutput (\fBBrotliEncoderState\fP * state, size_t * size)"
542
-
543
- .PP
544
- Acquires pointer to internal output buffer\&. This method is used to make language bindings easier and more efficient:
545
- .IP "1." 4
546
- push data to \fBBrotliEncoderCompressStream\fP, until \fBBrotliEncoderHasMoreOutput\fP returns BROTL_TRUE
547
- .IP "2." 4
548
- use \fBBrotliEncoderTakeOutput\fP to peek bytes and copy to language-specific entity
549
- .PP
550
- .PP
551
- Also this could be useful if there is an output stream that is able to consume all the provided data (e\&.g\&. when data is saved to file system)\&.
552
- .PP
553
- \fBAttention:\fP
554
- .RS 4
555
- After every call to \fBBrotliEncoderTakeOutput\fP \fC*size\fP bytes of output are considered consumed for all consecutive calls to the instance methods; returned pointer becomes invalidated as well\&.
556
- .RE
557
- .PP
558
- \fBNote:\fP
559
- .RS 4
560
- Encoder output is not guaranteed to be contiguous\&. This means that after the size-unrestricted call to \fBBrotliEncoderTakeOutput\fP, immediate next call to \fBBrotliEncoderTakeOutput\fP may return more data\&.
561
- .RE
562
- .PP
563
- \fBParameters:\fP
564
- .RS 4
565
- \fIstate\fP encoder instance
566
- .br
567
- \fIsize\fP \fBin:\fP number of bytes caller is ready to take, \fC0\fP if any amount could be handled;
568
- .br
569
- \fBout:\fP amount of data pointed by returned pointer and considered consumed;
570
- .br
571
- out value is never greater than in value, unless it is \fC0\fP
572
- .RE
573
- .PP
574
- \fBReturns:\fP
575
- .RS 4
576
- pointer to output data
577
- .RE
578
- .PP
579
-
580
- .SS "uint32_t BrotliEncoderVersion (void)"
581
-
582
- .PP
583
- Gets an encoder library version\&. Look at BROTLI_VERSION for more information\&.
584
- .SH "Author"
585
- .PP
586
- Generated automatically by Doxygen for Brotli from the source code\&.
@@ -1,117 +0,0 @@
1
- .TH "types.h" 3 "Thu Feb 22 2018" "Brotli" \" -*- nroff -*-
2
- .ad l
3
- .nh
4
- .SH NAME
5
- types.h \- Common types used in decoder and encoder API\&.
6
-
7
- .SH SYNOPSIS
8
- .br
9
- .PP
10
- .SS "Macros"
11
-
12
- .in +1c
13
- .ti -1c
14
- .RI "#define \fBBROTLI_BOOL\fP int"
15
- .br
16
- .RI "\fIA portable \fCbool\fP replacement\&. \fP"
17
- .ti -1c
18
- .RI "#define \fBBROTLI_FALSE\fP 0"
19
- .br
20
- .RI "\fIPortable \fCfalse\fP replacement\&. \fP"
21
- .ti -1c
22
- .RI "#define \fBBROTLI_TRUE\fP 1"
23
- .br
24
- .RI "\fIPortable \fCtrue\fP replacement\&. \fP"
25
- .ti -1c
26
- .RI "#define \fBTO_BROTLI_BOOL\fP(X) (!!(X) ? \fBBROTLI_TRUE\fP : \fBBROTLI_FALSE\fP)"
27
- .br
28
- .RI "\fI\fCbool\fP to \fBBROTLI_BOOL\fP conversion macros\&. \fP"
29
- .in -1c
30
- .SS "Typedefs"
31
-
32
- .in +1c
33
- .ti -1c
34
- .RI "typedef void *(* \fBbrotli_alloc_func\fP) (void *opaque, size_t size)"
35
- .br
36
- .RI "\fIAllocating function pointer type\&. \fP"
37
- .ti -1c
38
- .RI "typedef void(* \fBbrotli_free_func\fP) (void *opaque, void *address)"
39
- .br
40
- .RI "\fIDeallocating function pointer type\&. \fP"
41
- .in -1c
42
- .SH "Detailed Description"
43
- .PP
44
- Common types used in decoder and encoder API\&.
45
-
46
-
47
- .SH "Macro Definition Documentation"
48
- .PP
49
- .SS "#define BROTLI_BOOL int"
50
-
51
- .PP
52
- A portable \fCbool\fP replacement\&. \fBBROTLI_BOOL\fP is a 'documentation' type: actually it is \fCint\fP, but in API it denotes a type, whose only values are \fBBROTLI_TRUE\fP and \fBBROTLI_FALSE\fP\&.
53
- .PP
54
- \fBBROTLI_BOOL\fP values passed to Brotli should either be \fBBROTLI_TRUE\fP or \fBBROTLI_FALSE\fP, or be a result of \fBTO_BROTLI_BOOL\fP macros\&.
55
- .PP
56
- \fBBROTLI_BOOL\fP values returned by Brotli should not be tested for equality with \fCtrue\fP, \fCfalse\fP, \fBBROTLI_TRUE\fP, \fBBROTLI_FALSE\fP, but rather should be evaluated, for example:
57
- .PP
58
- .nf
59
- if (SomeBrotliFunction(encoder, BROTLI_TRUE) &&
60
- !OtherBrotliFunction(decoder, BROTLI_FALSE)) {
61
- bool x = !!YetAnotherBrotliFunction(encoder, TO_BROLTI_BOOL(2 * 2 == 4));
62
- DoSomething(x);
63
- }
64
-
65
- .fi
66
- .PP
67
-
68
- .SS "#define BROTLI_FALSE 0"
69
-
70
- .PP
71
- Portable \fCfalse\fP replacement\&.
72
- .SS "#define BROTLI_TRUE 1"
73
-
74
- .PP
75
- Portable \fCtrue\fP replacement\&.
76
- .SS "#define TO_BROTLI_BOOL(X) (!!(X) ? \fBBROTLI_TRUE\fP : \fBBROTLI_FALSE\fP)"
77
-
78
- .PP
79
- \fCbool\fP to \fBBROTLI_BOOL\fP conversion macros\&.
80
- .SH "Typedef Documentation"
81
- .PP
82
- .SS "typedef void*(* brotli_alloc_func) (void *opaque, size_t size)"
83
-
84
- .PP
85
- Allocating function pointer type\&.
86
- .PP
87
- \fBParameters:\fP
88
- .RS 4
89
- \fIopaque\fP custom memory manager handle provided by client
90
- .br
91
- \fIsize\fP requested memory region size; can not be \fC0\fP
92
- .RE
93
- .PP
94
- \fBReturns:\fP
95
- .RS 4
96
- \fC0\fP in the case of failure
97
- .PP
98
- a valid pointer to a memory region of at least \fCsize\fP bytes long otherwise
99
- .RE
100
- .PP
101
-
102
- .SS "typedef void(* brotli_free_func) (void *opaque, void *address)"
103
-
104
- .PP
105
- Deallocating function pointer type\&. This function \fBSHOULD\fP do nothing if \fCaddress\fP is \fC0\fP\&.
106
- .PP
107
- \fBParameters:\fP
108
- .RS 4
109
- \fIopaque\fP custom memory manager handle provided by client
110
- .br
111
- \fIaddress\fP memory region pointer returned by \fBbrotli_alloc_func\fP, or \fC0\fP
112
- .RE
113
- .PP
114
-
115
- .SH "Author"
116
- .PP
117
- Generated automatically by Doxygen for Brotli from the source code\&.