type Piece = Uint8Array | string; /** * Passes the pieces on and throws `exceeded()` as soon as more than `max` bytes * have arrived, before the next piece is read, so a file that is too large is * stopped while it streams and never held. */ export declare function limitBytes(source: AsyncIterable, max: number, exceeded: () => Error): AsyncGenerator; /** * Cuts a stream of pieces of any size into chunks of exactly `size` bytes; only * the last may be smaller, and an empty stream gives no chunk. At most `size` * bytes and the piece in hand are held at a time. */ export declare function rechunk(source: AsyncIterable, size: number): AsyncGenerator; export {};