Beispiel #1
0
        private void Read530Data(Stream stream, long headerSize)
        {
            if (Header.Flags.IsMetadataAtTheEnd())
            {
                stream.Position = headerSize;
            }

            using (BundleFileBlockReader blockReader = new BundleFileBlockReader(stream, Metadata))
            {
                foreach (BundleFileEntry entry in Metadata.Entries)
                {
                    SmartStream entryStream = blockReader.ReadEntry(entry);
                    FileScheme  scheme      = GameCollection.ReadScheme(entryStream, FilePath, entry.NameOrigin);
                    AddScheme(scheme);
                }
            }
        }
        private void ReadFileStreamData(Stream stream, long basePosition, long headerSize)
        {
            if (Header.FileStream.Flags.IsBlocksInfoAtTheEnd())
            {
                stream.Position = basePosition + headerSize;
            }

            using (BundleFileBlockReader blockReader = new BundleFileBlockReader(stream, Metadata.BlocksInfo))
            {
                foreach (Node entry in Metadata.DirectoryInfo.Nodes)
                {
                    SmartStream entryStream = blockReader.ReadEntry(entry);
                    FileScheme  scheme      = GameCollection.ReadScheme(entryStream, FilePath, entry.PathOrigin);
                    AddScheme(scheme);
                }
            }
        }