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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
"You have to extract this Gzip archive first and then open the result again."
can you share code for this?
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
Actually, it should be pretty straight forward. Just extract gz into a temporary file, then open it and extract again.