import stream from "stream"; interface ToUtf8Options { encoding?: string; sampleSize?: number; } export declare function detectEncoding(buf: Buffer): string; export default class ToUtf8 extends stream.Transform { private encodingHint?; private sampleSize; private sampleBuffer; private sampledLength; private decoder?; private detected?; constructor(opts?: ToUtf8Options); get detectedEncoding(): string | undefined; private useEncoding; private flushSample; _transform(chunk: Buffer, _enc: string, cb: (err?: Error | null) => void): void; _flush(cb: (err?: Error | null) => void): void; } export {};