private void ReadNode(BitReader br, TaikoLz81Node node, int valueBitCount) { var flag = br.ReadBit(); if (flag != 0) { node.Children[0] = new TaikoLz81Node(); ReadNode(br, node.Children[0], valueBitCount); node.Children[1] = new TaikoLz81Node(); ReadNode(br, node.Children[1], valueBitCount); } else { node.Value = br.ReadBits <int>(valueBitCount); } }
public void Build(BitReader br, int valueBitCount) { _root = new TaikoLz81Node(); ReadNode(br, _root, valueBitCount); }