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.
2 parents c2156b5 + a0a3de2 commit e928f61Copy full SHA for e928f61
src/Snapshot.php
@@ -91,12 +91,14 @@ protected function shouldIgnoreLine(string $line): bool
91
protected function loadStream(string $connectionName = null)
92
{
93
LazyCollection::make(function () {
94
- $stream = $this->disk->readStream($this->fileName);
+ $stream = $this->compressionExtension === 'gz'
95
+ ? gzopen($this->disk->path($this->fileName), 'r')
96
+ : $this->disk->readStream($this->fileName);
97
98
$statement = '';
99
while (! feof($stream)) {
100
$chunk = $this->compressionExtension === 'gz'
- ? gzdecode(gzread($stream, self::STREAM_BUFFER_SIZE))
101
+ ? gzread($stream, self::STREAM_BUFFER_SIZE)
102
: fread($stream, self::STREAM_BUFFER_SIZE);
103
104
$lines = explode("\n", $chunk);
0 commit comments