function CodedInputStream::recomputeBufferLimits
2 calls to CodedInputStream::recomputeBufferLimits()
- CodedInputStream::popLimit in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedInputStream.php - CodedInputStream::pushLimit in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedInputStream.php
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedInputStream.php, line 70
Class
Namespace
Google\Protobuf\InternalCode
private function recomputeBufferLimits() {
$this->buffer_end += $this->buffer_size_after_limit;
$closest_limit = min($this->current_limit, $this->total_bytes_limit);
if ($closest_limit < $this->total_bytes_read) {
// The limit position is in the current buffer. We must adjust the
// buffer size accordingly.
$this->buffer_size_after_limit = $this->total_bytes_read - $closest_limit;
$this->buffer_end -= $this->buffer_size_after_limit;
}
else {
$this->buffer_size_after_limit = 0;
}
}