Skip to content

Commit ccf0f40

Browse files
committed
Added stream_set_chunk_size to the underlying stream in the parse()-function
1 parent 3b4cbe8 commit ccf0f40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Parser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ public function parse(): void
146146

147147
while (!feof($this->stream) && !$eof) {
148148
$pos = ftell($this->stream);
149+
// set the underlying streams chunk size, so it delivers according to the request from stream_get_line
150+
stream_set_chunk_size($this->stream, $this->bufferSize);
149151
$line = stream_get_line($this->stream, $this->bufferSize, $this->lineEnding);
150152

151153
if (false === $line) {

0 commit comments

Comments
 (0)