logo       
Google Custom Search
    AddThis Social Bookmark Button

Unzip module: msg#00023

Subject: Unzip module
Hi list,

This weekend I played a little with inflate algorithm, the decompression
algorithm described in RFC 1951 and which is used by most file formats (zip,
gz, jar, png, swf....). I rewrote it entirely from the RFC in pure OCaml,
and I think it could be nice to add it to ExtLib.

The current implementation uses IO module and wrap an input :

module Unzip

val inflate : ?header:bool -> IO.stdinput -> IO.stdinput

I also wrote a test program that checks that the algorithm is working well
and also compare inflate performances between Unzip module (pure ocaml) and
ZLib ( using CamlZip bindings by X.Leroy, available here :
http://cristal.inria.fr/~xleroy/software.html ). After some optimizations,
and while still having a readable code, my benchmark shows that Unzip is
only 2 to 3 times slower than ZLib. I'm quite happy with this kind of
performances.

Here's the files for peer review / benchmarks / comments.

Regards,
Nicolas Cannasse

Attachment: unzip.ml
Description: Binary data

Attachment: test.ml
Description: Binary data


Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>