Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Can't create a TypedArray from a node buffer treating the buffer as bytes #25669

Closed
zbjornson opened this issue Jul 12, 2015 · 1 comment
Closed

Comments

@zbjornson
Copy link

Cross-post from http://stackoverflow.com/questions/30604777/ ...

The docs for Buffer indicate that you cannot create a typed array from a buffer and treat the buffer as a byte array. Native JS lets you do this.

The buffer methods like readFloatLE are pretty fast with assertion checking off (clocked about 10M ops/second), but I'm frequently reading tens of millions of values. Constant time would be lovely.

@zbjornson
Copy link
Author

Fixed in versions that implement Buffer using Uint8array. Thanks.

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