b64decode
b64decode(
s:string|Uint8Array<ArrayBufferLike>):Uint8Array
Defined in: packages/pythonlib/src/base64.ts:77
Decode Base64 encoded bytes-like object or ASCII string and return bytes.
Parameters
| Parameter | Type | Description |
|---|---|---|
s | string | Uint8Array<ArrayBufferLike> | Base64 encoded data (Uint8Array or string) |
Returns
Uint8Array
Decoded Uint8Array
Example
const decoded = b64decode("aGVsbG8=")console.log(new TextDecoder().decode(decoded)) // "hello"