XAR composition

Contents
[ Hide Show ]

Overview

Xar is popular Mac OS archiving format. You can compose such an archive with Aspose.Zip similarly as other archives.

Aspose.Zip can compose XAR archives with entries stored and compressed with Zzib and bzip2.

Create archive

Following sample composes XAR archive with two entries compressed with Zlib method

1FileInfo fi1 = new FileInfo("alice29.txt");
2FileInfo fi2 = new FileInfo("asyoulik.txt");
3
4using (var archive = new XarArchive(new XarZlibCompressionSettings()))
5{
6    archive.CreateEntry("alice29.txt", fi1, false);
7    archive.CreateEntry("fields.c", fi2, false);
8    archive.Save(xarFile);
9}
view raw ComposeXarZlib.cs hosted with ❤ by GitHub
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.