/** * Encodes an unicode string into an Uint8Array object as UTF-8 * * @param {String} str String to be encoded * @return {Uint8Array} UTF-8 encoded typed array */ export declare const encode: (str: string, fromCharset?: string) => Uint8Array; export declare const arr2str: (arr: Uint8Array) => string; /** * Decodes a string from Uint8Array to an unicode string using specified encoding * * @param {Uint8Array|String} buf Binary data to be decoded or string to return as-is * @param {String} fromCharset Encoding to decode from (ignored if buf is already a string) * @return {String} Decoded string */ export declare function decode(buf: Uint8Array | string, fromCharset?: string): string; /** * Convert a string from specific encoding to UTF-8 Uint8Array * * @param {String|Uint8Array} data Data to be encoded * @param {String} Source encoding for the string (optional for data of type String) * @return {Uint8Array} UTF-8 encoded typed array */ export declare const convert: (data: string | Uint8Array, fromCharset?: string | undefined) => Uint8Array;