internal void OnStreamClosed(EntryReadStream stream) { if (stream == sharedEntryReadStream) { sharedEntryReadStream = null; } }
public Stream GetStream(FileEntry entry, bool newFileStream = false) { Stream stream; if (entry.OriginalData != null) { stream = new MemoryStream(entry.OriginalData); } else { if (fileStream == null) { throw new IOException("File not open: " + this.path); } if (newFileStream) { throw new NotImplementedException("f**k"); } else { if (sharedEntryReadStream != null) { throw new IOException("Previous entry read stream not closed: " + sharedEntryReadStream.Name); } stream = (sharedEntryReadStream = new EntryReadStream(this, entry, fileStream, true)); } } // if (entry.IsCompressed) // { // stream = new DeflateStream(stream, CompressionMode.Decompress); // } return(stream); }