parse a file object for a gzipped file foo.gz using gzip.open('foo.gz') code example
Example: python Decompress gzip File
import gzip
import shutil
with gzip.open('file.txt.gz', 'rb') as f_in:
with open('file.txt', 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)