(base64)
| 687 | } |
| 688 | |
| 689 | function decodeBase64ToUint8Array(base64) { |
| 690 | if (typeof atob === "function") { |
| 691 | const binary = atob(base64); |
| 692 | const length = binary.length; |
| 693 | const bytes = new Uint8Array(length); |
| 694 | for (let i = 0; i < length; i += 1) { |
| 695 | bytes[i] = binary.charCodeAt(i); |
| 696 | } |
| 697 | return bytes; |
| 698 | } |
| 699 | if (typeof Buffer === "function") { |
| 700 | return Uint8Array.from(Buffer.from(base64, "base64")); |
| 701 | } |
| 702 | throw new Error("Base64-Dekodierung ist in dieser Umgebung nicht verfügbar."); |
| 703 | } |
| 704 | |
| 705 | function float16ToFloat32(value) { |
| 706 | const sign = (value & 0x8000) >> 15; |
no outgoing calls
no test coverage detected