* Write bits to internal buffer * @param b source of bits * @param count number of bits to write
(b: number, count: number)
| 122 | * @param count number of bits to write |
| 123 | */ |
| 124 | public writeBits(b: number, count: number) { |
| 125 | this._bits |= b << this.bitCount; |
| 126 | this.bitCount += count; |
| 127 | if (this.bitCount >= 16) { |
| 128 | this._buffer[this._end++] = this._bits & 0xff; |
| 129 | this._buffer[this._end++] = (this._bits >> 8) & 0xff; |
| 130 | this._bits >>= 16; |
| 131 | this.bitCount -= 16; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Align internal buffer on a byte boundary |
no outgoing calls
no test coverage detected