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

Support for actual int64 as opposed to int53 #21

Open
rochdev opened this issue Oct 9, 2020 · 5 comments
Open

Support for actual int64 as opposed to int53 #21

rochdev opened this issue Oct 9, 2020 · 5 comments

Comments

@rochdev
Copy link

rochdev commented Oct 9, 2020

I was wondering if support for int64 libraries like long and int64-buffer would be considered. I'm willing to open a PR for int64-buffer since it's what we use and is also used by msgpack-lite.

This would not add a lot of overhead to the library and would look something like this:

if (value._isUint64BE) {
  value = value.toArray();
  bytes.push(0xcf, value[0], value[1], value[2], value[3], value[4], value[5], value[6], value[7]);
  return 9;
}
@rochdev
Copy link
Author

rochdev commented Oct 19, 2020

@darrachequesne Thoughts?

@slavaGanzin
Copy link

@rochdev create a PR. It's always easier to talk about working code.

p.s. I have no relation to maintainer.

@rochdev
Copy link
Author

rochdev commented Oct 19, 2020

Opened #22

@darrachequesne
Copy link
Owner

That's an interesting idea! My only concern is the impact on the bundle size, for the browser build. Would custom encoders (suggested here: #18) help?

@rochdev
Copy link
Author

rochdev commented Oct 19, 2020

Good point. I'll have to check if we could use something like that with our requirements (which are a bit complicated) and will report back. Having an external implementation for custom encoding would definitely remove a lot of the decisions related to built-in support.

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

3 participants