Instead of gunzipping the file on disk, decompress it to
stdout and pipe the result into
tar. That means instead of
tar xvzf foo.tar.gz you say
gzip -cd foo.tar.gz | tar xvf -. This can usually be abbreviated by using the
zcat synonym for
gzip -cd where it is present (most systems), yielding
zcat foo.tar.gz | tar xvf -.
Doing it this way avoids unnecessary roundtrips to the disk, and also having to recompress the whole shebang, which means it’s much faster.