Back to Devexpress

ZipItem Class

officefileapi-devexpress-dot-compression-21f75bac.md

latest4.0 KB
Original Source

ZipItem Class

An entry in the zip archive containing compressed data.

Namespace : DevExpress.Compression

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public abstract class ZipItem :
    IContentStreamOwner
vb
Public MustInherit Class ZipItem
    Implements IContentStreamOwner

The following members return ZipItem objects:

Remarks

The ZipItem descendants form the ZipArchive. Each zip item is accessible in the archive by its index or its ZipItem.Name via the ZipArchive.Item property.

When a new archive is created, a zip item is created from the source data and contains information on its source and source specifics (e.g., the ZipFileItem.FileName and the ZipItem.LastAccessTimeUtc properties for the ZipFileItem, and the ZipTextItem.ContentEncoding property for the ZipTextItem). When an archive is loaded from a file or a stream using the ZipArchive.Read method, all zip items contain only the basic information relevant to the ZipItem class.

An item in an archive is located at the path specified by the ZipItem.Name property.

To extract an item, use the ZipItem.Extract method.

To update an item, remove the item from the archive and a add a new item with the same name. To help you in doing so, the following methods are implemented: ZipArchive.UpdateDirectory, ZipArchive.UpdateFile, ZipArchive.UpdateStream and ZipArchive.UpdateText.

An item content can be encrypted with a password. Use the ZipItem.EncryptionType and the ZipItem.Password properties to set the encryption.

Inheritance

Object ZipItem ZipByteArrayItem

ZipDirectoryItem

ZipFileItem

ZipStreamItem

ZipTextItem

See Also

ZipItem Members

Zip Compression and Archive API Examples

DevExpress.Compression Namespace