I'm making a zip file using
ZipFile.CreateFromDirectory(DeployDirectory, ZipDirectory + @"\DatabaseDeploy.zip", CompressionLevel.Fastest, true);
I want to include the base directory so I need the overload that takes a CompressionLevel value as third argument. But I don't care about that, I just want it to work the same way as for the overload that just takes string, string.
Anyone knows?
ZipFile.Open Method (System.IO.Compression) Opens a zip archive at the specified path and in the specified mode.
Just go to References and add "System. IO. Compression.
CompressionLevel.Optimal, for now at least. You could also probably set the argument to null to get the default behavior, even if it changes in the future.
https://github.com/dotnet/runtime/blob/d110d7dd976b36787af31f82644031a20cf50094/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs#L623
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With