Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

XzArchive

OfficeIMO.Archives

Namespace
OfficeIMO.Archives
Assembly
OfficeIMO.Archives
Source revision
273d35d5ba8a with working tree changes
Modifiers
static

Decompresses xz files in managed code.

Inheritance

  • object
  • XzArchive

Methods

public static XzReadResult Decompress(Stream source, Stream destination, ArchiveReadOptions? options = null, CancellationToken cancellationToken = default) #

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

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.