Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

u8vector-compress returns a compressed u8vector vector or false. It uses FastLZ - lightning-fast lossless compression library.

Parameter Description
inbuf u8vector to be compressed

Example

Example 1: Show effects of fastLZ compression and decompression for u8vectors.

> (define v (make-u8vector 200))
> (define vc (u8vector-compress v))
> (u8vector-length v)
200
> (u8vector-length vc)
11
> (define vcu (u8vector-decompress vc))
;; We lack a proper comparison so this will have to do.
> (string=? (u8vector->string vcu) (u8vector->string v))
#t
Clone this wiki locally