[ANN] Decompress / Checkseum / Optint

zlib
rfc1951
inflate

#1

Hi all,

I’m happy yo announce a new release of decompress.0.8 available for installation via OPAM. The distribution provides a new package rfc1951 which implements the Request for Comments 1951 - a subset of zlib.

By this change, we put a prefix on previous modules Inflate and Deflate to recognize which format you use. Semantically, we don’t have an update of the API. However, decompress needs a new package now: checkseum which depends on optint.

checkseum is a little library à la digestif to provide a shared interface which allows to use an implementation of ADLER-32 or CRC32C. Implementation could be a C implementation or an OCaml implementation, so when the use want to link decompress (or checkseum), he needs to specify which implementation he wants to use: checkseum.c or checkseum.ocaml - at this stage of dune, this dependency needs to be the first of the rest. By the OCaml implementation, we keep the possibility to compile decompress to JavaScript.

Finally, optint is a little library which provide an abstract type to represent an 32-bits integer. From your architecture (x64 or x86), optint will use an unboxed integer (fast) or a boxed int32 (slow). So, at least, you have a integer with 32 bits availables (or more - 63 on x64).

The next release is focus on to implement (finally) GZIP and, may be, LZO. The new internal design of decompress allows to put on top of rfc1951 the GZIP header. Then, we provided an inverted stub of decompress (to use decompress on a C code) to allow a real benchmark with others implementations.


#2

Thanks for working on this! I think having a good general-purpose decompression library is more important than most people realize.