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

Method _getBits

packages/alphatab/src/zip/Inflate.ts:313–322  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

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);

Callers 3

_inflateLoopMethod · 0.95
_inflateLengthsMethod · 0.95
_applyHuffmanMethod · 0.95

Calls 1

readByteMethod · 0.65

Tested by

no test coverage detected