pawitp / protobuf-decoder

JavaScript-based web UI to decode ad-hoc Protobuf data
https://protobuf-decoder.netlify.app/
MIT License
392 stars 91 forks source link

Support for 64-bit integer in varint #9

Closed pawitp closed 5 years ago

pawitp commented 5 years ago

Currently, varint decodes to JavaScript integer, causing it to not support true 64-bit integers. Varints should be decoded to JSBI.BigInt instead.

Example protobuf: 20FFFFFFFFFFFFFFFF7F

Expected result: varint: 9223372036854775807 Actual result: varint: 9223372036854776000