## ArchiveFactory class

Detects the archive format and creates the appropriate [`IArchive`](../iarchive/) object according to the type of archive.

```csharp
public static class ArchiveFactory
```

## Methods

| Name | Description |
| --- | --- |
| static [CompressDirectory](../../aspose.zip/archivefactory/compressdirectory/)(string, string, ArchiveFormat) | Compresses the specified directory into an archive file using the provided archive format. |
| static [GetArchive](../../aspose.zip/archivefactory/getarchive/#getarchive)(Stream) | Detects the archive format and creates the appropriate [`IArchive`](../iarchive/) object according to the type of archive specified by the given stream. |
| static [GetArchive](../../aspose.zip/archivefactory/getarchive/#getarchive_2)(string) | Detects the archive format and creates the appropriate [`IArchive`](../iarchive/) object according to the type of archive specified by the given path. |
| static [GetArchive](../../aspose.zip/archivefactory/getarchive/#getarchive_1)(Stream, string) | Detects the archive format and creates the appropriate [`IArchive`](../iarchive/) object according to the type of encrypted archive specified by the given stream. |

### See Also

* namespace [Aspose.Zip](../../aspose.zip/)
* assembly [Aspose.Zip](../../)


