-
Notifications
You must be signed in to change notification settings - Fork 18
support arbitrarily large integers #12
Copy link
Copy link
Open
Description
Our current integers support magnitudes up to 264. Larger magnitudes will have to be encoded as floats/doubles or using binary* (losing the type info). Of course, this could be done via an extension point, but given the ubiquity of big integer libraries and especially with the addition of BigInt to JavaScript, I think built-in support might be worth it.
How could we do this? I recommend that we change uint64 to int64 (a signed 64-bit int) and replace nint64 with a VLQ. This would be a breaking change to the format.
edit: Alternatively, we could construct some sort of Rational representation using two VLQs.
edit again: I like git's "varint"s: https://github.com/git/git/blob/master/varint.c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels