Re: [whatwg/fetch] Body.arrayBuffer([begin, end]) (#554)

I've updated my code snippet to better reflect what I'm experiencing. A huge file is in my cache and I would like to return only a subset of it on a fetch event instead of bringing the entire file in memory.

Both samples are equivalent as far as I can test in my browser in term of memory usage:

```javascript
const response = await caches.match('https://example.com/huge-file.mp4');
const data = await response.arrayBuffer();
const sliceData = data.slice(0, 1024);
```
 
```javascript
const response = await caches.match('https://example.com/huge-file.mp4');
const blob = await response.blob();
const sliceData = blob.slice(0, 1024);
```

-- 
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/554#issuecomment-308945689

Received on Friday, 16 June 2017 06:36:15 UTC