Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GPBWire.php

function GPBWire::zigZagDecode32

1 call to GPBWire::zigZagDecode32()
GPBWire::readSint32 in vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php

File

vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php, line 105

Class

GPBWire

Namespace

Google\Protobuf\Internal

Code

public static function zigZagDecode32($uint32) {
    // Fill high 32 bits.
    if (PHP_INT_SIZE === 8) {
        $uint32 |= $uint32 & 0xffffffff;
    }
    $int32 = $uint32 >> 1 & 0x7fffffff ^ -($uint32 & 1);
    return $int32;
}
RSS feed
Powered by Drupal