(bytes: Uint8Array)
| 22 | } |
| 23 | |
| 24 | static bytesToBase64 (bytes: Uint8Array): string { |
| 25 | const chunks = []; |
| 26 | for (let i = 0; i < bytes.length; i += 32768) { |
| 27 | const byteChunk = bytes.subarray(i, i + 32768); |
| 28 | chunks.push(String.fromCharCode(...byteChunk)); |
| 29 | } |
| 30 | return btoa(chunks.join("")); |
| 31 | } |
| 32 | |
| 33 | async doConvert ( |
| 34 | inputFiles: FileData[], |