Find all files with the extension .txt that have been modified in the last 3 days and compress them using the highest compression level (9) with gzip.
find ~ -mtime -3 -type f -name '*.txt' | xargs gzip -9