specify compression level in tar gzip

GZIP=-9 tar cvzf file.tar.gz /path/to/directory
or
tar cvf - /path/to/file0 /path/to/file1 | gzip -9 - > files.tar.gz