MCPcopy Create free account
hub / github.com/apache/thrift / getVarint

Method getVarint

lib/php/lib/Protocol/TCompactProtocol.php:118–132  ·  view source on GitHub ↗
($data)

Source from the content-addressed store, hash-verified

116 }
117
118 public function getVarint($data)
119 {
120 $out = "";
121 while (true) {
122 if (($data & ~0x7f) === 0) {
123 $out .= chr($data);
124 break;
125 } else {
126 $out .= chr(($data & 0xff) | 0x80);
127 $data = $data >> 7;
128 }
129 }
130
131 return $out;
132 }
133
134 public function writeVarint($data)
135 {

Callers 2

writeVarintMethod · 0.95
testGetVarintMethod · 0.80

Calls

no outgoing calls

Tested by 1

testGetVarintMethod · 0.64