-
Notifications
You must be signed in to change notification settings - Fork 149
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
Migrate to Uint8Array #410
Comments
Hi @jimmywarting. No plan to do this for now; can you give some context on your use-case and how the change would help? |
I just consider Buffer to be quite bloated, it dose not exist in browsers or Deno so it isn't so cross comp friendly imo. The And the There are quite a lot of ppl agreeing that Buffer is just bloated and unnecessary and it's bad for cross compatible code after they have discovered the true potential of plain Uint8Arrays... Buffer do also sometimes leak information in source: |
NodeJS streams are not so good either for cross compatible code. b/c it will will embed so much junk that you do not need. see my cross js guideline: https://github.com/cross-js/cross-js |
when i compared the size of avrc against other packers on https://jimmywarting.github.io/3th-party-structured-clone-wpt/ Then avrc came out on the top of the largest package (size is in gzip) |
Thanks for the context.
W.r.t. package size comparisons, you should use the serialization-only $ curl -s https://cdn.jsdelivr.net/npm/[email protected]/etc/browser/avsc-types.js/+esm|gzip|wc -c
23542 |
Also the browser buffer haven't been updated in 2years and lagged behind in newer features |
this was closed by #452 I think? |
It will once |
wondering if you could switch to using say Uint8Array instead... \w helpers such as TextEncoder/Decoder/DataView instead
The text was updated successfully, but these errors were encountered: