tar is an archival tool - it can merge several files into one without compressing them.
gzip is a compression tool - good for compressing a single file to reduce its disk space usage.
tar czvf etc.tar.gz /etc/
Use the -t switch
gzip -tv archive.tar.gz
tar xzvf file.tar.gz -C /opt/w