????????
Aspose.ZIP ??? .NET API ????????? ????????? ? ????????? ???????? ? ????? ??????????? ??? ????????????? ????????????? ?????-???? ?????? ????????? ??????????. ??? ????????? ?????????? ????????? ????? ????????? ZIP-????????.
? ???? ?????? ??????????? ?????? ??????????? ? ???????? zip. Aspose.Zip ???????????? ????????? ???????? ???????, ??? ??????????? ?????.
???????? ??????? API
API Aspose.ZIP ????????????????? ???????????????? ??????? ???????? ? ?????? ??? Entry. ?????? ????? ?????????, ?????????, ? ????? ??????? ?? ??????. API ???????? ?????? ? ??????? ? ??? ????????. ? ???? ??????? ?????? ????????????? ? ????????? ??????? ? ???????, ??????????????? API, ? ?? ?????????????.
?????? ? ????????
???????? ??????
????? ????? ??????? ? ??????? ?????? Archive, ???????????????? API. ? ??????? ????? ?????? ????? ??????? ??????? ?????, ??? ???????? ? ????????? ??????? ????.
1??? ????? = ????? ????? ();????? ????? ??????????? ? ??????.
???????? ?????? ? ???????????????? ???????
?????? ????? ????????? ? ??????????????? ???????????, ????????????? ??????????? ?????? ??????.
1 var archive = ????? ????? (????? ArchiveEntrySettings (????? CompressionSettings (CompressionMethod.Store), ????? AesEcryptionSettings (�p@s $�, EncryptionMethod.AES256)));?????????? ???????
?????? ????? ???? ????????? ??? ? ???????? ??????? ?? ?????, ??? ? ? ???????.
1archive.Save(?????, ArchiveSaveOptions saveOptions = null)
2
3archive.Save(filePath, ArchiveSaveOptions saveOptions = null)?????????? ??????
?????? ????? ???????, ??????? ???????? ????? ??? ???? ? Archive ??????????? ??????????.
1FileStream zipFileStream = File.Open("myarchive.zip", FileMode.Open);
2???????? ????? = ????? ????? (zipFileStream);
3
4???
5
6????? archive = ????? ?????("myarchive.zip");?????????? ????????????? ???????
??????, ?????????? ???????, ????? ???????, ?????? ???????? ArchiveLoadOptions.
1???????? ????? = ????? Archive (sourceStream, ????? ArchiveLoadOptions () {DecryptiptionPassword = "p@s$" });
2
3???
4
5???????? ????? = ????? ????? (�myarchive.zip�, ????? ArchiveLoadOptions () { DecryptiptionPassword = �p@s $� });?????? ? ???????? ??????
?????????? ??????? ? ?????
?????? ????? ????????? ? ????? ? ??????? ?????? Archive CreateEntry. ??????????, ???????????? ???? ???????, ????????? ????????? ?????? ? ?????? ?? ?????? ???? ? ????? ??? ?????? ?????? ?? ?????????????? ???????? ?????? ??????. ????? ?? ???????? ????? ????? ????????? ? ?????, ????? ??????????? ????? ?? ????????.
1CreateEntry(??? ??????, ???????? ??????, ArchiveEntrySettings newEntriesSettings) � ??????? ???? ?????? ? ???????? ??????, ?????????? ??????, ??????????????? ??????????? ?????? ? ?????????? ??? ??????.
2
3CreateEntry(??? ??????, ???? ? ??????, ArchiveEntrySettings newEntriesSettings) � ??????? ???? ?????? ? ???????? ?????? ? ?????????? ?????, ??????????????? ??????????? ?????? ? ?????????? ??? ??????.
4
5CreateEntry(string name, FileInfo fileInfo, ArchiveEntrySettings newEntriesSettings) � ??????? ???? ?????? ? ???????? ??????, ?????????? ?????, ??????????????? ??????????? ?????? ? ?????????? ??? ??????. ????????? ???????? ????? NTFS.
6CreateEntry(??? ??????, ???????? ??????, ArchiveEntrySettings newEntriesSettings, FileSystemInfo fileInfo) � ??????? ???? ?????? ? ???????? ??????, ?????????? ??????, ??????????? ?????? ? ?????????? ??? ??????. ????????? ???????? ????? NTFS ? ????????? ?????????????? ?????????.