]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/compression/bzip3/ffi/ffi-docs.factor
bzip3: add full docs, fix lint problems
[factor.git] / extra / compression / bzip3 / ffi / ffi-docs.factor
index 9a2c8ceeffcc61e54489c222ddda911f76ae3570..abddaf3534dfe41062434036aeaa66db6e1d224b 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2022 Your name.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: classes.struct help.markup help.syntax kernel math ;
+USING: classes.struct help.markup help.syntax kernel math compression.bzip3 ;
 IN: compression.bzip3.ffi
 
 HELP: bz3_bound
@@ -8,113 +8,93 @@ HELP: bz3_bound
     { "input_size" object }
     { "size_t" object }
 }
-{ $description "" } ;
+{ $description Given an input size, outputs a possible output size after compression. Used in compression only. } ;
 
 HELP: bz3_compress
 { $values
     { "block_size" object } { "in" object } { "out" object } { "in_size" object } { "out_size" object }
     { "int" object }
 }
-{ $description Available in the high level API. Usage of { $link "compression.bzip3.compress" } is encouraged. } ;
+{ $description Available in the high level API. Usage of { $snippet "compress" } from the parent vocabulary is encouraged instead. } ;
 
 HELP: bz3_decode_block
 { $values
     { "state" object } { "buffer" object } { "size" object } { "orig_size" object }
     { "int32_t" object }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_decode_blocks
 { $values
     { "states[]" object } { "buffers[]" object } { "sizes[]" object } { "orig_sizes[]" object } { "n" integer }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_decompress
 { $values
     { "in" object } { "out" object } { "in_size" object } { "out_size" object }
     { "int" object }
 }
-{ $description Available in the high level API. Usage of { $link "compression.bzip3.decompress" } is encouraged. } ;
+{ $description Available in the high level API. Usage of { $snippet "decompress" } from the parent vocabulary is encouraged instead. } ;
 
 HELP: bz3_encode_block
 { $values
     { "state" struct } { "buffer" object } { "size" object }
     { "int32_t" object }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_encode_blocks
 { $values
     { "states[]" object } { "buffers[]" object } { "sizes[]" object } { "n" integer }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_free
 { $values
     { "state" object }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_last_error
 { $values
     { "state" object }
     { "int8_t" object }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_new
 { $values
     { "block_size" object }
     { "bz3_state*" object }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_state
-{ $class-description "" } ;
+{ $class-description Structure for holding and passing state between low-level bzip3 functions. Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_strerror
 { $values
     { "state" object }
     { "c-string" object }
 }
-{ $description "" } ;
+{ $description Consult { $link "compression.bzip3.ffi" } for more details. } ;
 
 HELP: bz3_version
 { $values
     { "c-string" object }
 }
-{ $description "" } ;
+{ $description "Pushes the bzip3 version present on your system. compression.bz3's " { $snippet "version" } "is an alias for this word." } ;
 
-HELP: s16
-{ $var-description "" } ;
 
-HELP: s32
-{ $var-description "" } ;
-
-HELP: s8
-{ $var-description "" } ;
-
-HELP: state
-{ $class-description "" } ;
-
-HELP: u16
-{ $var-description "" } ;
-
-HELP: u32
-{ $var-description "" } ;
-
-HELP: u64
-{ $var-description "" } ;
-
-HELP: u8
-{ $var-description "" } ;
-
-ARTICLE: "compression.bzip3.ffi" "compression.bzip3.ffi"
-This vocabulary contains mainly high-level documentation. 
+ARTICLE: "compression.bzip3.ffi" "Compression.bzip3.ffi"
+This vocabulary contains mainly high-level documentation. The words present in this vocabulary link to C functions and hence
+must be used carefully. Some functions mutate their arguments.
 
 Consult your local installation of { $snippet "libbz3.h" } , or read it at
-{ $url "https://github.com/kspalaiologos/bzip3/blob/master/include/libbz3.h" } for details that are up-to-date.
+{ $url "https://github.com/kspalaiologos/bzip3/blob/master/include/libbz3.h" "GitHub" } for details that are up-to-date.
+
+For an idea of how to use bzip3's compression functions, see the { $url "https://github.com/kspalaiologos/bzip3/blob/master/examples" "bzip3 examples" } .
 ;
 
 ABOUT: "compression.bzip3.ffi"