Skip to content

Commit

Permalink
Merge 46122c4 into ff2b545
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelVaroquaux committed Nov 14, 2013
2 parents ff2b545 + 46122c4 commit 5291f88
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nibabel/openers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
import gzip
import bz2

def _gzip_open(fileish, *args, **kwargs):
# open gzip files with faster reads on large files using larger chuncks
gzip_file = gzip.open(fileish, *args, **kwargs)
gzip_file.max_read_chunk = 100 * 1024 * 1024 # 100Mb
return gzip_file


class Opener(object):
""" Class to accept, maybe open, and context-manage file-likes / filenames
Expand Down

0 comments on commit 5291f88

Please sign in to comment.