예제 #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;