I have a compressed tarball (eg
foo.tar.gz) that I wish to extract all the files from, but the files within the tarball are not compressed. That is to say, the contents of
foo.tar.gz are un-compressed
There is not enough space on my filesystem to extract the files directly, so I wish to extract these files and immediately compress them as they are written to the disk. I can't simply extract the files and then gzip the extracted files because, as I've said, there's not enough space on the filesystem. I would also like to ensure that the original filenames, including their directories are faithfully preserved on disk. So if one of the files in the tarball is
/a/b/c/foo.txt, at the end of the process I would like to have
How can I accomplish this?