CpioArchive.SaveXzCompressed
Contents
[
Hide
]SaveXzCompressed(Stream, CpioFormat, XzArchiveSettings)
Saves archive to the stream with xz compression.
public void SaveXzCompressed(Stream output, CpioFormat cpioFormat = CpioFormat.OldAscii,
XzArchiveSettings settings = null)
Parameter | Type | Description |
---|---|---|
output | Stream | Destination stream. |
cpioFormat | CpioFormat | Defines cpio header format. |
settings | XzArchiveSettings | Set of setting particular xz archive: dictionary size, block size, check type. |
Exceptions
exception | condition |
---|---|
ArgumentNullException | output is null. |
ArgumentException | output is not writable. |
Remarks
outputThe stream must be writable.
Examples
using (FileStream result = File.OpenWrite("result.cpio.xz"))
{
using (FileStream source = File.Open("data.bin", FileMode.Open, FileAccess.Read))
{
using (var archive = new CpioArchive())
{
archive.CreateEntry("entry.bin", source);
archive.SaveXzCompressed(result);
}
}
}
See Also
- enum CpioFormat
- class XzArchiveSettings
- class CpioArchive
- namespace Aspose.Zip.Cpio
- assembly Aspose.Zip
SaveXzCompressed(string, CpioFormat, XzArchiveSettings)
Saves archive to the path by path with xz compression.
public void SaveXzCompressed(string path, CpioFormat cpioFormat = CpioFormat.OldAscii,
XzArchiveSettings settings = null)
Parameter | Type | Description |
---|---|---|
path | String | The path of the archive to be created. If the specified file name points to an existing file, it will be overwritten. |
cpioFormat | CpioFormat | Defines cpio header format. |
settings | XzArchiveSettings | Set of setting particular xz archive: dictionary size, block size, check type. |
Examples
using (FileStream source = File.Open("data.bin", FileMode.Open, FileAccess.Read))
{
using (var archive = new CpioArchive())
{
archive.CreateEntry("entry.bin", source);
archive.SaveXzCompressed("result.cpio.xz");
}
}
See Also
- enum CpioFormat
- class XzArchiveSettings
- class CpioArchive
- namespace Aspose.Zip.Cpio
- assembly Aspose.Zip