Creating a ZIP archive in memory using System.IO.Compression

I’m trying to create a ZIP archive with a simple demo text file using a MemoryStream as follows: using (var memoryStream = new MemoryStream()) using (var archive = new ZipArchive(memoryStream , ZipArchiveMode.Create)) { var demoFile = archive.CreateEntry(“foo.txt”); using (var entryStream = demoFile.Open()) using (var streamWriter = new StreamWriter(entryStream)) { streamWriter.Write(“Bar!”); } using (var fileStream = … Read more

What is a good Java library to zip/unzip files? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 6 years ago. Improve this question I looked at the default Zip library that comes with the JDK and the Apache compression libs and I … Read more