Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ZipItem Class

An entry in the zip archive containing compressed data.

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v24.2.dll

NuGet Package: DevExpress.Document.Processor

#Declaration

public abstract class ZipItem :
    IContentStreamOwner

#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.

See Also