tar command has a cool feature to auto-detect the file compression based on the archive suffix.
use archive suffix to determine the compression program
This allows you to change file compressions by just changing the archive suffix:
tar -cvpaf /tmp/backup.tar.gz ~/
tar -cvpaf /tmp/backup.tar.bz2 ~/
tar -cvpaf /tmp/backup.tar.xz ~/
This saves you having to specify