???????????? LZMA2 ? ??????? 7z
Contents
[
Hide
Show
]?????
Aspose.ZIP API ????????? ????????? ?????? 7-Zip.�????? ?? ??????? ?????? ???????? LZMA2, ??????? ????? ??????? ? ????????? ???????.
????????????? ?????? LZMA2
???? ??????? ?????????? ????? 7z ? ????? ???????, ??????? ????? ???? ? ?????????????? 4 ???????.
????: ???????? ????? 7z ?? ??????? LZMA2 ? ???????????????? ?? C#< /strong></?>
- ?????????? ????????? ?????? ? ??????? SevenZipLZMA2CompressionSettings ? ?????????? CompressionThreads = 4, ????? ???????? ????????????? ??????.
- ???????? ????????? SevenZipEntrySettings, ????????? ????????? ?????? ?? ???? 1.
- ??????????????? ?????? SevenZipArchive ? ??????????? ??????.
- ???????? ????? ?????? ? ?????, ?????? CreateEntry, ?????? ??? ?????? (first.bin) ? ???????? ???? (data.bin).
- ????????? ????? ??? result.7z, ????????? ????? Save.
1 SevenZipEntrySettings settings = new SevenZipEntrySettings(new SevenZipLZMA2CompressionSettings(){ CompressionThreads = 4 });
2 using (var archive = new SevenZipArchive(settings))
3 {
4 archive.CreateEntry("first.bin", "data.bin");
5 archive.Save("result.7z");
6 }