/// <inheritdoc/> public void AddChild(string prefix, string path) { switch (path.Length) { case 0: break; case 1: if (path == "0") { Left = new CompressedNode(prefix); } else { Right = new CompressedNode(prefix); } break; default: if (path.StartsWith("0")) { if (Left == null) { Left = new CompressedNode(); } Left.AddChild(prefix, path.Substring(1)); } else { if (Right == null) { Right = new CompressedNode(); } Right.AddChild(prefix, path.Substring(1)); } break; } }