There is a directory from the contents of which you want to create an archive. In this case, the archive should be created in the stream, and not be saved as a file on disk.
There is a ZipFile.CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName)
method ZipFile.CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName)
, but it saves the result to a file. Is there anything similar but saving the result to the stream?
It is desirable that these be classes from the System.IO.Compression
namespace, i.e. do without third-party libraries.