Path: blob/master/node_modules/@protobufjs/base64/index.d.ts
2591 views
/**1* Calculates the byte length of a base64 encoded string.2* @param {string} string Base64 encoded string3* @returns {number} Byte length4*/5export function length(string: string): number;67/**8* Encodes a buffer to a base64 encoded string.9* @param {Uint8Array} buffer Source buffer10* @param {number} start Source start11* @param {number} end Source end12* @returns {string} Base64 encoded string13*/14export function encode(buffer: Uint8Array, start: number, end: number): string;1516/**17* Decodes a base64 encoded string to a buffer.18* @param {string} string Source string19* @param {Uint8Array} buffer Destination buffer20* @param {number} offset Destination offset21* @returns {number} Number of bytes written22* @throws {Error} If encoding is invalid23*/24export function decode(string: string, buffer: Uint8Array, offset: number): number;2526/**27* Tests if the specified string appears to be base64 encoded.28* @param {string} string String to test29* @returns {boolean} `true` if it appears to be base64 encoded, otherwise false30*/31export function test(string: string): boolean;323334