import { Subject } from 'rxjs'; export declare class BufferQueue { protected _buffer: Uint8Array; protected subject: Subject; constructor(); get buffer(): Uint8Array; set buffer(b: Uint8Array); /** * Append data to the buffer * @param data */ next(data: Uint8Array): void; /** * Take at max length bytes data from the buffer. * @param length */ take(length: number): Uint8Array; /** * Returns the buffer length */ dataLength(): number; /** * Returns the whole buffer */ takeAll(): Uint8Array; /** * Returns a promise that resolve when buffer has received the expectedLength given in parameter * @param expectedLength expected length in bytes that we must receive before resolving the promise */ waitforLength(expectedLength: number): Promise; }