package decompress
Implementation of Zlib and GZip in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
decompress-1.5.0.tbz
sha256=73183dc1186ab6cf1ca641146f6948f2fae6a69729ec0a1e62943385f9895077
sha512=31508b4ae16f6850fd86391f4bb3f950bba12ac45398c8ddb1b6e74f6a96f6a150b81377d6fd49146f1f0789c43a761d709d1d73a782d9c0df0d00a3c9663c89
doc/decompress.de/De/Def/Ns/index.html
Module Def.Ns
Source
The type for deflation errors.
Pretty-printer for error
.
compress_bound len
returns a clue about how many bytes we need to store the result of the deflation of len
bytes. It's a pessimistic calculation.
deflate ~level src dst
deflates the content of src into dst.
In case of sucess, it returns the bytes writen in an Ok
result. In case of failure, it returns the error in an Error
result. compress_bound
can be used to determine how many bytes the user needs to allocate as the destination buffer when he wants to compress N
bytes.
Here is an example of how to compress any inputs:
val input : bigstring
let len = De.Def.Ns.compress_bound (De.bigstring_length input) in
let dst = De.bigstring_create len in
De.Def.Ns.deflate ~level:4 input dst
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>