@param {number} min
(min)
| 240 | |
| 241 | /** @param {number} min */ |
| 242 | realloc(min) { |
| 243 | let length = this.length || 16; |
| 244 | |
| 245 | while (length < this.pos + min) length *= 2; |
| 246 | |
| 247 | if (length !== this.length) { |
| 248 | const buf = new Uint8Array(length); |
| 249 | buf.set(this.buf); |
| 250 | this.buf = buf; |
| 251 | this.dataView = new DataView(buf.buffer); |
| 252 | this.length = length; |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | finish() { |
| 257 | this.length = this.pos; |
no outgoing calls
no test coverage detected