src/Binary/StreamReader.php
public function readZigzag(Stream $stream)
    {
        $number = $this->readVarint($stream);
        $zigzag = ($number >> 1) ^ (-($number & 1));

        return $zigzag;
    }
public function readZigzag(Stream $stream)
    {
        $number = $this->readVarint($stream);
        $zigzag = ($number >> 1) ^ (-($number & 1));

        return $zigzag;
    }
public function readZigzag ( Stream $ stream ) { $ number = $ this -> readVarint ( $ stream ) ; $ zigzag = ( $ number >> 1 ) ^ ( - ( $ number & 1 ) ) ; return $ zigzag ; }
Decodes a zigzag integer of the given bits.

@param \Protobuf\Stream $stream

@return integer
Decodes a zigzag integer of the given bits .