diff options
author | Ruben Vorderman <r.h.p.vorderman@lumc.nl> | 2021-02-26 12:17:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 12:17:51 (GMT) |
commit | 7956ef884965ac6f9f7f2a27b835ea80e471c886 (patch) | |
tree | 8e40d831d57f47b1d92b1472496c1edde4b3cc03 /Lib/gzip.py | |
parent | 25935a2881f8da1231a2f6f5884031ae01e570fc (diff) | |
download | cpython-7956ef884965ac6f9f7f2a27b835ea80e471c886.zip cpython-7956ef884965ac6f9f7f2a27b835ea80e471c886.tar.gz cpython-7956ef884965ac6f9f7f2a27b835ea80e471c886.tar.bz2 |
bpo-43317: Use io.DEFAULT_BUFFER_SIZE instead of 1024 in gzip CLI (#24645)
This improves the performance slightly.
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r-- | Lib/gzip.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py index ee0cbed..1369157 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -595,7 +595,7 @@ def main(): f = builtins.open(arg, "rb") g = open(arg + ".gz", "wb") while True: - chunk = f.read(1024) + chunk = f.read(io.DEFAULT_BUFFER_SIZE) if not chunk: break g.write(chunk) |