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

Proposal: converting Integer with DataView #29

Open
dukelec opened this issue Oct 18, 2021 · 0 comments
Open

Proposal: converting Integer with DataView #29

dukelec opened this issue Oct 18, 2021 · 0 comments

Comments

@dukelec
Copy link

dukelec commented Oct 18, 2021

First of all, thank you for your work.

Currently only float is being converted using DataView, why not use DataView to convert Integer uniformly?
If we all use DataView, the code will be shorter and easier to read, also less prone to errors.

Recently I needed to use the little-endian version of msgpack.
I modified a python library and all I had to do to modify the endianness was to change the symbol ">" to "<".
To modify the javascript library, I only had to change the DataView functions parameter from false to true, but since you don't use DataView, it's a bit confusing: https://github.com/dukelec/msgpackel

Modification for the python library:

Screenshot_2021-10-18_18-03-22

Modification for the javascript library:

Screenshot_2021-10-18_18-02-19

Screenshot_2021-10-18_18-01-55

Screenshot_2021-10-18_18-01-15

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

1 participant