Skip to content
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

how to decode 4 digit buffers. #108

Closed
sidshash opened this issue Sep 25, 2019 · 1 comment
Closed

how to decode 4 digit buffers. #108

sidshash opened this issue Sep 25, 2019 · 1 comment

Comments

@sidshash
Copy link

i can decode buffer starting with '0x' like 0xA3, 0x64 0x22 etc. But how can i decode buffer like 3c01, 4eab, a474 which are not starting with '0x'. when i try to run msgpack.decode(Buffer([3c01, 4eab, a474])). It gives syntax error.

@kevinramharak
Copy link

Please take a look at this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#Hexadecimal_numbers. A number in javascript can be written in a few different ways. 0xA is just a different notation (hexadecimal) of 10 (decimal). I suggest you learn the fundamentals of Javascript if this is confusing you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants