Class XzArchiveSettings
Namespace: Aspose.Zip.Xz.Settings
Assembly: Aspose.Zip.dll (25.1.0)
이 클래스는 특정 xz 아카이브에 대한 설정 집합을 포함합니다.
public class XzArchiveSettings
상속
상속된 멤버
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
생성자
XzArchiveSettings()
단일 LZMA2 압축을 사용하여 Aspose.Zip.Xz.Settings.XzArchiveSettings 클래스의 새 인스턴스를 초기화합니다.
public XzArchiveSettings()
비고
LZMA2 필터의 기본 사전 크기는 16메가바이트, 기본 블록 크기는 64메가바이트, 기본 체크섬 유형은 CRC32입니다.
XzArchiveSettings(XzFilterSettings[], long, XzCheckType)
사용자 정의 매개변수로 Aspose.Zip.Xz.Settings.XzArchiveSettings 클래스의 새 인스턴스를 초기화합니다.
public XzArchiveSettings(XzFilterSettings[] filters, long blockSize, XzCheckType checkType)
매개변수
filters
XzFilterSettings[]
Aspose.Zip.Xz.XzArchive를 생성하기 위해 순차적으로 적용될 필터(압축기). 단일 Aspose.Zip.Xz.Settings.XzLZMA2FilterSettings 또는 Aspose.Zip.Xz.Settings.XzBcjX86FilterSettings와 Aspose.Zip.Xz.Settings.XzLZMA2FilterSettings의 쌍일 수 있습니다.
blockSize
long
xz 아카이브 블록의 크기입니다.
checkType
XzCheckType
압축되지 않은 데이터에 대한 체크섬 계산 유형입니다.
예제
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);
}
}
예외
blockSize
가 음수입니다.
filters
가 null입니다.
filters
의 필터 수가 1개 미만이거나 2개를 초과하거나 마지막 필터가 Aspose.Zip.Xz.Settings.XzLZMA2FilterSettings가 아닙니다.
속성
CompressionThreads
압축 스레드 수를 가져오거나 설정합니다. 값이 1보다 크면 다중 스레드 압축이 사용됩니다.
public int CompressionThreads { get; set; }
속성 값
비고
이 숫자를 CPU 코어 수보다 더 크게 설정하지 마십시오.
예외
스레드 수가 100을 초과합니다.
FastSpeed
LZMA2 필터에서 사전 크기가 1메가바이트, 블록 크기가 4메가바이트 및 CRC32 체크섬을 갖는 Aspose.Zip.Xz.Settings.XzArchiveSettings 클래스의 인스턴스를 가져옵니다.
public static XzArchiveSettings FastSpeed { get; }
속성 값
FastestSpeed
LZMA2 필터에서 사전 크기가 65536바이트, 블록 크기가 1메가바이트 및 CRC32 체크섬을 갖는 Aspose.Zip.Xz.Settings.XzArchiveSettings 클래스의 인스턴스를 가져옵니다.
public static XzArchiveSettings FastestSpeed { get; }
속성 값
HighCompression
LZMA2 필터에서 사전 크기가 32메가바이트, 블록 크기가 128메가바이트 및 CRC32 체크섬을 갖는 Aspose.Zip.Xz.Settings.XzArchiveSettings 클래스의 인스턴스를 가져옵니다.
public static XzArchiveSettings HighCompression { get; }
속성 값
MaximumCompression
LZMA2 필터에서 사전 크기가 64메가바이트, 블록 크기가 256메가바이트 및 CRC32 체크섬을 갖는 Aspose.Zip.Xz.Settings.XzArchiveSettings 클래스의 인스턴스를 가져옵니다.
public static XzArchiveSettings MaximumCompression { get; }
속성 값
Normal
LZMA2 필터에서 사전 크기가 16메가바이트, 블록 크기가 64메가바이트 및 CRC32 체크섬을 갖는 Aspose.Zip.Xz.Settings.XzArchiveSettings 클래스의 인스턴스를 가져옵니다.
public static XzArchiveSettings Normal { get; }