magnusarinell
magnusarinell

Reputation: 1157

What is the default System.IO.Compression.ZipFile CompressionLevel value?

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?

Upvotes: 8

Views: 3813

Answers (1)

cham
cham

Reputation: 21

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

Upvotes: 1

Related Questions