private static bool IsDescendantTo(this FlatEntry possibleDescendant, FlatEntry possibleAncestor) => possibleDescendant.Path.StartsWith(possibleAncestor.Path + "\\");
private static int Depth(this FlatEntry x) => x.Path.Count(c => c == '\\');
private static string EncodeSingleEntry(FlatEntry entry) => EncodeNodeName(entry.Path) + EncodeChildren(entry.ChildData);