bson 6.9.0 → 6.9.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.
package/lib/bson.cjs CHANGED
@@ -2258,9 +2258,15 @@ const NumberUtils = {
2258
2258
  source[offset] * 16777216);
2259
2259
  },
2260
2260
  getBigInt64LE(source, offset) {
2261
- const lo = NumberUtils.getUint32LE(source, offset);
2262
- const hi = NumberUtils.getUint32LE(source, offset + 4);
2263
- return (BigInt(hi) << BigInt(32)) + BigInt(lo);
2261
+ const hi = BigInt(source[offset + 4] +
2262
+ source[offset + 5] * 256 +
2263
+ source[offset + 6] * 65536 +
2264
+ (source[offset + 7] << 24));
2265
+ const lo = BigInt(source[offset] +
2266
+ source[offset + 1] * 256 +
2267
+ source[offset + 2] * 65536 +
2268
+ source[offset + 3] * 16777216);
2269
+ return (hi << BigInt(32)) + lo;
2264
2270
  },
2265
2271
  getFloat64LE: isBigEndian
2266
2272
  ? (source, offset) => {