# Module: encoding/base64

### Methods

#### (static) b64ToUint8Array(base64) → {Uint8Array}

Convert a Base-64 encoded string an array of 8-bit integer

Note: accepts both Radix-64 and URL-safe strings

##### Parameters:

Name | Type | Description
--- | --- | ---
`base64` | String | Base-64 encoded string to convert

Source:
  - encoding/base64.js, line 101

##### Returns:

An array of 8-bit integers.

Type
  Uint8Array

#### (static) decode(data) → {Uint8Array|ReadableStream.<Uint8Array>}

Convert radix-64 to binary array

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | String | ReadableStream.<String> | Radix-64 string to convert

Source:
  - encoding/base64.js, line 66

##### Returns:

Binary array version of input string.

Type
  Uint8Array | ReadableStream.<Uint8Array>

#### (static) encode(data) → {String|ReadableStream.<String>}

Convert binary array to radix-64

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Uint8Array | ReadableStream.<Uint8Array> | Uint8Array to convert

Source:
  - encoding/base64.js, line 42

##### Returns:

Radix-64 version of input string.

Type
  String | ReadableStream.<String>

#### (static) uint8ArrayToB64(bytes, url) → {String}

Convert an array of 8-bit integer to a Base-64 encoded string

##### Parameters:

Name | Type | Description
--- | --- | ---
`bytes` | Uint8Array | An array of 8-bit integers to convert
`url` | bool | If true, output is URL-safe

Source:
  - encoding/base64.js, line 111

##### Returns:

Base-64 encoded string.

Type
  String