Open jimmywarting opened 1 year ago
also wondering if you could switch out the stream for something like async iterator instead...
Eventually, I'll switch out stream
for WHATWG streams, which node is starting to support and are supported by all of the browsers now. That should just be relatively mechanical work, but I can't do it until all of the Node versions that I support have it, which is still some ways away. If you'd like to file a separate issue for that, I'd appreciate it, since it needs to be tracked separately.
Buffer is different. I use quite a bit of the features of Buffer that are layered on top of Uint8Array. However, many of those features might be available in DataView. I'd still need base64, concat, and a few other things. The first phase of that work will be in nofilter
. Let's use this existing issue (https://github.com/hildjj/nofilter/issues/1) to think about it.
Once nofilter
is fixed, I'm pretty sure that stream-browserify
is still going to need buffer
, so the size of the resulting bundle isn't going to change.
Bundeling buffer to the web isn't a good thing... could you maybe instead only depend on Uint8Array stuff?