UNPKG

@protobuf-ts/runtime

Version:

Runtime library for code generated by the protoc plugin "protobuf-ts"

19 lines (18 loc) 555 B
/** * Decodes a base64 string to a byte array. * * - ignores white-space, including line breaks and tabs * - allows inner padding (can decode concatenated base64 strings) * - does not require padding * - understands base64url encoding: * "-" instead of "+", * "_" instead of "/", * no padding */ export declare function base64decode(base64Str: string): Uint8Array; /** * Encodes a byte array to a base64 string. * Adds padding at the end. * Does not insert newlines. */ export declare function base64encode(bytes: Uint8Array): string;