Previous week Up Next week


Here is the latest Caml Weekly News, for the week of May 15 to 22, 2012.

  1. Any library for reading/writing compressed files?
  2. extunix 0.0.4, ocaml-mysql 1.1.1 and some more
  3. Other Caml News

Any library for reading/writing compressed files?


Francois Berenger asked and Richard Jones suggested:
> What's the gold standard in OCaml to read/write
> compressed files?
> I found this:
> Wouldn't it be possible that the Marshall module
> had an option to allow compression of the marshalled
> values?
> Or is there a simple way to achieve this?

If it's for Unix, then just open a pipe to or from an external
compression filter, eg:

open Unix
open Printf

let () =
let output = "output.xz" in
let chan =
open_process_out (sprintf "xz --best > %s"
(Filename.quote output)) in
output_value chan 42;
let status = close_process_out chan in
(* some code here to check status was ok *)

(Also a good way to generate images from OCaml programs: pipe
to pnmto* programs).
Adrien Nader also replied:
There are libarchive bindings by Sylvain Le Gall on the forge too.
They're partial but already work for reading iirc, and writing
shouldn't be a lot of work (if it hasn't been added since I last
looked at it). That will potentially give xz, gzip, bzip2, tar, cpio
and I don't know what else.

extunix 0.0.4, ocaml-mysql 1.1.1 and some more


ygrek announced:
It is my pleasure to announce the multitude of (long overdue) releases 
tonight :

ocaml-extunix 0.0.4

ExtUnix provides thin bindings to various low-level system APIs which are 
not covered by Unix module.
This release adds many new bindings and implements bigarray variants of some 
functions (as a consequence
extunix now depends on bigarray). Many thanks to Goswin von Brederlow (who 
was the driving force behind this
release), Andre Nathan and all previous (and future) contributors.

Get it at

ocaml-mysql 1.1.1

Bindings to libmysqlclient. This release update build infrastructure tools 
(OCamlMakefile, autotools, etc), provides
Windows build support (both for msvc and mingw), fixes OCaml 3.12 
compatibility and implements a couple of new features.
Thanks go to Dmitry Grebeniuk and Hezekiah M. Carty.

More info and download links :

ocaml-geoip 0.0.1

Bindings to libGeoIP library to access offline database of geographical 
information keyed by IP address. The bindings code
is generated by camlidl and hopefully provides a comprehensive coverage of 
available C API.

Homepage :

ocaml-lzo 0.0.1, ocaml-snappy 0.0.1 

Both these packages implement bindings to fast lossless 
compression/decompression libraries (that generally favor speed
over compression ratio) and feature simple interface that operates on string 

Choose your poison : or

ocaml-winsvc 0.0.1

winsvc helps to turn OCaml program into Windows service. This is some old 
(but working) code with hardcoded build scripts.

Drags out miserable existence at

Other Caml News

From the ocamlcore planet blog:
Thanks to Alp Mestan, we now include in the Caml Weekly News the links to the
recent posts from the ocamlcore planet blog at

RegStab 2.0:

ocaml-winsvc 0.0.1:

ocaml-extunix 0.0.4 released:

ocaml-lzo 0.0.1 release:

OCaml Users and Developers conference 2012:

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.

Alan Schmitt