public IndexRootRecord(byte[] buffer, int offset) : base(buffer, offset) { IndexedAttributeType = (AttributeType)LittleEndianConverter.ToUInt32(this.Data, 0x00); CollationRule = (CollationRule)LittleEndianConverter.ToUInt32(this.Data, 0x04); BytesPerIndexRecord = LittleEndianConverter.ToUInt32(this.Data, 0x08); BlocksPerIndexRecord = ByteReader.ReadByte(this.Data, 0x0C); // 3 zero bytes (padding to 8-byte boundary) m_indexHeader = new IndexHeader(this.Data, 0x10); int entriesOffset = IndexHeaderOffset + (int)m_indexHeader.EntriesOffset; IndexEntries = IndexEntry.ReadIndexEntries(this.Data, entriesOffset); }
public IndexRecord(byte[] buffer, int offset) { MultiSectorHeader multiSectorHeader = new MultiSectorHeader(buffer, offset + 0x00); if (multiSectorHeader.Signature != ValidSignature) { throw new InvalidDataException("Invalid INDX record signature"); } LogFileSequenceNumber = LittleEndianConverter.ToUInt64(buffer, offset + 0x08); RecordVBN = (long)LittleEndianConverter.ToUInt64(buffer, offset + 0x10); m_indexHeader = new IndexHeader(buffer, offset + 0x18); UpdateSequenceNumber = LittleEndianConverter.ToUInt16(buffer, offset + multiSectorHeader.UpdateSequenceArrayOffset); int entriesOffset = 0x18 + (int)m_indexHeader.EntriesOffset; IndexEntries = IndexEntry.ReadIndexEntries(buffer, entriesOffset); }
public IndexRecord(byte[] buffer, int offset) { MultiSectorHeader multiSectorHeader = new MultiSectorHeader(buffer, offset + 0x00); if (multiSectorHeader.Signature != ValidSignature) { throw new InvalidDataException("Invalid INDX record signature"); } LogFileSequenceNumber = LittleEndianConverter.ToUInt64(buffer, offset + 0x08); RecordVBN = (long)LittleEndianConverter.ToUInt64(buffer, offset + 0x10); m_indexHeader = new IndexHeader(buffer, offset + 0x18); int position = offset + multiSectorHeader.UpdateSequenceArrayOffset; List <byte[]> updateSequenceReplacementData = MultiSectorHelper.ReadUpdateSequenceArray(buffer, position, multiSectorHeader.UpdateSequenceArraySize, out UpdateSequenceNumber); MultiSectorHelper.DecodeSegmentBuffer(buffer, offset, UpdateSequenceNumber, updateSequenceReplacementData); int entriesOffset = 0x18 + (int)m_indexHeader.EntriesOffset; IndexEntries = IndexEntry.ReadIndexEntries(buffer, entriesOffset); }