I didn't realize bigint is a type that's supported by typescript even if not supported in ES6. Rather than use the BigInteger package, let's use this bigint type. It's not perfect, but it should be a bit clearer.
The guards for int/uint were checking against "safe" int as defined by JS. This is actually 52-bit, which means in some cases safe, but overflowing ints were being used as 32-bit integers. Update the guard methods to have a "safe" check and a 32-bit check.
Anywhere a number is used for file system manipulation, the "safe" checks are used. This increases max filesize handleable by the library to 8192TB.
Completely rewriting the logic for ints to/from ByteVector. Should be much faster now 🤞
Breaking changes:
BigInteger class isn't used anymore, bigint type is used now.
Description:
bigint
is a type that's supported by typescript even if not supported in ES6. Rather than use the BigInteger package, let's use thisbigint
type. It's not perfect, but it should be a bit clearer.Breaking changes:
bigint
type is used now.