Beispiel #1
0
        public static FileRecord Parse(byte[] recordBytes, int offset)
        {
            var nameHash           = BSAHash.Parse(recordBytes, offset);
            var sizeAndCompression = BitConverter.ToUInt32(recordBytes, offset + BSAHash.HashSize);
            var dataOffset         = BitConverter.ToUInt32(recordBytes, offset + BSAHash.HashSize + 4);

            return(new FileRecord()
            {
                NameHash = nameHash,
                SizeAndCompression = sizeAndCompression,
                DataOffset = dataOffset,
            });
        }
Beispiel #2
0
        public static BSA105FolderRecord Parse(byte[] folderBytes, int byteOffset)
        {
            var nameHash  = new BSAHash(folderBytes, byteOffset + 0);
            var fileCount = BitConverter.ToUInt32(folderBytes, byteOffset + 8);
            // buffer byteOffset + 12
            var fileRecordOffset = BitConverter.ToUInt32(folderBytes, byteOffset + 16);

            // buffer byteOffset + 20

            return(new BSA105FolderRecord()
            {
                NameHash = nameHash,
                FileCount = fileCount,
                FileRecordOffset = fileRecordOffset
            });
        }