Similar to tar, gzip is a file compression tool used to decrease the file size of a single file or folder so that it can be transferred more easily. The gzip command allows you to both compress and decompress files.
In the image above, the user first issues an ls command to view the files in the directory, where we see a file named copyfile. The user then issues the command: gzip copyfile to compress the file. The ls command is entered again and we see that copyfile has now been compressed to copyfile.gz. The user then issues: gzip -d copyfile.gz to decompress the file. After another ls command, copyfile.gz is once again just copyfile.