title: Pass large amounts of data between web worker and main thread
body: <p>Is there a way to pass large amounts of data (multiple MB) between a web worker and the main thread? I work in a project where I need to download files, modify them a bit and then somehow let the user download the modified file. I found the following ways to pass data between a web worker and the main UI</p>
  
  <ol>
  <li>Using the regular <code>postMessage</code> method.</li>
  <li>Using transferable objects (Chrome only)</li>
  <li>Create a URL reference to a blob and only send the URL (works in Chrome, in others as well?)</li>
  </ol>
  
  <p>I think (1) is fine when sending smaller objects but it takes a lot of time and space when dealing with files larger than a few MB since it is serialized and sent as JSON. Chrome offers a way to transfer data using transferable objects where the data does not have to be copied. Unfortunately this is a Chrome only feature so far since it would have served my purpose otherwise.</p>
  
  <p>The last thing I found was to, from the worker, create a URL to a blob using <code>self.webkitURL</code> and then only pass the URL reference to the UI. This works well, I can give the URL to the user and they can download the file. I have unfortunately not found a way to do this is in Firefox, is it possible?</p>
  
  <p>Is there any other methods one could use to transfer data between workers and the main thread?</p>