/** Resolves an encoding alias to the spelling Node reports, or `undefined` if unknown. */ export declare function normalizeEncoding(encoding?: string | null): BufferEncoding | undefined; /** * Decodes byte chunks into strings without splitting multi-byte characters across chunks. * * `utf8` uses a streaming `TextDecoder`. `utf16le` is handled here instead, because Node * drops a trailing odd byte and preserves lone surrogates where the WHATWG decoder replaces * both with U+FFFD. The remaining encodings only need their fixed-size groups buffered. */ export declare class StringDecoder { #private; readonly encoding: BufferEncoding; constructor(encoding?: string | null); write(buf: string | ArrayBufferView): string; end(buf?: string | ArrayBufferView): string; }