<p>I want to compress some files (into the <a href="http://en.wikipedia.org/wiki/ZIP_%28file_format%29" rel="nofollow noreferrer">ZIP</a> format) and encrypt them if possible using C#. Is there some way to do this?</p>

<p>Can encryption be done as a part of the compression itself?</p>

For compression, look at the
```
System.IO.Compression
```
namespace and for encryption look at
```
System.Security.Cryptography
```
.