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

Method _treeDepth

packages/alphatab/src/zip/HuffTools.ts:114–127  ·  view source on GitHub ↗
(t: Huffman)

Source from the content-addressed store, hash-verified

112 }
113
114 private static _treeDepth(t: Huffman): number {
115 if (t instanceof Found) {
116 return 0;
117 }
118 if (t instanceof NeedBits) {
119 throw new FormatError('assert');
120 }
121 if (t instanceof NeedBit) {
122 const da: number = HuffTools._treeDepth(t.left);
123 const db: number = HuffTools._treeDepth(t.right);
124 return 1 + (da < db ? da : db);
125 }
126 return 0;
127 }
128}

Callers 1

_treeCompressMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected