[ANN] ezgzip 0.2.0 (EDIT: and 0.2.1 bugfix release)

ezgzip provides a simple interface focused on string -> string zlib and gzip (de)compression.

Documentation is available here.

An example illustrating how to gzip compress and then decompress a string:

open Rresult

let () =
  let original = "Hello world" in
  let compressed = Ezgzip.compress original in
  let decompressed = R.get_ok (Ezgzip.decompress compressed) in
  assert (original = decompressed)

This library currently uses the zlib bindings provided by camlzip. The gzip header/footer code is based on the upstream specification.


Iā€™m rather embarrassed to say that there is a bug in 0.2.0 which broke compatibility with the gzip/gunzip command line tools. The problem was symmetric so ezgzip could read its own output but other tools could not.

Version 0.2.1 fixes that. There is a PR in now to add the new version to the opam repository. My sincere apologies to anyone who may have been effected by this.