Module LzoSource
Source
type bigstring =
(char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.tSource
val uncompress :
Lzo.bigstring ->
Lzo.bigstring ->
(Lzo.bigstring, [> Lzo.error ]) Stdlib.resultuncompress input output returns a sub-layout of output which is the inflated contents of input. Otherwise, it returns:
`Malformedif theinputis not recognized as a LZO contents.`Invalid_argumentifoutputis not large enough to contain inflated contents.`Invalid_dictionaryif an op-code ofinputrefers to an unbound location.
Source
val uncompress_with_buffer :
?chunk:int ->
Lzo.bigstring ->
(string, [> Lzo.error ]) Stdlib.resultuncompress ?chunk input returns a fresh-allocated string which is the inflated contents of input. An internal Buffer.t is used and it can be initialized with chunk (default to 0x1000). Otherwise, it returns same errors as uncompress.
make_wrkmem () returns a fresh-allocated wrkmem.
compress input output wrkmem deflates input and produces a LZO contents into output. It uses wrkmem to do the deflation. It returns the number of bytes wrotes into output such as:
let len = compress input output wrkmem in
Bigarray.Array1.sub output 0 lenis the deflated contents of input.