Пример #1
0
 private void AddRegionIfExists(CIASection section, CIARegion ciaRegion)
 {
     if (ciaRegion.Size != 0)
     {
         this.Regions[section] = ciaRegion;
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
 public CIARegion(CIASection type, long offset, long size)
 {
     this.Type   = type;
     this.Offset = offset;
     this.Size   = size;
 }