-
-
Notifications
You must be signed in to change notification settings - Fork 393
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 a no-Buffer mode #1047
Comments
Interesting... I've used Uint8Arrays for front-end or isomorphic code, but never for node-specific projects. Practically every single core API in Node.js uses Buffers. How do you accomplish anything without using them? |
What do you mean? I can pass a Uint8Array to anything that accepts a Uint8Array, which includes everything I want to pass Uint8Arrays to, like |
Sure, but every core API such as |
APIs like I'm not exactly sure what your point is, but avoiding Buffer buffers has more pros than cons for me, hence why I'd like to be able to get Uint8Arrays from better-sqlite3. |
Related nodejs/node#41588 |
The confusion and support for this switch will be non-trivial. I think we should only consider switching to |
Node's Buffer can be somewhat painful to work with sometimes, because they can be passed to functions accepting Uint8Arrays, but while they provide an extension of the same interface they actually work differently in some cases, for example when calling
.toString()
on them.As such I try not to deal with Buffers if I can help it, but I see
better-sqlite3
defaults to returning me Buffers.Would it be possible to add some kind of flag that opts into using standard Uint8Arrays instead?
The text was updated successfully, but these errors were encountered: