1 |
|
2 |
|
3 | import { Readable, ReadableOptions, Writable, WritableOptions } from 'stream';
|
4 | export declare class NullStream extends Writable {
|
5 | _write(chunk: any, encoding: string, callback: () => void): void;
|
6 | }
|
7 | export interface ReadableStreamBufferOptions extends ReadableOptions {
|
8 | chunkSize?: number;
|
9 | allocSize?: number;
|
10 | growSize?: number;
|
11 | }
|
12 | export declare class ReadableStreamBuffer extends Readable {
|
13 | protected buffer: Buffer;
|
14 | protected _size: number;
|
15 | protected _stopped: boolean;
|
16 | protected chunkSize: number;
|
17 | protected growSize: number;
|
18 | constructor(opts?: ReadableStreamBufferOptions);
|
19 | get size(): number;
|
20 | get stopped(): boolean;
|
21 | _read(): void;
|
22 | feed(data: Buffer | string, encoding?: BufferEncoding): void;
|
23 | stop(): void;
|
24 | protected _send(): void;
|
25 | }
|
26 | export interface WritableStreamBufferOptions extends WritableOptions {
|
27 | allocSize?: number;
|
28 | growSize?: number;
|
29 | }
|
30 | export declare class WritableStreamBuffer extends Writable {
|
31 | protected buffer: Buffer;
|
32 | protected _size: number;
|
33 | protected growSize: number;
|
34 | constructor(opts?: WritableStreamBufferOptions);
|
35 | get size(): number;
|
36 | _write(chunk: any, encoding: string, callback: () => void): void;
|
37 | consume(bytes?: number): Buffer;
|
38 | }
|
39 | export declare function growBufferForAppendedData(buf: Buffer, actualsize: number, appendsize: number): Buffer;
|