CompressionRatio of files in tar.gz archive


 How to get the compression ratio of items or files in tar.gz archive. I could do it for zip archive using QuickZipItem class's CompressionRatio Property.

 Thank You
Who is Participating?
Göran AnderssonConnect With a Mentor Commented:
I don't know if that library has that capacity (and a quick look didn't reveal anything), but the gzip file does contain that information. It would be possible to extract that information even without a library.
Göran AnderssonCommented:
You don't.

As the files are not compressed individually, as in a zip archive, there is no meta information about how much space each file takes up in the compressed file.

Even if you could determine how much space each file takes up, it's not really accurate as the compression depends on the previous files in the tar ball.
mkarthik415Author Commented:

Thank you for the response. Is it possible to find compression ratio of gzip file (i mean entire gzip file, not the items in it) using Xceed libraries?

Thank You
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.