Hello and thank you very much for providing this great tool! I am trying to integrate XZ Utils into a Java program of mine which sometimes needs to decompress large files. Since I don't want the GUI to just freeze, I would like to know what will be the final size of on the disk and count how much have already been written in order to show a progress windows. The problem is that I can't get the final uncompressed size of the files. Is there any way to get this information?
If you use XZ for Java, open the .xz file using SeekableXZInputStream and use its length() method. You can then decompress the file with the same input stream too.
If you call XZ Utils' xz tool from your Java program, you can get the uncompressed size by parsing the output of xz --robot --list. Uncompressed size is the fifth column on the "file" line. Using XZ for Java is typically a better idea than calling xz from a Java program.
This helped. Thanks a lot! I use XZ for Java. Many thanks!
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.