Class XzArchiveSettings
Nazwa przestrzeń: Aspose.Zip.Xz.Settings Zestawienie: Aspose.Zip.dll (25.5.0)
Klasa zawiera zestaw ustawień określonego archiwum xz.
public class XzArchiveSettings
Inheritance
Dziedziczeni członkowie
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
XzArchiveSettings()
Inicjalizuje nowy przykład klasy Aspose.Zip.Xz.Settings.XzArchiveSettings za pomocą pojedynczej kompresji LZMA2.
public XzArchiveSettings()
Remarks
Standardowy słownik w filtrach LZMA2 wynosi 16 megabytów, standardowy rozmiar bloku jest równy 64 megabyte, domyślny typ czeku to CRC32.
XzArchiveSettings(XzFilterSettings[ ], długo, XzCheckType)
Inicjalizuje nową instancję klasy Aspose.Zip.Xz.Settings.XzArchiveSettings z ustawionymi parametrami.
public XzArchiveSettings(XzFilterSettings[] filters, long blockSize, XzCheckType checkType)
Parameters
filters
XzFilterSettings
[ ]
Filtry (kompresory) do sekwencji stosowane do tworzenia Aspose.Zip.Xz.XzArchive. może być albo pojedynczy Aspose.Zip.Xz.Settings.XzLZMA2FilterSettingslub parę Aspose.Zip.Xz.Settings.XzBcjX86FilterSettings i Aspose.Zip.Xz.Settings.XzLZMA2FilterSettings
blockSize
long
Rozmiar bloku archiwum xz.
checkType
XzCheckType
Typ obliczenia kwoty kontrolnej dla niekompresowanych danych.
Examples
using (FileStream xzFile = File.Open("archive.xz", FileMode.Create))
{
XzLZMA2FilterSettings filter = new XzLZMA2FilterSettings(5242880);
XzArchiveSettings settings = new XzArchiveSettings(new XzFilterSettings[] {filter}, 10485760, XzCheckType.Crc32);
using (var archive = new XzArchive(settings))
{
archive.SetSource("data.bin");
archive.Save(xzFile);
}
}
Exceptions
blockSize’ is negative.
filters’ is null
filters’ has less than one or more than two filters, or last filter is not Aspose.Zip.Xz.Settings.XzLZMA2FilterSettings.
Properties
CompressionThreads
Jeśli wartość jest większa niż 1, stosuje się kompresję wielokrotną.
public int CompressionThreads { get; set; }
Wartość nieruchomości
Remarks
Nie ustawiaj tej liczby więcej niż kody CPU.
Exceptions
Liczba przewód przekracza 100.
FastSpeed
Otrzymuje przykład klasy Aspose.Zip.Xz.Settings.XzArchiveSettingsRozmiar słownika wynosi 1 megabyte w filtru LZMA2, rozmiar bloku wynosi 4 megabyte i czekiem CRC32.
public static XzArchiveSettings FastSpeed { get; }
Wartość nieruchomości
FastestSpeed
Otrzymuje przykład klasy Aspose.Zip.Xz.Settings.XzArchiveSettingsRozmiar słownika wynosi 65536 bajtów w filtrach LZMA2, rozmiar bloku wynosi 1 megabyte i czek CRC32.
public static XzArchiveSettings FastestSpeed { get; }
Wartość nieruchomości
HighCompression
Otrzymuje przykład klasy Aspose.Zip.Xz.Settings.XzArchiveSettingsZ rozmiarem słownika równym 32 megabytom w filtru LZMA2, rozmiar bloku równy 128 megabytom i czekiem CRC32.
public static XzArchiveSettings HighCompression { get; }
Wartość nieruchomości
MaximumCompression
Otrzymuje przykład klasy Aspose.Zip.Xz.Settings.XzArchiveSettingsz rozmiarami słownika równymi 64 megabytom w filtru LZMA2, rozmiar bloku równy 256 megabytom i czekiem CRC32.
public static XzArchiveSettings MaximumCompression { get; }
Wartość nieruchomości
Normal
Otrzymuje przykład klasy Aspose.Zip.Xz.Settings.XzArchiveSettingsRozmiar słownika wynosi 16 megabytów w filtrach LZMA2, rozmiar bloku wynosi 64 megabytów i czeki CRC32.
public static XzArchiveSettings Normal { get; }