We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dee72f8 + 69edcc9 commit 4c3572bCopy full SHA for 4c3572b
nibabel/openers.py
@@ -13,10 +13,15 @@
13
import gzip
14
import bz2
15
16
+# The largest memory chunk that gzip can use for reads
17
+GZIP_MAX_READ_CHUNK = 100 * 1024 * 1024 # 100Mb
18
+
19
20
def _gzip_open(fileish, *args, **kwargs):
- # open gzip files with faster reads on large files using larger chuncks
21
+ # open gzip files with faster reads on large files using larger chunks
22
+ # See https://github.com/nipy/nibabel/pull/210 for discussion
23
gzip_file = gzip.open(fileish, *args, **kwargs)
- gzip_file.max_read_chunk = 100 * 1024 * 1024 # 100Mb
24
+ gzip_file.max_read_chunk = GZIP_MAX_READ_CHUNK
25
return gzip_file
26
27
0 commit comments