(ioQueue, encoding)
| 15412 | switch (type) { |
| 15413 | case "DataURL": { |
| 15414 | let dataURL = "data:"; |
| 15415 | const parsed = parseMIMEType(mimeType || "application/octet-stream"); |
| 15416 | if (parsed !== "failure") { |
| 15417 | dataURL += serializeAMimeType(parsed); |
| 15418 | } |
| 15419 | dataURL += ";base64,"; |
| 15420 | const decoder = new StringDecoder2("latin1"); |
| 15421 | for (const chunk of bytes) { |
| 15422 | dataURL += btoa(decoder.write(chunk)); |
| 15423 | } |
| 15424 | dataURL += btoa(decoder.end()); |
| 15425 | return dataURL; |
| 15426 | } |
| 15427 | case "Text": { |
no test coverage detected