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.
1 parent 17829b6 commit 841dbd8Copy full SHA for 841dbd8
src/isal/igzip.py
@@ -33,6 +33,7 @@
33
import gzip
34
import io
35
import os
36
+import shutil
37
import struct
38
import sys
39
import time
@@ -358,11 +359,7 @@ def main():
358
359
out_file = sys.stdout.buffer
360
361
try:
- while True:
362
- block = in_file.read(args.buffer_size)
363
- if block == b"":
364
- break
365
- out_file.write(block)
+ shutil.copyfileobj(in_file, out_file, args.buffer_size)
366
finally:
367
if in_file is not sys.stdin.buffer:
368
in_file.close()
0 commit comments