Question: how gzip works in linux?
Answer: The compressed file consists of a GNU zip header and deflated data. If given a file as an argument, gzip compresses the file, adds a “. gz” suffix, and deletes the original file. With no arguments, gzip compresses the standard input and writes the compressed file to standard output.