You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 2, 2019. It is now read-only.
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:
This would also require stricter type checks, such as isPlainObject implementation from Lodash.
fetch requests accepts UInt8Array instances directly as ArrayBufferView, XMLHttpRequest also accepts UInt8Array as BufferSource