Created
May 15, 2018 21:10
-
-
Save ihnorton/0fb950b3c26f72bc397741e8f5c78ed4 to your computer and use it in GitHub Desktop.
pure python gunzip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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