public static TES5FileRecord Read(FileRecordBlock block) { var source = block.archive.source; return(new TES5FileRecord() { fileRecordBlock = block, hash = source.reader.ReadBytes(8), size = source.reader.ReadUInt32(), offset = source.reader.ReadUInt32() }); }
public FolderRecord(byte[] bytes, int index, Header header) { var byteOffset = index * ByteSize; nameHash = new BSAHash(bytes, byteOffset + 0); fileCount = BitConverter.ToUInt32(bytes, byteOffset + 8); padding = BitConverter.ToUInt32(bytes, byteOffset + 12); offset = BitConverter.ToUInt64(bytes, byteOffset + 16); var recordOffset = (int)offset - Header.size - (int)header.totalFileNameLength; block = new FileRecordBlock(bytes, recordOffset, (int)fileCount); }