blob 创建方式
let myBlobParts = ['Hello Leo
']; // 一个包含DOMString的数组
let myBlob = new Blob(myBlobParts, {type : 'text/html', endings: "transparent"}); // 得到 blob
console.log(myBlob.size + " bytes size");
// Output: 31 bytes size
console.log(myBlob.type + " is the type");
// Output: text/html is the type
let hello = new Uint8Array([72, 101, 108, 108, 111]); // 二进制格式的 "hello"
let blob = new Blob([hello, ' ', 'leo'], {type: 'text/plain'});
// Output: "Hello leo"
let blob1 = new Blob(['Hello Leo
'], {type : 'text/html', endings: "transparent"});
let blob2 = new Blob(['Happy Boy!
'], {type : 'text/html', endings: "transparent"});
let slice1 = blob1.slice(16);
let slice2 = blob2.slice(0, 16); await slice1.text();
// currtent slice1 value: "Leo