MCPcopy Create free account
hub / github.com/apache/fory / readVarUint36Slow

Method readVarUint36Slow

javascript/packages/core/lib/reader/index.ts:443–463  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

441 }
442
443 private readVarUint36Slow(): number {
444 let b = this.readUint8();
445 let result = b & 0x7f;
446 if ((b & 0x80) !== 0) {
447 b = this.readUint8();
448 result |= (b & 0x7f) << 7;
449 if ((b & 0x80) !== 0) {
450 b = this.readUint8();
451 result |= (b & 0x7f) << 14;
452 if ((b & 0x80) !== 0) {
453 b = this.readUint8();
454 result |= (b & 0x7f) << 21;
455 if ((b & 0x80) !== 0) {
456 b = this.readUint8();
457 result |= (b & 0xff) << 28;
458 }
459 }
460 }
461 }
462 return result >>> 0;
463 }
464
465 readVarInt32() {
466 const v = this.readVarUInt32();

Callers 2

readVarUint32Small14Method · 0.95
readVarUint36SmallMethod · 0.95

Calls 1

readUint8Method · 0.95

Tested by

no test coverage detected