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

Breadcrumb

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

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

GPBWire

Namespace

Google\Protobuf\Internal

Code

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;
    }
}
RSS feed
Powered by Drupal