Ejemplo n.º 1
0
        private void ReadRbSection(BinaryReader reader)
        {
            reader.BaseStream.Position = RbSectionOffset;
            string magicNumber = reader.ReadString(2);

            if (magicNumber != "RB")
            {
                throw new InvalidOperationException();
            }
            int count = reader.ReadInt32();

            RbEntry[] rbEntries = new RbEntry[count];
            for (int i = 0; i < count; i++)
            {
                rbEntries[i] = new RbEntry
                {
                    Size   = reader.ReadInt16(),
                    Offset = reader.ReadInt32()
                };
            }
        }
Ejemplo n.º 2
0
 private void ReadRbSection(BinaryReader reader)
 {
     reader.BaseStream.Position = RbSectionOffset;
     string magicNumber = reader.ReadString(2);
     if (magicNumber != "RB")
     {
         throw new InvalidOperationException();
     }
     int count = reader.ReadInt32();
     RbEntry[] rbEntries = new RbEntry[count];
     for (int i = 0; i < count; i++)
     {
         rbEntries[i] = new RbEntry
         {
             Size = reader.ReadInt16(),
             Offset = reader.ReadInt32()
         };
     }
 }