UNPKG

buffer-readable

Version:

convert a string/Buffer/Uint8Array to a readable stream, support highWaterMark and adjustable push delay

16 lines (15 loc) 565 B
/// <reference types="node" /> /// <reference types="node" /> import { Readable, ReadableOptions } from "stream"; export declare class BufferReadable extends Readable { private __buffer; private __buffer_len; private __delay; private __pos; constructor(buffer: string | Buffer | Uint8Array, opts?: BufferReadableOptions); _read(size: number): void; _destroy(error: Error | null, callback: (error?: Error | null) => void): void; } export interface BufferReadableOptions extends Omit<ReadableOptions, "objectMode"> { delay?: number; }