public Stream Read( Stream stream, PbpEntryType entryType ) { if( _entries.ContainsKey( entryType ) == false ) return null; PbpEntry entry = _entries[ entryType ]; stream.Seek( entry.Offset, SeekOrigin.Begin ); byte[] buffer = new byte[ entry.Length ]; stream.Read( buffer, 0, ( int )entry.Length ); return new MemoryStream( buffer, 0, buffer.Length, false, false ); }
public Stream Read(Stream stream, PbpEntryType entryType) { if (_entries.ContainsKey(entryType) == false) { return(null); } PbpEntry entry = _entries[entryType]; stream.Seek(entry.Offset, SeekOrigin.Begin); byte[] buffer = new byte[entry.Length]; stream.Read(buffer, 0, ( int )entry.Length); return(new MemoryStream(buffer, 0, buffer.Length, false, false)); }
public bool ContainsEntry( PbpEntryType entryType ) { return _entries.ContainsKey( entryType ); }
public bool ContainsEntry(PbpEntryType entryType) { return(_entries.ContainsKey(entryType)); }