private function sendSingleRange(file\Handle $handle, Response $response, int $startPos, int $endPos) : \Generator
{
$bytesRemaining = $endPos - $startPos + 1;
(yield $handle->seek($startPos));
while ($bytesRemaining) {
$toBuffer = $bytesRemaining > 8192 ? 8192 : $bytesRemaining;
$chunk = (yield $handle->read($toBuffer));
$bytesRemaining -= \strlen($chunk);
(yield $response->stream($chunk));
}
}