Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

SevenZipArchiveWriter

OfficeIMO.Archives

Namespace
OfficeIMO.Archives
Assembly
OfficeIMO.Archives
Source revision
12511d2fa560 with working tree changes
Modifiers
static

Creates single-volume 7z archives with independent or solid Copy and LZMA2 streams.

Inheritance

  • object
  • SevenZipArchiveWriter

Remarks

Members retain their input order. Names use inline UTF-16, modification times use UTC FILETIME, and each nonempty member has a CRC-32. Independent streams are limited to 448 MiB of decoded data and 448 MiB of packed data in total, with a 256 MiB limit per member. Solid mode limits the decoded folder to 256 MiB. The writer supports up to 200,000 entries and 32 MiB of encoded names.

Methods

Create 2 overloads
public static void Create(Stream destination, IEnumerable<ArchiveWriteEntry> entries, SevenZipArchiveWriterOptions? options = null, CancellationToken cancellationToken = default) #

Writes to the current position of a writable stream and leaves it open. The stream need not seek. All entry sources are staged before publication. Cancellation or I/O failure during publication can leave a prefix.

Parameters

destination System.IO.Stream required
entries System.Collections.Generic.IEnumerable<OfficeIMO.Archives.ArchiveWriteEntry> required
options OfficeIMO.Archives.SevenZipArchiveWriterOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static void Create(string destinationPath, IEnumerable<ArchiveWriteEntry> entries, SevenZipArchiveWriterOptions? options = null, CancellationToken cancellationToken = default) #

Atomically writes the supplied entry sequence to a new 7z path. An existing destination causes an I/O error.

Parameters

destinationPath string required
entries System.Collections.Generic.IEnumerable<OfficeIMO.Archives.ArchiveWriteEntry> required
options OfficeIMO.Archives.SevenZipArchiveWriterOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional