-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readUInt64BE is not defined! #16
Comments
Which version of bops are you using? Is this in the browser or in node? |
node |
Interesting. I can see the browser version of bops is missing the 64-bit variants because the underlying dataview doesn't support them (though I just added uint64 functions in creationix/bops@cf40315). But the node side of bops just calls through to node's buffer API. I guess node doesn't support 64 bit ops either. https://github.com/creationix/bops/blob/master/read.js It's not hard to implement 64-bit reading for uint (just do two 32-bit reads and multiple one by 0x100000000). It's a little harder for signed integers. Also you do know that JavaScript numbers cannot precisely hold 64-bit integers? There are only about 53 bits of precision in JS numbers. Anything larger than that will loose precision when converted to a JS number. |
What's interesting is the node unit tests pass just fine when testing 64-bit numbers. I even recently added more large number tests. d659872 |
Thanks for help! |
I've encountered the same problem. |
Any update on it. |
@ngroup, @creationix
msgpack-js/msgpack.js
Line 129 in 9b601f1
There's no bops.readUInt64BE in bops
The text was updated successfully, but these errors were encountered: