* Reads the next `p.length` bytes from the buffer or until the buffer is * drained. Resolves to the number of bytes read. If the buffer has no * data to return, resolves to EOF (`null`). * * NOTE: This methods reads bytes synchronously; it's provided for * compatibility with `Reader`
(p: Uint8Array)
| 283 | * @returns The number of bytes read. |
| 284 | */ |
| 285 | read(p: Uint8Array): Promise<number | null> { |
| 286 | const rr = this.readSync(p); |
| 287 | return Promise.resolve(rr); |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * Writes the given data to the buffer. |