Skip to content

Commit 7f8d02f

Browse files
committed
Use a larger read_buffer_size
1 parent ad127f4 commit 7f8d02f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/isal/igzip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949

5050
#: The amount of data that is read in at once when decompressing a file.
5151
#: Increasing this value may increase performance.
52-
READ_BUFFER_SIZE = io.DEFAULT_BUFFER_SIZE
52+
#: 128K is also the size used by pigz and cat to read files from the
53+
# filesystem.
54+
READ_BUFFER_SIZE = 128 * 1024
5355

5456
FTEXT, FHCRC, FEXTRA, FNAME, FCOMMENT = 1, 2, 4, 8, 16
5557

@@ -451,7 +453,7 @@ def _argument_parser():
451453
# diminishing returns hit. _compression.BUFFER_SIZE = 8k. But 32K is about
452454
# ~6% faster.
453455
parser.add_argument("-b", "--buffer-size",
454-
default=128 * 1024, type=int,
456+
default=READ_BUFFER_SIZE, type=int,
455457
help=argparse.SUPPRESS)
456458
return parser
457459

0 commit comments

Comments
 (0)