Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Replace Buffer with UInt8Array functions on browsers #7

Open
davalapar opened this issue Mar 8, 2019 · 2 comments
Open

Replace Buffer with UInt8Array functions on browsers #7

davalapar opened this issue Mar 8, 2019 · 2 comments

Comments

@davalapar
Copy link
Owner

davalapar commented Mar 8, 2019

Usage of Buffer isn't really necessary for browsers.

We just want simpler functions that let us encode and decode data to/from UInt8Array instances.

Looking at https://github.com/feross/buffer/blob/master/index.js the implemetation actually has internal checks and assertions which could be skipped, which could speed up our encoding and decoding process in the browser.

If this ever succeeds, we can even use these UInt8Array functions on the node implementation for speed, since UInt8Arrays can be converted to Buffer instances anyways.

Notes:

References

@davalapar
Copy link
Owner Author

Notes

  • Currently at branch ui8
  • process.binding('buffer') is now deprecated and set to be removed in future node releases, so for fuck's sake we will be using native Buffer instances for speed in server-side implementation

References

@davalapar
Copy link
Owner Author

davalapar commented Mar 19, 2019

read & write utf8

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

No branches or pull requests

1 participant