tar is a [Tcllib package for handling tar data.
To work with a gzipped tar file:
set chan [open myfile.tar.gz] zlib push gunzip $chan set data [::tar::get $chan some_file_in_tarball] close $chan