Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Shrinks peek buffer size

AuthorDave Jarvis <email>
Date2026-02-21 00:35:02 GMT-0800
Commit43e811aaec71272280bb67e71ce2255009a93455
Parentcb62633
git/Git.php
private function iterateInflated(
string $path,
- callable $processor
+ callable $processor,
+ int $bufferSize = 16384
): void {
$reader = BufferedFileReader::open( $path );
if( $reader->isOpen() && $infl !== false ) {
while( !$reader->eof() ) {
- $chunk = $reader->read( 16384 );
+ $chunk = $reader->read( $bufferSize );
$inflated = inflate_add( $infl, $chunk );
return strlen( $buf ) < $length;
- }
+ },
+ 8192
);
}
Delta5 lines added, 3 lines removed, 2-line increase