diff --git a/KeepersCompound.LGS/Database/File.cs b/KeepersCompound.LGS/Database/File.cs index b52b11b..70e2fd1 100644 --- a/KeepersCompound.LGS/Database/File.cs +++ b/KeepersCompound.LGS/Database/File.cs @@ -133,6 +133,17 @@ public class DbFile writer.Write(tocOffset); } + public bool TryGetChunk(string name, out T chunk) + { + if (Chunks.TryGetValue(name, out var rawChunk)) + { + chunk = (T)rawChunk; + return true; + } + chunk = default; + return false; + } + private static IChunk NewChunk(string entryName) { return entryName switch