SevenZipCompressionOptions Class

Options to write a 7z archive. The defaults are the ones of 7-Zip: LZMA2 at level 5, solid, with compressed headers.

public sealed class SevenZipCompressionOptions

Constructors

NameDescription
SevenZipCompressionOptions()

SevenZipCompressionOptions()

SevenZipCompressionOptions.cs
public SevenZipCompressionOptions()

No documentation is available.

Properties

NameDescription
CompressHeadersGets or sets a value indicating whether the headers are compressed with LZMA. The default is true.
DictionarySizeGets or sets the size of the dictionary of LZMA and LZMA2, the memory of the PPMd model, or the block size of BZip2 (in bytes, rounded to a multiple of 100,000 from 100,000 to 900,000). null uses the size of the level.
EncryptHeadersGets or sets a value indicating whether the headers (the names, sizes and times of the entries) are encrypted, as the -mhe=on switch of 7-Zip. It requires a SevenZipCompressionOptions.Password.
FilterGets or sets the filter applied before the compression. The default, SevenZipFilter.Auto, applies the x86 filter to the executables (by their extension), and writes them to their own folders.
LevelGets or sets the compression level, from 0 to 9, as the -mx switch of 7-Zip. The default is 5. Level 0 stores the data (SevenZipCompressionMethod.Copy) whatever the method.
MethodGets or sets the compression method. The default is SevenZipCompressionMethod.Lzma2.
PasswordGets or sets the password that encrypts the content with AES-256, or null to not encrypt it. The names of the entries are encrypted too only with SevenZipCompressionOptions.EncryptHeaders.
SolidGets or sets a value indicating whether the content of several files is compressed together, in one folder (a solid block). The default is true. A solid archive is smaller, but reading a file decodes the files before it in its folder.
SolidBlockSizeGets or sets the number of bytes of content after which a solid folder is closed, or 0 for no limit (the default).
SolidFileCountGets or sets the number of files after which a solid folder is closed, or 0 for no limit (the default).

Gets or sets a value indicating whether the headers are compressed with LZMA. The default is true.

public bool CompressHeaders { get; set; }

Property value

bool

Gets or sets the size of the dictionary of LZMA and LZMA2, the memory of the PPMd model, or the block size of BZip2 (in bytes, rounded to a multiple of 100,000 from 100,000 to 900,000). null uses the size of the level.

public int? DictionarySize { get; set; }

Property value

int?

Gets or sets a value indicating whether the headers (the names, sizes and times of the entries) are encrypted, as the -mhe=on switch of 7-Zip. It requires a SevenZipCompressionOptions.Password.

public bool EncryptHeaders { get; set; }

Property value

bool

Gets or sets the filter applied before the compression. The default, SevenZipFilter.Auto, applies the x86 filter to the executables (by their extension), and writes them to their own folders.

public SevenZipFilter Filter { get; set; }

Property value

SevenZipFilter

Gets or sets the compression level, from 0 to 9, as the -mx switch of 7-Zip. The default is 5. Level 0 stores the data (SevenZipCompressionMethod.Copy) whatever the method.

public int Level { get; set; }

Property value

int

Gets or sets the compression method. The default is SevenZipCompressionMethod.Lzma2.

public SevenZipCompressionMethod Method { get; set; }

Gets or sets the password that encrypts the content with AES-256, or null to not encrypt it. The names of the entries are encrypted too only with SevenZipCompressionOptions.EncryptHeaders.

public string? Password { get; set; }

Property value

string?

Gets or sets a value indicating whether the content of several files is compressed together, in one folder (a solid block). The default is true. A solid archive is smaller, but reading a file decodes the files before it in its folder.

public bool Solid { get; set; }

Property value

bool

Gets or sets the number of bytes of content after which a solid folder is closed, or 0 for no limit (the default).

public long SolidBlockSize { get; set; }

Property value

long

Gets or sets the number of files after which a solid folder is closed, or 0 for no limit (the default).

public int SolidFileCount { get; set; }

Property value

int