Javascript - Save typed array as blob and read back in as binary data
问题 I have a typed array full of binary data that is being generated from an ArrayBuffer var myArr = new Uint8Array(myBuffer); I am presenting this to the user with var blob = new Blob(myArr, {type: "octet/stream"}; var blobURL = URL.createObjectURL(blob); and inserting a link that is "<a href=" + blobUrl + " download=" + filename "/a>" Later, I am letting the user select the file from disk, and using a file reader to do with var reader = new FileReader(); reader.onload = function () { console