public function remainingBytes() : int { $stat = \fstat($this->fp); $pos = \ftell($this->fp); return PHP_INT_MAX & $stat['size'] - $pos; }