The ZipFile class lives in the System.IO.Compression namespace. It can be used to read from, and write to Zip files.
You can also use a MemoryStream instead of a FileStream.
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentException | The stream has already been closed, or the capabilities of the stream does not match the mode (eg: trying to write to a read only stream) | 
| ArgumentNullException | input stream is null | 
| ArgumentOutOfRangeException | mode has an invalid value | 
| InvalidDataException | See list below | 
When a InvalidDataException is thrown, it can have 3 causes:
All information has been taken from this MSDN page