# XzArchive

Decompresses xz files in managed code.

Class 

`OfficeIMO.Archives`

**Namespace**

`OfficeIMO.Archives`

**Assembly**

`OfficeIMO.Archives`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[XzArchive.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Archives/XzArchive.cs#L72)

**Modifiers**

static

Decompresses xz files in managed code.

## Inheritance

- object
- XzArchive

Filter members 

Show inherited

## Methods

`public static XzReadResult Decompress(Stream source, Stream destination, ArchiveReadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-decompress-io-stream-io-stream-officeimo-archives-archivereadoptions-threading-cancellationtoken)

[XzArchive.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Archives/XzArchive.cs#L72)

Decompresses every stream from the current position of source into destination, verifying block checks (CRC-32, CRC-64 or SHA-256), declared sizes, the index and the stream footer. LZMA2 and the delta filter are supported.

Parameters

**source System.IO.Stream required**

**destination System.IO.Stream required**

**options OfficeIMO.Archives.ArchiveReadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`XzReadResult`

Exceptions

- `ArchiveCorruptionException` – The input is not xz, is truncated, or fails a check.
- `NotSupportedException` – The input uses a branch/call/jump filter or an unsupported check type, or a block with a dictionary of 2 GiB or more needs more history than one buffer holds.
- `OfficeInspectionResourceLimitException` – A configured limit is exceeded.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:0EA355638626B05C49B021697C29C88112CA9D68AFAFD565BF47031E4E310668 -->
