title: How to transfer large objects using postMessage of webworker?
body: <p>I have read that transferable objects can be transferred really fast using postmessage of web worker. According to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Transferable" rel="noreferrer">this</a> transferable objects are either arraybuffer or messageport.</p>
  
  <p>Question is, how do I convert say an arbitrary object that is of large size (30 mb) to a transferable object and pass it as an argument to postmessage. From what I understand I can convert my array to json string and then convert json string to raw byte data and store that inside of an array object. However, this seems to defeat the purpose of fast transferring.</p>
  
  <p>could someone enlighten me to pass an object as transferable object or if it's even possible?</p>
  
  <p>Thanks in advance!</p>