Skip to content

Instantly share code, notes, and snippets.

@ihnorton
Created May 15, 2018 21:10
Show Gist options
  • Save ihnorton/0fb950b3c26f72bc397741e8f5c78ed4 to your computer and use it in GitHub Desktop.
Save ihnorton/0fb950b3c26f72bc397741e8f5c78ed4 to your computer and use it in GitHub Desktop.
pure python gunzip
import gzip, shutil
# inverted from the python gzip docs
def gunzip(f):
with gzip.open(f, 'rb') as gzip_in, open(f[0:f.find('.gz')], 'wb') as f_out:
shutil.copyfileobj(gzip_in, f_out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment