| 1724 | return this.end - this.pos |
| 1725 | } |
| 1726 | dataView(): DataView { |
| 1727 | const buf = this.buf |
| 1728 | if ( |
| 1729 | buf.buffer !== this.viewBuffer || buf.byteOffset !== this.viewOffset || buf.byteLength !== this.viewLength |
| 1730 | ) { |
| 1731 | this.viewBuffer = buf.buffer |
| 1732 | this.viewOffset = buf.byteOffset |
| 1733 | this.viewLength = buf.byteLength |
| 1734 | this.viewCache = new DataView(buf.buffer, buf.byteOffset, buf.byteLength) |
| 1735 | } |
| 1736 | return this.view = this.viewCache |
| 1737 | } |
| 1738 | byte(): number { |
| 1739 | if (this.pos >= this.end) invalid("complete value", undefined, this.options) |
| 1740 | return this.buf[this.pos++] |