diff --git a/lib/protobuf-decoder/varintUtils.js b/lib/protobuf-decoder/varintUtils.js index 6b9b6b4..9a5bfad 100644 --- a/lib/protobuf-decoder/varintUtils.js +++ b/lib/protobuf-decoder/varintUtils.js @@ -1,5 +1,5 @@ export function decodeVarint(buffer, offset) { - let res = this.BigInt(0); + let res = 0; let shift = 0; let byte = 0; @@ -10,8 +10,8 @@ export function decodeVarint(buffer, offset) { byte = buffer[offset++]; - const multiplier = this.BigInt(2) ** this.BigInt(shift); - const thisByteValue = this.BigInt(byte & 0x7f) * multiplier; + const multiplier = 2 ** shift; + const thisByteValue = (byte & 0x7f) * multiplier; shift += 7; res = res + thisByteValue; } while (byte >= 0x80);