/** * UTF-8 encoding and decoding. * * `TextEncoder`/`TextDecoder` exist in every runtime this library targets, but * using them would mean either compiling core against the DOM type library — * which would let browser-only APIs slip in unnoticed — or shipping ambient * global declarations that clash with a consumer's own lib settings. Metadata * strings are the only place text conversion is needed, and the amount of code * required is small enough that owning it is cheaper than either workaround. * * Decoding is deliberately lenient: malformed sequences become U+FFFD rather * than throwing. Tags come from arbitrary files, and a bad byte in a comment * field must never stop the audio from decoding. */ /** Encodes a string as UTF-8. */ export declare function encodeUtf8(text: string): Uint8Array; /** Decodes UTF-8, substituting U+FFFD for malformed sequences. */ export declare function decodeUtf8(bytes: Uint8Array): string; /** Decodes Latin-1, which is what RIFF INFO and ID3v1 fields actually contain. */ export declare function decodeLatin1(bytes: Uint8Array): string;