$shift
$shift : integer
Shift
Encode / Decode Base64 VLQ.
toVLQSigned(string $aValue)
Convert from a two-complement value to a value where the sign bit is is placed in the least significant bit. For example, as decimals: 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) We generate the value for 32 bit machines, hence -2147483648 becomes 1, not 4294967297, even on a 64 bit machine.
string | $aValue |
fromVLQSigned(integer $aValue)
Convert to a two-complement value from a value where the sign bit is is placed in the least significant bit. For example, as decimals: 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 We assume that the value was generated with a 32 bit machine in mind.
Hence 1 becomes -2147483648 even on a 64 bit machine.
integer | $aValue |