Skip to content

ZipEngine Class

Engine capable of packing and unpacking archives in the zip format.

MethodDescription
FindArchiveOffset(stream)Gets the offset of an archive that is positioned 0 or more bytes from the start of the Stream.
IsArchive(stream)Checks whether a Stream begins with a header that indicates it is a valid archive file.
PropertyDescription
ArchiveCommentGets the comment from the last-examined archive, or sets the comment to be added to any created archives.
WixToolset.Dtf.Compression.Zip.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Gets the offset of an archive that is positioned 0 or more bytes from the start of the Stream.

public System.Int64 FindArchiveOffset(
System.IO.Stream stream
)
ParameterTypeDescription
streamSystem.IO.StreamA stream for reading the archive.

System.Int64 The offset in bytes of the archive, or -1 if no archive is found in the Stream.

The archive must begin on a 4-byte boundary.

Checks whether a Stream begins with a header that indicates it is a valid archive file.

public bool IsArchive(
System.IO.Stream stream
)
ParameterTypeDescription
streamSystem.IO.StreamStream for reading the archive file.

bool True if the stream is a valid zip archive (with no offset); false otherwise.

Gets the comment from the last-examined archive, or sets the comment to be added to any created archives.

public string ArchiveComment { get; set; }