public List <IsoTableEntryInfo> GetEntriesInfo(IList <IsoTableEntry> entries) { ProgressTotalChanged.NullSafeInvoke(entries.Count); List <IsoTableEntryInfo> result = new List <IsoTableEntryInfo>(entries.Count); int counter = 0; for (int i = 0; i < entries.Count - 1; i++) { IsoTableEntry entry = entries[i]; long compressedSize = (entries[i + 1].Sector - entry.Sector) * _isoInfo.SectorSize - entry.Left; if (compressedSize < 1) { ProgressIncrement.NullSafeInvoke(1); continue; } long offset = entry.Sector * _isoInfo.SectorSize; IsoTableEntryInfo info = new IsoTableEntryInfo(i, counter++, offset, compressedSize, entry.Flags); result.Add(info); ProgressIncrement.NullSafeInvoke(1); } return(result); }
public List <IsoTableEntry> GetEntries() { ProgressTotalChanged.NullSafeInvoke(_isoInfo.MaxEntriesCount); List <IsoTableEntry> entries = new List <IsoTableEntry>(_isoInfo.MaxEntriesCount); using (MemoryMappedViewStream input = _memory.CreateViewStream(_isoInfo.EntryTableOffset, _isoInfo.MaxEntriesCount * 4, MemoryMappedFileAccess.Read)) { for (int i = 0; i < _isoInfo.MaxEntriesCount; i++) { ProgressIncrement.NullSafeInvoke(1); IsoTableEntry entry = input.ReadStruct <IsoTableEntry>(); if (entry.Sector == 0) { ProgressTotalChanged.NullSafeInvoke(i); break; } entries.Add(entry); } } return(entries); }
public void ChangeTotal(long value) { ProgressTotalChanged.NullSafeInvoke(value); }
public void ReadAdditionalEntriesInfo(IList <IsoTableEntryInfo> infos) { ProgressTotalChanged.NullSafeInvoke(infos.Count); Parallel.ForEach(infos, SafeReadAdditionalEntryInfo); }