Example #1
0
        internal Stream OpenChunk(VpkEntry entry)
        {
            var file   = Chunks[entry.ArchiveIndex];
            var stream = OpenFile(file);
            var offset = entry.ArchiveIndex == DirectoryIndex ? HeaderLength + TreeLength + entry.EntryOffset : entry.EntryOffset;

            stream.Position = offset;
            return(stream);
        }
Example #2
0
 public VpkEntryStream(VpkEntry entry, Stream stream)
 {
     _entry = entry;
     _stream = stream;
     _streamStart = stream.Position;
 }
Example #3
0
 public VpkEntryStream(VpkEntry entry, VpkDirectory directory)
 {
     _entry = entry;
     _stream = directory.OpenChunk(_entry);
     _streamStart = _stream.Position;
 }
Example #4
0
 public VpkEntryStream(VpkEntry entry, Stream stream)
 {
     _entry       = entry;
     _stream      = stream;
     _streamStart = stream.Position;
 }
Example #5
0
 public VpkEntryStream(VpkEntry entry, VpkDirectory directory)
 {
     _entry       = entry;
     _stream      = directory.OpenChunk(_entry);
     _streamStart = _stream.Position;
 }
Example #6
0
 internal Stream OpenChunk(VpkEntry entry)
 {
     var file = Chunks[entry.ArchiveIndex];
     var stream = OpenFile(file);
     var offset = entry.ArchiveIndex == DirectoryIndex ? HeaderLength + TreeLength + entry.EntryOffset : entry.EntryOffset;
     stream.Position = offset;
     return stream;
 }