Click or drag to resize

How to use the IArchiveExtractor Interface

The section shows how to use the IArchiveExtractor interface. This interface is used both for supported Archive and MediaImage container formats (with a few exceptions - a few archive formats use the IDocumentContentExtractor interface because their contained items are more like attachments and/or are not supported by 7ZIP).

The IArchiveExtractor interface is the most complicated of the IContentExtractor derived interfaces because archive and media image containers can have the following special format cases that require special extraction methods:

  • Solid Archive - A solid archive is an archive where multiple uncompressed files are concatenated and compressed as a single data block in the archive. There can be one or multiple solid blocks inside a solid archive. Solid block compression can yield much better compression ratios when all the files in a block are similar. 7ZIP and RAR are two archive formats that natively support solid block compression. The files compressed together into a solid block need to be extracted together for best extraction performance. Extracting one file at a time from a solid block can lead to VERY slow performance if there are many files compressed together in the block - and for this reason - IArchiveExtractor has special methods for extracting items from solid archives.
  • Split Archive or Media Image - An archive or media image can be split into many smaller archive/image files (segments). Large archive or media image containers may be split, for example, into 700MB sections so that they will fit onto CD's, or into 10MB chunks so that they will be under the maximum attachment size limit of some email clients. 7ZIP, RAR, and ZIP split archive formats are supported as is WIM split media image format.

Another complication for archives is encryption. Archives can have an archive level password that applies to all items or individual file items in the container can be encrypted with different passwords.

Using the IArchiveExtractor Interface by Example

This section contains the following subsections:

The following sub-sections illustrate by example how to use the IContentExtractor interface to extract archive/media image container items for 'normal' (non-solid/non-split), solid block compressed, and split container formats.

Extracting Items from 'Normal' (non-solid/non-split) Container Formats

Sub-section content.

Extracting Items from Solid Archive Formats

Sub-section content.

Extracting Items from Supported Split Archive/Media Image Formats

Sub-section content.

See Also