[Haskell-cafe] ANNOUNCE: tar

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


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


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

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


More information about the Haskell-Cafe mailing list