compress ( byte-array block-size/f -- byte-array' )


Vocabulary
compression.bzip3

Inputs
byte-arraya byte-array
block-size/finteger or f


Outputs
byte-array'a byte-array


Word description
Takes a byte array and block size, and pushes a compressed byte array from bzip3.

Definition


:: compress ( byte-array block-size/f -- byte-array' )
byte-array length :> in-size in-size bz3_bound :> out-size
out-size <byte-array> :> out block-size/f [ dsize ] unless*
validate-block-size byte-array out in-size out-size size_t
<ref> bz3_compress dup 0 =
[ drop in-size 8 >be out append ] [ throw-internal-error ]
if ;