Menu

decompress .taz File with 7-Zip-JBinding

Help
khaled
2013-06-14
2022-04-07
  • khaled

    khaled - 2013-06-14

    I'm using 7-Zip-Jbinding to decompress a .taz file. I'm using function "ExtractItemsStandard" to extract items from my archive then when i run my program it return that inArchive.getProperty(index, PropID.PATH)) is null
    Any help is welcome.

     
  • Boris Brodski

    Boris Brodski - 2013-06-14

    Hello,

    it seams, that you have a '.tar.gz' archive - archive, that compressed with tar and then with gzip. If you open such archive with 7-Zip-JBinding, you see only outer archive (gzip). Gzip is a stream archive, that doesn't store the name of the file inside. This is why inArchive.getProperty(index, PropID.PATH)) returns null. You have to extract this Gzip archive first and then open the result again. This will be TAR archive, that saves a lot of information about files stored.

    It is unfortunately not supported to open outer and inner archive together. Neither by 7-Zip nor by 7-Zip-JBinding.

    Greetings,
    Boris

     
  • Astha

    Astha - 2022-04-07

    "You have to extract this Gzip archive first and then open the result again."

    can you share code for this?

     
  • Boris Brodski

    Boris Brodski - 2022-04-07

    It would be cool to write such code and share it. But don't have something working out of the box yet.

    I created an issue https://github.com/borisbrodski/sevenzipjbinding/issues/53

     
  • Boris Brodski

    Boris Brodski - 2022-04-07

    Actually, it should be pretty straight forward. Just extract gz into a temporary file, then open it and extract again.

     

Log in to post a comment.