예제 #1
0
        public void Read(byte[] buffer, int offset)
        {
            Tag             = Utilities.BytesToString(buffer, offset, 8);
            HeaderSize      = Utilities.ToUInt32LittleEndian(buffer, 8);
            Version         = Utilities.ToUInt32LittleEndian(buffer, 12);
            Flags           = (FileFlags)Utilities.ToUInt32LittleEndian(buffer, 16);
            CompressionSize = Utilities.ToInt32LittleEndian(buffer, 20);
            WimGuid         = Utilities.ToGuidLittleEndian(buffer, 24);
            PartNumber      = Utilities.ToUInt16LittleEndian(buffer, 40);
            TotalParts      = Utilities.ToUInt16LittleEndian(buffer, 42);
            ImageCount      = Utilities.ToUInt32LittleEndian(buffer, 44);

            OffsetTableHeader = new ShortResourceHeader();
            OffsetTableHeader.Read(buffer, 48);

            XmlDataHeader = new ShortResourceHeader();
            XmlDataHeader.Read(buffer, 72);

            BootMetaData = new ShortResourceHeader();
            BootMetaData.Read(buffer, 96);

            BootIndex = Utilities.ToUInt32LittleEndian(buffer, 120);

            IntegrityHeader = new ShortResourceHeader();
            IntegrityHeader.Read(buffer, 124);
        }
예제 #2
0
 public void Read(byte[] buffer, int offset)
 {
     Header = new ShortResourceHeader();
     Header.Read(buffer, offset);
     PartNumber = Utilities.ToUInt16LittleEndian(buffer, offset + ShortResourceHeader.Size);
     RefCount   = Utilities.ToUInt32LittleEndian(buffer, offset + ShortResourceHeader.Size + 2);
     Hash       = new byte[20];
     Array.Copy(buffer, offset + ShortResourceHeader.Size + 6, Hash, 0, 20);
 }