Skip to content

Commit 08ab5c1

Browse files
committed
Use READ_BUFFER_SIZE rather than an arbitrary constant
1 parent 7c98139 commit 08ab5c1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/isal/igzip.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ def __init__(self, filename=None, mode=None,
167167
isal_zlib.DEF_MEM_LEVEL,
168168
0)
169169
if self.mode == READ:
170-
# Having a large input buffer seems to work well for both normal
171-
# gzip and BGZIP files.
172-
raw = _GzipReader(self.fileobj, 128 * 1024)
170+
raw = _GzipReader(self.fileobj, READ_BUFFER_SIZE)
173171
self._buffer = io.BufferedReader(raw)
174172

175173
def __repr__(self):
@@ -370,8 +368,6 @@ def main():
370368
else:
371369
out_file = sys.stdout.buffer
372370

373-
global READ_BUFFER_SIZE
374-
READ_BUFFER_SIZE = args.buffer_size
375371
try:
376372
while True:
377373
block = in_file.read(args.buffer_size)

0 commit comments

Comments
 (0)