export type DetectedEncoding = 'utf-8' | 'utf-16le' | 'utf-16be' | 'utf-32le' | 'utf-32be'; /** * Detect the text encoding of a buffer by inspecting its BOM (Byte Order Mark). * Falls back to 'utf-8' when no BOM is found. */ export declare function detectEncoding(buffer: Buffer): DetectedEncoding; /** * Strip the BOM from the start of a string if present. */ export declare function stripBom(str: string): string; /** * Returns the byte length of the BOM for a given encoding. */ export declare function bomLength(encoding: DetectedEncoding): number; //# sourceMappingURL=encoding-detector.d.ts.map