Installation
=========================

make [Options]

Options:
	USE_BZIP2=0		Do not use bzip2 compression.
	USE_GZIP=0		Do not use g-/zip compression.
	HAVE_LIBTAR=1           libtar (1.2.11) is already installed.

	DEBUG=1			Compile with debugging support

Usage
=========================

Open a tar file: 
	handle = tar.open("<filename>")
		 or
	handle = tar.open{pathname = "<filename>"}

Create a tar file
	handle = tar.new {	
		pathname = "<filename>",
		type     = "<filetype>" or type, -- see below
		compression = level,             -- 0-9 (default: 9)
		mode = umode,                    -- unix file mode 
		                                    (default: 0644)
		flags = tarflags,                -- see below
	}

	type: Compression type, either a string "gz", "bz2", 
	or a number, defined in the TYPE table:
	tar.TYPE.PLAIN	Plain tar file
	tar.TYPE.GZIP   Compressed with gzip
	tar.TYPE.BZIP2  Compressed with bzip2
	(more to come)

	tarflags: These are listed in the man page of tar_open 
	and mapped to the TAR table:
	tar.TAR.GNU	Use GNU extensions.
	tar.TAR.VERBOSE Send status messages to stdout.
	etc.

Reading tar file content

tar:files()
	Iterate over files in tar file. Example: for f in tar:files() do print(f); end

tar:info()
	Return table of header info.

tar:read()
	Read the file contents

tar:extract()
tar:extract(realname)
tar:extract{
      path     = "path-prefix",
      realname = "real-name",
      gid      = number,
      uid      = number,
      mtime    = mtime
}
	Extract the file.