]> gitweb.factorcode.org Git - factor.git/blob - extra/compression/bzip3/ffi/ffi-docs.factor
bzip3: add full docs, fix lint problems
[factor.git] / extra / compression / bzip3 / ffi / ffi-docs.factor
1 ! Copyright (C) 2022 Your name.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: classes.struct help.markup help.syntax kernel math compression.bzip3 ;
4 IN: compression.bzip3.ffi
5
6 HELP: bz3_bound
7 { $values
8     { "input_size" object }
9     { "size_t" object }
10 }
11 { $description Given an input size, outputs a possible output size after compression. Used in compression only. } ;
12
13 HELP: bz3_compress
14 { $values
15     { "block_size" object } { "in" object } { "out" object } { "in_size" object } { "out_size" object }
16     { "int" object }
17 }
18 { $description Available in the high level API. Usage of { $snippet "compress" } from the parent vocabulary is encouraged instead. } ;
19
20 HELP: bz3_decode_block
21 { $values
22     { "state" object } { "buffer" object } { "size" object } { "orig_size" object }
23     { "int32_t" object }
24 }
25 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
26
27 HELP: bz3_decode_blocks
28 { $values
29     { "states[]" object } { "buffers[]" object } { "sizes[]" object } { "orig_sizes[]" object } { "n" integer }
30 }
31 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
32
33 HELP: bz3_decompress
34 { $values
35     { "in" object } { "out" object } { "in_size" object } { "out_size" object }
36     { "int" object }
37 }
38 { $description Available in the high level API. Usage of { $snippet "decompress" } from the parent vocabulary is encouraged instead. } ;
39
40 HELP: bz3_encode_block
41 { $values
42     { "state" struct } { "buffer" object } { "size" object }
43     { "int32_t" object }
44 }
45 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
46
47 HELP: bz3_encode_blocks
48 { $values
49     { "states[]" object } { "buffers[]" object } { "sizes[]" object } { "n" integer }
50 }
51 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
52
53 HELP: bz3_free
54 { $values
55     { "state" object }
56 }
57 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
58
59 HELP: bz3_last_error
60 { $values
61     { "state" object }
62     { "int8_t" object }
63 }
64 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
65
66 HELP: bz3_new
67 { $values
68     { "block_size" object }
69     { "bz3_state*" object }
70 }
71 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
72
73 HELP: bz3_state
74 { $class-description Structure for holding and passing state between low-level bzip3 functions. Consult { $link "compression.bzip3.ffi" } for more details. } ;
75
76 HELP: bz3_strerror
77 { $values
78     { "state" object }
79     { "c-string" object }
80 }
81 { $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
82
83 HELP: bz3_version
84 { $values
85     { "c-string" object }
86 }
87 { $description "Pushes the bzip3 version present on your system. compression.bz3's " { $snippet "version" } "is an alias for this word." } ;
88
89
90 ARTICLE: "compression.bzip3.ffi" "Compression.bzip3.ffi"
91 This vocabulary contains mainly high-level documentation. The words present in this vocabulary link to C functions and hence
92 must be used carefully. Some functions mutate their arguments.
93
94 Consult your local installation of { $snippet "libbz3.h" } , or read it at
95 { $url "https://github.com/kspalaiologos/bzip3/blob/master/include/libbz3.h" "GitHub" } for details that are up-to-date.
96
97 For an idea of how to use bzip3's compression functions, see the { $url "https://github.com/kspalaiologos/bzip3/blob/master/examples" "bzip3 examples" } .
98 ;
99
100 ABOUT: "compression.bzip3.ffi"