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