Yesterday, while looking for information on the format of tar files, I discovered libarchive, which is part of FreeBSD. libarchive and read about 5 different tar formats, 4 different cpio formats, zip, and ISO images, and supports gzip and bzip2. It can also write 2 different tar formats plus cpio and shar. Very nice.
Oh, and its tar.5 is the best reference on the tar format I’ve seen.
I’ve packaged up libarchive and bsdtar (the default tar on FreeBSD, which is built using libarchive) for Debian.