Can anyone show me the correct way to compress and decompress tar.gzip files in java i've been searching but the most i can find is either zip or gzip(alone).
I've written a wrapper for commons-compress called jarchivelib that makes it easy to extract or compress from and into File
objects.
Example code would look like this:
File archive = new File("/home/thrau/archive.tar.gz");
File destination = new File("/home/thrau/archive/");
Archiver archiver = ArchiverFactory.createArchiver("tar", "gz");
archiver.extract(archive, destination);