Hi all,
I’m happy to announce a new release of decompress.0.7 available for installation via OPAM.
Decompress is a library which provide an implementation of zlib in pure OCaml. This library provides the same functions as camlzip (which is a binding with the official implementation of zlib) and a more low-level API to keep the control about the memory allocation.
A little example with an explanation is provided here to understand how to use decompress.
The goal of decompress is to provide a good zlib implementation which can be compiled (by the ocaml compiler way) to some exotic back-end and keep the same behaviour. In this way, decompress is one key on the Mirage OS project. Obviously, decompress can be compiled by js_of_ocaml (tested on the last ICFP to simulate a Git repository in your web browser).
This release is much more about fixed bug and a good example of how to use AFL. We fixed 2 bugs:
- eaeb1de the first deflate algorithm (which uses the CPS style but appears only when the input is less than 12 bytes)
- a6f6b2b a variable name overlap in the dictionary inflate algorithm
About performance, we already did some works with @yallop and @samoht (defuntorization, immutable state, etc.) in the 0.5 release. And, with landmarks, the ADLER-32 checksum seems to be the biggest bottle-neck.
Finally, decompress is used by some projects like datakit or ocaml-git and we can consider (from the 0.4 release) a stable API - this new version exports the ADLER-32 implementation only. A package for npm is in the pipe with this current version.
The next plan now is to focus decompress on the performance. Then, a plan to implement gzip could be interesting.
if you want a fully implementation of
Thank you for your answer. I indeed started to create a binding of