public Stream Decompress(string file) { ZipEntry zipEntry = _zipFile.GetEntry(file); if (zipEntry == null) throw new Exception("Archive entry not found."); //if (zipEntry.IsCrypted && PasswordRequired != null) //{ // CompressionPasswordRequiredEventArgs e = new CompressionPasswordRequiredEventArgs(); // PasswordRequired(this, e); // if (e.ContinueOperation && e.Password.Length > 0) // _zipFile.Password = e.Password; //} SeekableZipStream stream = new SeekableZipStream(_zipFile, zipEntry); stream.PasswordRequired += PasswordRequired; stream.ExtractionProgress += ExtractionProgress; return stream; }
public Stream Decompress(string file) { ZipEntry zipEntry = _zipFile.GetEntry(file); if (zipEntry == null) { throw new Exception("Archive entry not found."); } //if (zipEntry.IsCrypted && PasswordRequired != null) //{ // CompressionPasswordRequiredEventArgs e = new CompressionPasswordRequiredEventArgs(); // PasswordRequired(this, e); // if (e.ContinueOperation && e.Password.Length > 0) // _zipFile.Password = e.Password; //} SeekableZipStream stream = new SeekableZipStream(_zipFile, zipEntry); stream.PasswordRequired += PasswordRequired; stream.ExtractionProgress += ExtractionProgress; return(stream); }