예제 #1
0
        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()
            });
        }
예제 #2
0
파일: BSA105.cs 프로젝트: lukekaalim/SSELib
            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);
            }