-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathArchiveOptions.cs
39 lines (29 loc) · 1.17 KB
/
ArchiveOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.IO;
using System.Text;
namespace Gsemac.IO.Compression {
public sealed class ArchiveOptions :
IArchiveOptions {
public string Comment { get; set; }
public string Password { get; set; }
public bool EncryptHeaders { get; set; } = false;
public CompressionLevel CompressionLevel { get; set; } = CompressionLevel.Maximum;
public Encoding Encoding { get; set; } = Encoding.UTF8;
public bool LeaveStreamOpen { get; set; } = false;
public FileAccess FileAccess { get; set; } = FileAccess.ReadWrite;
public static ArchiveOptions Default => new ArchiveOptions();
public ArchiveOptions() {
}
public ArchiveOptions(IArchiveOptions other) {
if (other is null)
throw new ArgumentNullException(nameof(other));
Comment = other.Comment;
Password = other.Password;
EncryptHeaders = other.EncryptHeaders;
CompressionLevel = other.CompressionLevel;
Encoding = other.Encoding;
LeaveStreamOpen = other.LeaveStreamOpen;
FileAccess = other.FileAccess;
}
}
}