?????????????? Zip ? 7Z

Contents
[ Hide Show ]

???? ?? ?????? ????????????? ????? ZIP ? 7Z, ???????? ??? ??????.

Aspose.zip ?????? ????????? ?????????? ????? 7Z ? ??????????? ?????? LZMA, LZMA2, PPMD ??? BZIP2.

???????????????

Aspose.zip API ????????????? ????? Sevenziparchive ??? ?????? ? ???????? 7Z. �?? ????? ??????? ?????? ? ??????, ?? ???????? ??? ? ????????????? ?????????, ? ????? ?????????? ??? ? ????? 7Z.

?????????, ??? ? ??? ?????????? ??????????? ??????, ????? ????????? ?????????? ???? ???????.

????????? ??????

????????? ?????? ???? ?????????????, ??? ??????? ?????? ?? ?????? ZIP ? ?????????? ????????? ?? ? ????? 7Z. ?????? 7Z ????? ????? ????? LZMA2 ?????????? ?? ????, ????? ???????? ??? ????? ? ?????? ????????? ??????. ??????, ??????? ???????? ??????????, ?????????, ?? ?? ????? ??????????? ? ????????? ????????????? ?????.

 1?????????? (Archive Source = new Archive ("Source.zip")) {
 2    ?????????? (Sevenziparchive Archive = new Sevenziparchive (New SevenzipentrySettings (new Sevenziplzma2compressionsettings ()))) {
 3        ??? (ArchiveEntry ??????: Source.getEntries ()) {
 4            if (! entry.isdirectory ()) {
 5                ?????????? (BytearRayOutputStream OUT = New BytearRayOutputStream ()) {
 6                    intry.extract (out);
 7                    ?????????? (BytearrayinputStream in = new Bytearrayinputstream (out.tobytearray ())) {
 8                        archive.createEntry (entry.getName (), in);
 9                    }
10                }
11            }
12        }
13        archive.save ("result.7z");
14    }
15} catch (ioException ex) {
16}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.