static-dev/source-loader

Make Binary Files Available as Blobs

jescalan opened this issue · 0 comments

So right now we do not export binary files processed by source-loader, because a stringified binary file is of absolutely no use in client-side javascript, and attempting to process/stringify one can cause issues with large files on some machines.

However, what we could do would be to serialize the buffered contents into an ArrayBuffer, construct a Blob from this, and export that so you could actually access and manipulate a binary file in your client-side js. Basically we'd just need to convert the buffer to a format accepted by browsers, and that would be that.

On the backburner for now, but if someone needs this it could become a priority. It would certainly be a cool feature to have!