(In reply to Jean-Yves Avenard [:jya] from comment #3)
(In reply to ianopolous from comment #2)
Our use case for this with Peergos is downloading or streaming large encrypted files which are reassembled and decrypted in the browser.
For an example see the following. This opens a 120MB version of Sintel and streams it to a video element. In Chrome this is done 5MiB at a time so it can start much faster than in Firefox where it has to fallback to loading the entire video into RAM and decrypting (the keys are in the url hash fragment) before it can start playing:
This means that currently in Firefox we are limited to loading files that will fit into ram, which means we have to recommend Chrome. We would love to be able to recommend Firefox given our privacy focus.
I'm curious on why you would need Writeable Stream to do this.
There are lots of Web sites having that exact requirements, none of them using writeable streams.
Can you name one? What technique do they use? The closest I'm aware of is Mega, and they have the exact same problem. In Chrome they solve it with a Chrome specific file system api, and in Firefox they resort to loading it into RAM, as I've suggested, and downloading from a blob.
The general problem is for large files that are generated in the browser to be streamed directly to a host file (or or video tag). We generate them by reassembling fragments and decrypting in the browser with keys that are not exposed to the server.
P.S. N.B. the link I gave longer works - we are in middle of changing some things. I'll post another link when we're done.