public IMemoryOwner <byte> Serialize(TreeNodeMap model) { TreeWire wire = model.Convert(); IMemoryOwner <byte> slice = SerializeImpl(wire); return(slice); }
public TreeNodeMap DeserializeTree(ReadOnlySpan<byte> span) { if (span.IsEmpty) return default; var wire = new TreeWire(); wire.MergeFrom(span.ToArray()); // TODO: Perf var model = wire.Convert(); return model; }