(n: number)
| 311 | } |
| 312 | |
| 313 | private _getBits(n: number): number { |
| 314 | while (this._nbits < n) { |
| 315 | this._bits = this._bits | (this._input.readByte() << this._nbits); |
| 316 | this._nbits += 8; |
| 317 | } |
| 318 | const b: number = this._bits & ((1 << n) - 1); |
| 319 | this._nbits -= n; |
| 320 | this._bits = this._bits >> n; |
| 321 | return b; |
| 322 | } |
| 323 | |
| 324 | private _getRevBits(n: number): number { |
| 325 | return n === 0 ? 0 : this._getBit() ? (1 << (n - 1)) | this._getRevBits(n - 1) : this._getRevBits(n - 1); |
no test coverage detected