I'm getting ArrayBuffer chunks of data and I am adding each chunk to an array on a web worker and when I get all the chunks I convert that array of chunks to a blob.
//worker.js
const array = []
this.onmessage = function(e){
if(e.data.done)
{
const blob = new Blob(array);
this.postMessage(blob)
shunks.length = 0
}
else
{
array.push(e.data.chunk)
}
}
MY QUESTIONS ARE
- if the array size hits 2GB it will be stored on the memory right? that means I wont be able to fill that array with data greater than my available memory?
- When I create a blob from that array, will the blob also take another 2GB from the memory?
ArrayBuffers