(len: number)
| 282 | } |
| 283 | |
| 284 | bufferRef(len: number) { |
| 285 | if (len < 0 || len > this.byteLength - this.cursor) { |
| 286 | throw new Error("Insufficient bytes for buffer reference"); |
| 287 | } |
| 288 | const result = this.platformBuffer.subarray(this.cursor, this.cursor + len); |
| 289 | this.cursor += len; |
| 290 | return result; |
| 291 | } |
| 292 | |
| 293 | bufferRefAt(start: number, len: number) { |
| 294 | if (start < 0 || len < 0 || start > this.byteLength - len) { |
no test coverage detected