bson 6.5.0 → 6.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2158,9 +2158,15 @@ const NumberUtils = {
2158
2158
  source[offset] * 16777216);
2159
2159
  },
2160
2160
  getBigInt64LE(source, offset) {
2161
- const lo = NumberUtils.getUint32LE(source, offset);
2162
- const hi = NumberUtils.getUint32LE(source, offset + 4);
2163
- return (BigInt(hi) << BigInt(32)) + BigInt(lo);
2161
+ const hi = BigInt(source[offset + 4] +
2162
+ source[offset + 5] * 256 +
2163
+ source[offset + 6] * 65536 +
2164
+ (source[offset + 7] << 24));
2165
+ const lo = BigInt(source[offset] +
2166
+ source[offset + 1] * 256 +
2167
+ source[offset + 2] * 65536 +
2168
+ source[offset + 3] * 16777216);
2169
+ return (hi << BigInt(32)) + lo;
2164
2170
  },
2165
2171
  getFloat64LE: isBigEndian
2166
2172
  ? (source, offset) => {