(n, reference)
| 96 | return v; |
| 97 | } |
| 98 | readChunk(n, reference) { |
| 99 | const read = this.#read; |
| 100 | if (read + n > this.#write) |
| 101 | throw new Error; |
| 102 | |
| 103 | this.#read += n; |
| 104 | if (reference) |
| 105 | return this.#bytes.subarray(read, read + n); |
| 106 | |
| 107 | return this.#bytes.slice(read, read + n).buffer; |
| 108 | } |
| 109 | getChunk() { |
| 110 | const bytes = this.#bytes; |
| 111 | this.#bytes = undefined; |
no test coverage detected