From: Nicolas C. <war...@fr...> - 2004-07-24 08:58:42
|
> >The Unzip module is now part of ExtLib ! > >You can deflate your TGZ and ZIP with pure OCaml code only ! > >Enjoy, > > Cool, thanks! > > I've still to see your code in the CVS (does sourceforge always have a delay > after commit for the changes to show up?) but a few questions. So you have > unzip, how about a zip? It's always handy to pack stuff as well. > > And how far does the current module go? Can it unpack whole zip files with > several files in them? Well. The current module is an implementation of the "deflate" algorithm (zlib) conform to the RFC 1950 and 1951. Then you can unzip all kind of data : png , swf , any gziped, zip, and a lot more. There is no direct support for the ZIP or TGZ file format but I might add it pretty soon ( it's quite easy once you can deflate : http://www.pkware.com/products/enterprise/white_papers/appnote.txt , http://www.faqs.org/rfcs/rfc1952.html , http://www.onicos.com/staff/iz/formats/tar.html ). As for "inflate", it's a bit more complicate : although it uses mostly same data structures, you need to be careful to implement it in a patent-free way (for american people, we european are not yet concerned about software patents). I might try to do that later. > Which brings me to another curiosity I've been having. After looking at the > ocaml core library I was missing abstract files (so I could implement my > own, given an interface). Well, Extlib has that and great. But how about an > abstract filesystem? Something along the lines of: [...] > That way you could do easy wrappings for filesystems. Useful things like: > - Use a ZIP as a filesystem (input only if you please) > - Use remote filesystem > - Implement sandboxing (filesystem inside a filesystem, like prevent the > application accidentally accessing some part outside the given directory) > > What do you guys think? Well that's interesting idea. Same problem as IO : we need to figure out what minimal support is needed so adding a new filesystem is not too much a pain. Also, a module would be better than classes. Regards, Nicolas Cannasse |