in Core/src/Impl/Storages/ZipArchiveStorage.cs [14:33]
public ZipArchiveStorage(string archivePath, ZipArchiveStorageRwMode mode, int? concurrencyLevel = null, long? maxDirtyBytes = null)
{
RwMode = mode switch
{
ZipArchiveStorageRwMode.Read => StorageRwMode.Read,
ZipArchiveStorageRwMode.Create => StorageRwMode.Create,
ZipArchiveStorageRwMode.ReadWrite => StorageRwMode.ReadWrite,
ZipArchiveStorageRwMode.ReadWithAutoWritePromotion => StorageRwMode.ReadWrite,
_ => throw new ArgumentException("Unknown RW Mode: " + mode.ToString())
};
myProvider = mode switch
{
ZipArchiveStorageRwMode.Read => new PooledZipArchiveProvider(archivePath, concurrencyLevel: concurrencyLevel ?? 8),
ZipArchiveStorageRwMode.Create => new ExclusiveZipArchiveProvider(archivePath, mode, maxDirtyBytes: long.MaxValue),
ZipArchiveStorageRwMode.ReadWrite => new ExclusiveZipArchiveProvider(archivePath, mode, maxDirtyBytes: maxDirtyBytes ?? long.MaxValue),
ZipArchiveStorageRwMode.ReadWithAutoWritePromotion => new ExclusiveZipArchiveProvider(archivePath, mode, maxDirtyBytes: maxDirtyBytes ?? long.MaxValue),
_ => throw new ArgumentException("Unknown RW Mode: " + mode.ToString())
};
}