LzmaArchive

LzmaArchive constructor (1 of 3)

Initializes a new instance of the LzmaArchive class and composes the archive in lzma format.

public LzmaArchive(LzmaArchiveSettings settings = null)
ParameterTypeDescription
settingsLzmaArchiveSettingsSet of setting particular lzma archive.

See Also


LzmaArchive constructor (2 of 3)

Initializes a new instance of the LzmaArchive class prepared for decompressing.

public LzmaArchive(Stream source)
ParameterTypeDescription
sourceStreamThe source of the archive.

Exceptions

exceptioncondition
ArgumentExceptionsource is not seekable.
ArgumentNullExceptionsource is null.

Remarks

This constructor does not decompress. See Extract method for decompressing.

See Also


LzmaArchive constructor (3 of 3)

Initializes a new instance of the LzmaArchive class prepared for decompressing.

public LzmaArchive(string path)
ParameterTypeDescription
pathStringPath to the source of the archive.

Exceptions

exceptioncondition
ArgumentNullExceptionpath is null.
SecurityExceptionThe caller does not have the required permission to access.
ArgumentExceptionThe path is empty, contains only white spaces, or contains invalid characters.
UnauthorizedAccessExceptionAccess to file path is denied.
PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
NotSupportedExceptionFile at path contains a colon (:) in the middle of the string.

Remarks

This constructor does not decompress. See Extract method for decompressing.

Examples

using (FileStream extractedFile = File.Open(extractedFileName, FileMode.Create))
{
    using (var archive = new LzmaArchive(sourceLzmaFile))
    {
         archive.Extract(extractedFile);
    }
}

See Also