commit | 7956ef884965ac6f9f7f2a27b835ea80e471c886 | [log] [tgz] |
---|---|---|
author | Ruben Vorderman <r.h.p.vorderman@lumc.nl> | Fri Feb 26 13:17:51 2021 +0100 |
committer | GitHub <noreply@github.com> | Fri Feb 26 21:17:51 2021 +0900 |
tree | 8e40d831d57f47b1d92b1472496c1edde4b3cc03 | |
parent | 25935a2881f8da1231a2f6f5884031ae01e570fc [diff] [blame] |
bpo-43317: Use io.DEFAULT_BUFFER_SIZE instead of 1024 in gzip CLI (#24645) This improves the performance slightly.
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)