MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / writeBits

Method writeBits

packages/alphatab/src/zip/PendingBuffer.ts:124–133  ·  view source on GitHub ↗

* Write bits to internal buffer * @param b source of bits * @param count number of bits to write

(b: number, count: number)

Source from the content-addressed store, hash-verified

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

Callers 7

deflateMethod · 0.80
writeTreeMethod · 0.80
writeSymbolMethod · 0.80
flushStoredBlockMethod · 0.80
flushBlockMethod · 0.80
sendAllTreesMethod · 0.80
compressBlockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected