Open vritant24 opened 1 year ago
don't know much about browser streams, but if you share some docs on them, mb we can make a wrapper
https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Concepts
MDN has the docs for readable streams. unfortunately I'm a little less versed on these as well, but happy to help implement them @mafintosh
We just need a streamx -> browser stream general module. prop not too hard :)
Any update on this? I have the exact same need / problem
+1 on this
In the meantime, I recommend using https://www.npmjs.com/package/readable-web-to-node-stream and https://www.npmjs.com/package/readable-stream-node-to-web
readable-web-to-node-stream appears to no longer be maintained, and fails to build in Webpack for me. I was able to use @smessie/readable-web-to-node-stream instead
There's Native support for WebStreams un Node.js, we should use them instead of third-party modules.
I'm trying to use this library in a browser environment, but I'm running into some issues I'd like help with.
this doesn't work since
pipeTo
expects aWritableStream
. If I change the line to:await stream.pipeTo(extractor as unknown as WritableStream<Uint8Array>);
This fails with the following error:
TypeError: The "transform.writable" property must be an instance of WritableStream. Received an instance of Extract
Is there a recommended way of extracting a tar from a browser
ReadableStream
?