[Haskell-cafe] ANNOUNCE: tar 0.3.0.0

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sun Mar 1 13:24:15 EST 2009


All,

I'm pleased to announce a major new release of the tar package for
handling ".tar" archive files.

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/tar

This release has a completely new and much improved API. See the hackage
page for the API documentation.

There are high level "all in one" functions for extracting or
creating .tar files. More interestingly, it is easy to make variants by
composing a pipeline.

For example extracting a ".tar.gz" file is just:

> Tar.unpack dir . Tar.read . GZip.decompress =<< BS.readFile tar

Or creating a ".tar.bz2" file:

> BS.writeFile tar . BZip.compress . Tar.write =<< Tar.pack base dir

In addition it provides a full api for inspecting and constructing tar
files without having to pack or unpack to local files. The functions are
lazy which allows large archives to be processed in constant space.

It is based on the tar handling code that has been in use in the
cabal-install program for the last year or so. It has been tested on a
large number of real world .tar.gz files so compatibility should be
pretty good.

There is also an 'htar' tool which is essentially a demo program for the
tar library. It implements the common subset of the command line
interface of the standard tar program, including gzip and bzip
compression.

Thanks to Christian Maeder for feedback on pre-release versions.

Duncan



More information about the Haskell-Cafe mailing list