[fetch] Setting strategy to control ReadableStream's internal buffer (#257)

Hi,

I'm trying to limit the internal buffering when reading from a URL to avoid using too much memory (I'm loading a 620MB file). From what I've read, ReadableStream supports the possibility to define a strategy which sets a high water mark on the number of bytes in the buffer. This sounds good, but my question is, is it possible to use it from a fetch call?

I'm basing my code off Jake Archibald's (excellent) example from his blog:

```
fetch(url).then(response => {
   let reader = response.body.getReader();
```

reader is a ReadableStream. Is there anyway to either tell fetch to use a strategy when constructing this stream, or can I modify or construct a new ReadableStream from the old one that implements a strategy?

Thanks!

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/257

Received on Monday, 21 March 2016 22:52:16 UTC