function GPBWire::zigZagEncode32
2 calls to GPBWire::zigZagEncode32()
- GPBWire::sint32Size in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ GPBWire.php - GPBWire::writeSint32 in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ GPBWire.php
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ GPBWire.php, line 95
Class
Namespace
Google\Protobuf\InternalCode
public static function zigZagEncode32($int32) {
if (PHP_INT_SIZE == 8) {
$trim_int32 = $int32 & 0xffffffff;
return ($trim_int32 << 1 ^ $int32 << 32 >> 63) & 0xffffffff;
}
else {
return $int32 << 1 ^ $int32 >> 31;
}
}