2 * Calculates the byte length of a base64 encoded string.
\r
3 * @param {string} string Base64 encoded string
\r
4 * @returns {number} Byte length
\r
6 export function length(string: string): number;
\r
9 * Encodes a buffer to a base64 encoded string.
\r
10 * @param {Uint8Array} buffer Source buffer
\r
11 * @param {number} start Source start
\r
12 * @param {number} end Source end
\r
13 * @returns {string} Base64 encoded string
\r
15 export function encode(buffer: Uint8Array, start: number, end: number): string;
\r
18 * Decodes a base64 encoded string to a buffer.
\r
19 * @param {string} string Source string
\r
20 * @param {Uint8Array} buffer Destination buffer
\r
21 * @param {number} offset Destination offset
\r
22 * @returns {number} Number of bytes written
\r
23 * @throws {Error} If encoding is invalid
\r
25 export function decode(string: string, buffer: Uint8Array, offset: number): number;
\r
28 * Tests if the specified string appears to be base64 encoded.
\r
29 * @param {string} string String to test
\r
30 * @returns {boolean} `true` if it appears to be base64 encoded, otherwise false
\r
32 export function test(string: string): boolean;
\r