.tar.gz, .targz, .tgz files are all compressed in two steps. The same is try of .tar.bz2, .tarbz2 and .tbz2 files. You can extract them with a two step process:
unzip the file
+ gunzip filename.tar.gz
+ bunzip2 filename.tar.bz2
untar the file
+ tar -xpvf filename.tar
Often you'll find, however, that you can pass additional parameters to tar, so you can have the following to do it in one step:
tar zxpvf filename.tar.gz
tar jxpvf filename.tar.bz2
|