After the original file named file1.txt, after the disappearance of the original file compression, compressed file called file1.txt.gz
gzip file1.txt
The compression process, to retain the original file
gzip -k file1.txt
Compress two files into one file
cat file1.txt file2.txt | gzip > foo.gz 或 gzip -c file1.txt file2.txt > foo.gz
References: