TarArchive.SaveXzCompressed
Contents
[
Hide
]SaveXzCompressed(Stream, TarFormat?, XzArchiveSettings)
Saves archive to the stream with xz compression.
public void SaveXzCompressed(Stream output, TarFormat? format = default,
XzArchiveSettings settings = null)
Parameter | Type | Description |
---|---|---|
output | Stream | Destination stream. |
format | Nullable`1 | Defines tar header format. Null value will be treated as USTar when possible. |
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.tar.xz"))
{
using (FileStream source = File.Open("data.bin", FileMode.Open, FileAccess.Read))
{
using (var archive = new TarArchive())
{
archive.CreateEntry("entry.bin", source);
archive.SaveXzCompressed(result);
}
}
}
See Also
- enum TarFormat
- class XzArchiveSettings
- class TarArchive
- namespace Aspose.Zip.Tar
- assembly Aspose.Zip
SaveXzCompressed(string, TarFormat?, XzArchiveSettings)
Saves archive to the path by path with xz compression.
public void SaveXzCompressed(string path, TarFormat? format = default,
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. |
format | Nullable`1 | Defines tar header format. Null value will be treated as USTar when possible. |
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 TarArchive())
{
archive.CreateEntry("entry.bin", source);
archive.SaveXzCompressed("result.tar.xz");
}
}
See Also
- enum TarFormat
- class XzArchiveSettings
- class TarArchive
- namespace Aspose.Zip.Tar
- assembly Aspose.Zip