src/Binary/SizeCalculator.php
public function computeByteStreamSize(Stream $value)
    {
        $length = $value->getSize();
        $size   = $length + $this->computeVarintSize($length);

        return $size;
    }
public function computeByteStreamSize(Stream $value)
    {
        $length = $value->getSize();
        $size   = $length + $this->computeVarintSize($length);

        return $size;
    }
public function computeByteStreamSize ( Stream $ value ) { $ length = $ value -> getSize ( ) ; $ size = $ length + $ this -> computeVarintSize ( $ length ) ; return $ size ; }
Compute the number of bytes that would be needed to encode a stream of bytes.

@param \Protobuf\Stream $value

@return integer
Compute the number of bytes that would be needed to encode a stream of bytes .