TAR.GZ??????????????

Contents
[ Hide Show ]

?????tar.gz??????????????????????????????????????

??

Aspose.Zip API?? TARARCHIVE????????????????????TAR?????????????????�????????????????????????????????????TAR???????????????????

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

???????

??????????????tar.gz???????????????????TAR???????????????????? SaveGzipt??????????????GZ???????

 1String [] ArchivesPaths = new String [] {"data/first.tar.gz"? "data/second.tar.gz"? "data/third.tar.gz"};
 2Tararchive [] Archives = new Tararchive [ArchivesPaths.length];
 3try(tararchive merged = new Tararchive()){
 4    for(int i = 0; i <archivespaths.length; i ++){
 5        Tararchive a = tararchive.fromgzip(archivespaths [i]);
 6        ?????[i] = a;
 7        for(tarentry entry:a.getentries()){
 8            merged.createentry(entry.getname()?entry.open());
 9        }
10    }
11
12    merged.saveGzipped("merged.tar.gz");
13
14    for (int i = 0; i < archivesPaths.length; i++) {
15        archives[i].close();
16    }
17}

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

?????????????tar.lz?tar.xz????????

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.