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

Method _applyHuffman

packages/alphatab/src/zip/Inflate.ts:395–406  ·  view source on GitHub ↗
(h: Huffman)

Source from the content-addressed store, hash-verified

393 }
394
395 private _applyHuffman(h: Huffman): number {
396 if (h instanceof HuffmanFound) {
397 return h.n;
398 }
399 if (h instanceof HuffmanNeedBit) {
400 return this._applyHuffman(this._getBit() ? h.right : h.left);
401 }
402 if (h instanceof HuffmanNeedBits) {
403 return this._applyHuffman(h.table[this._getBits(h.n)]);
404 }
405 throw new FormatError('Invalid data');
406 }
407}

Callers 2

_inflateLoopMethod · 0.95
_inflateLengthsMethod · 0.95

Calls 2

_getBitMethod · 0.95
_getBitsMethod · 0.95

Tested by

no test coverage detected