示例#1
0
        public Stream FileOpen(Idx.Entry entry)
        {
            if (entry.IsCompressed)
            {
                var fileStream = new SubStream(stream, entry.Offset * IsoBlockAlign, entry.BlockLength * IsoBlockAlign + IsoBlockAlign);
                return(new MemoryStream(Decompress(fileStream)));
            }

            return(new SubStream(stream, entry.Offset * IsoBlockAlign, entry.Length));
        }
示例#2
0
文件: IdxName.cs 项目: xorllc/OpenKh
 public static string Lookup(Idx.Entry entry) =>
 _nameDictionary.TryGetValue(IdxDictionary.GetHash(entry), out var name) ? name : null;