import { Transform } from 'node:stream'; import type { TransformCallback } from 'node:stream'; /** Passes every byte on unchanged and hashes it on the way. */ export declare class DigestStream extends Transform { private readonly hash; private seen; private result?; constructor(algorithm?: string); get bytes(): number; /** @throws InvalidOperation before the stream finished, since the digest covers the whole input */ digest(encoding?: 'hex' | 'base64'): string; _transform(chunk: Buffer, _encoding: BufferEncoding, callback: TransformCallback): void; _flush(callback: TransformCallback): void; } /** Passes at most `maxBytes` bytes on; the chunk that would go over fails the stream with LimitExceeded and is dropped. */ export declare class ByteLimitStream extends Transform { private readonly maxBytes; private passed; constructor(maxBytes: number); /** Bytes passed on so far; never more than `maxBytes`. */ get bytes(): number; _transform(chunk: Buffer, _encoding: BufferEncoding, callback: TransformCallback): void; } //# sourceMappingURL=streams.d.ts.map