! Copyright (C) 2022 Raghu Ranganathan.
! See http://factorcode.org/license.txt for BSD license.
-USING: byte-arrays help.markup help.syntax kernel strings ;
+USING: byte-arrays help.markup help.syntax kernel multiline strings ;
IN: compression.bzip3
HELP: compress
-{ $values byte-array: byte-array block-size/f: { $maybe "integer" } byte-array: byte-array }
-{ $description Takes a { $link "byte-array" } and block size, and pushes a compressed byte array from bzip3. } ;
+{ $values byte-array: byte-array block-size/f: { $maybe "integer" } byte-array': byte-array }
+{ $description "Takes a byte array and block size, and pushes a compressed byte array from bzip3." } ;
HELP: decompress
{ $values byte-array: byte-array byte-array': byte-array }
-{ $description Takes a valid bzip3 compressed { $link "byte-array" } , and pushes its decompressed form. } ;
+{ $description Takes a valid bzip3 compressed byte array, and pushes its decompressed form. } ;
HELP: internal-error
{ $values msg: object }
HELP: invalid-block-size
{ $values size: object }
{ $description Throws an { $link invalid-block-size } error. }
-{ $error-description Occurs if the given block size for compression is not in the range of 65 KiB and 511 MiB. } ;
+{ $error-description Occurs if the given "block" size for compression is not in the range of 65 KiB and 511 MiB. } ;
HELP: version
{ $values c-string: string }
bzip3 is best used with text or code, and hence the { $vocab-link "io.encodings" } vocabularies, specifically the
{ $link "io.encodings.string" } , { $vocab-link "io.encodings.utf8" } and { $vocab-link "io.encodings.ascii" } will be of help.
-$nl
+
If you are an experienced user and would like to use the low level API of bzip3, the { $link "compression.bzip3.ffi" } library
exposes the C bindings that allows for better performance via threading and other customizations. In order to use the functions
imported you will need to use the { $vocab-link "alien" } vocabulary. ;