private void AddRegionIfExists(CIASection section, CIARegion ciaRegion) { if (ciaRegion.Size != 0) { this.Regions[section] = ciaRegion; } }
public void ExtractSection(CIASection section, Stream outputStream, bool closeOutputStream) { CIARegion region; try { region = this.Info.Regions[section]; } catch (KeyNotFoundException) { throw new ArgumentException($"Specified Section {Enum.GetName(typeof(CIASection), section)} was not found in this CIA."); } Tools.ExtractFileStreamPart(this.CIAMemoryMappedFile, outputStream, region.Offset, region.Size, closeOutputStream); }
public CIARegion(CIASection type, long offset, long size) { this.Type = type; this.Offset = offset; this.Size = size; }