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 encoding ArrayBuffer to bin directly #108

Closed
Newbytee opened this issue Mar 25, 2020 · 1 comment
Closed

Support encoding ArrayBuffer to bin directly #108

Newbytee opened this issue Mar 25, 2020 · 1 comment

Comments

@Newbytee
Copy link

Using @msgpack/msgpack version 1.12.0 from npm, encoding an ArrayBuffer results in an empty object when decoding it. It would be desirable to have it encode as bin, as it would reduce the amount of redundant code required when encoding the result of functions such as SubtleCrypto.digest().

@Newbytee Newbytee changed the title Support encoding ArrayBuffer to bytes directly Support encoding ArrayBuffer to bin directly Mar 25, 2020
gfx added a commit that referenced this issue Mar 30, 2020
@gfx
Copy link
Member

gfx commented Mar 30, 2020

Even though some APIs directly return ArrayBuffer, I don't recommend to use it, as ArrayBuffer is a low-level memory buffer and designated to be wrapped by ArrayBufferView.

Please use extension types.

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