Пример #1
0
 private void ProcessEntries()
 {
     foreach (WebFileEntry entry in Metadata.Entries.Values)
     {
         FileScheme scheme = GameCollection.ReadScheme(m_stream, entry.Offset, entry.Size, FilePath, entry.NameOrigin);
         AddScheme(scheme);
     }
 }
Пример #2
0
 private void ProcessEntries()
 {
     foreach (BundleFileEntry entry in Metadata.Entries.Values)
     {
         FileEntryOffset offset = m_entryStreams[entry];
         FileScheme      scheme = GameCollection.ReadScheme(offset.Stream, offset.Offset, entry.Size, FilePath, entry.NameOrigin);
         AddScheme(scheme);
     }
 }
Пример #3
0
 private void ReadPre530Data(Stream stream, long metadataOffset)
 {
     foreach (BundleFileEntry entry in Metadata.Entries)
     {
         byte[] buffer = new byte[entry.Size];
         stream.Position = metadataOffset + entry.Offset;
         stream.ReadBuffer(buffer, 0, buffer.Length);
         FileScheme scheme = GameCollection.ReadScheme(buffer, FilePath, entry.NameOrigin);
         AddScheme(scheme);
     }
 }
 private void ReadRawWebData(Stream stream, long metadataOffset)
 {
     foreach (Node entry in Metadata.DirectoryInfo.Nodes)
     {
         byte[] buffer = new byte[entry.Size];
         stream.Position = metadataOffset + entry.Offset;
         stream.ReadBuffer(buffer, 0, buffer.Length);
         FileScheme scheme = GameCollection.ReadScheme(buffer, FilePath, entry.PathOrigin);
         AddScheme(scheme);
     }
 }
Пример #5
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);
                }
            }
        }
Пример #6
0
        private void ReadScheme(Stream stream)
        {
            using (EndianReader reader = new EndianReader(stream, EndianType.LittleEndian))
            {
                Header.Read(reader);
                Metadata.Read(reader);
            }

            foreach (WebFileEntry entry in Metadata.Entries)
            {
                byte[] buffer = new byte[entry.Size];
                stream.Position = entry.Offset;
                stream.ReadBuffer(buffer, 0, buffer.Length);
                FileScheme scheme = GameCollection.ReadScheme(buffer, 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);
                }
            }
        }