Run the below command in the terminal to see the contents of a tar.gz file without extracting it:
tar -tf filename.tar.gz
-t, --list
List the contents of an archive. Arguments are optional. When given, they specify the names of the members to list.
-f, --file=ARCHIVE Use archive file or device ARCHIVE...
It's probably a GNU specific option, but you could use the or -O to extract files to standard output--to-stdout
$ tar -axf file.tgz foo/bar -O