Skip to content

Instantly share code, notes, and snippets.

@jvanhoesen
Created February 2, 2022 21:12
Show Gist options
  • Save jvanhoesen/6e8e9f8f3985f9a009a5e7d46df23c88 to your computer and use it in GitHub Desktop.
Save jvanhoesen/6e8e9f8f3985f9a009a5e7d46df23c88 to your computer and use it in GitHub Desktop.
Creation of .Zip file
using (MemoryStream zipStream = new MemoryStream())
{
zipStream.Seek(0, SeekOrigin.Begin);
//2nd Parameter determines if .Zip is read only
using (ZipArchive zip = ZipArchive.CreateFrom(zipStream, false))
{
//Read or write data
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment