Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public VpkEntryStream(VpkEntry entry, Stream stream)
 {
     _entry       = entry;
     _stream      = stream;
     _streamStart = stream.Position;
 }
Ejemplo n.º 3
0
 public VpkEntryStream(VpkEntry entry, VpkDirectory directory)
 {
     _entry       = entry;
     _stream      = directory.OpenChunk(_entry);
     _streamStart = _stream.Position;
 }