Is there a way to print the decompressed size of a .bz2 file without actually decompressing the entire thing?
feedback
|
|
As noted by others, bzip2 doesn't provide much information. But this technique works -- you will have to decompress the file, but you won't have to write the decompressed data to disk, which may be a "good enough" solution for you:
You can pipe that output into something else to give you a human-readable form:
| |||||||||||
feedback
|
|
Given the fact that bzip2 can compress a stream, it means that it doesn't write in the output file a header with the original size. Of course, it could write something at the end of the output, but I doubt it. | |||||
feedback
|
|
The program bzip2 unfortunately doesn't have a list parameter. If a programmer, I suppose you would need to use libbzip2 to write a small program for doing it. | |||
|
feedback
|