Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / @protobufjs / base64 / index.d.ts
1 /**\r
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
5  */\r
6 export function length(string: string): number;\r
7 \r
8 /**\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
14  */\r
15 export function encode(buffer: Uint8Array, start: number, end: number): string;\r
16 \r
17 /**\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
24  */\r
25 export function decode(string: string, buffer: Uint8Array, offset: number): number;\r
26 \r
27 /**\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
31  */\r
32 export function test(string: string): boolean;\r