gzip code example
Example 1: python gzip file
import gzip
f_in = open('/home/joe/file.txt')
f_out = gzip.open('/home/joe/file.txt.gz', 'wb')
f_out.writelines(f_in)
f_out.close()
f_in.close()
Example 2: gzip file
gzip [OPTION]... [FILE]...
gzip file.exe #To compress a file
gzip -d file.exe.gz #To decompress file