a byte buffer implementing fuman readable/writable streams
new
Bytes(buf: Uint8Array)
disposeWriteSync(written?: number): void
read(into: Uint8Array): Promise<number>
readSync(bytes: number): Uint8Array
reclaim(): void
Reclaim memory by only keeping the yet-unread data
reset(): void
reset the read/write cursors
result(): Uint8Array
get the "result" of the buffer, i.e. everything that has been written so far, but not yet read
Note: this method returns a view into the underlying buffer, and does advance the read cursor
write(bytes: Uint8Array): Promise<void>
writeSync(size: number): Uint8Array