Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to compress the file that is already compressed?

Example: Given a compressed file such as, would it be possible to gzip it into another compressed file in UNIX like this:


share|improve this question
Have you tried it? Why do you think it wouldn't work, technically? (Logically it does not make sense to do what you want, but…) – slhck Aug 7 '13 at 6:45
up vote 0 down vote accepted

Why should this not be possible?

Yes you can compress an already compressed file.

The result will vary depending on the source files and the compression algorithms used.

E.g. zip compresses every file itself and puts this files together into a container. If the compressed files have a large redundancy then it is possible that gzip or bzip2 can compress the .zip file even further. If you have no redundancy in your files it is also possible the the target file becomes bigger.

share|improve this answer

First off, yes, you can store one archive inside of another archive file. This is where a definitive "yes" to your question ends.

It could be possible to further compress the compressed data, but you can't do it with any of the common tools (ZIP, RAR, LHA, GZ, 7z, etc). Instead you would need a tool specifically designed to further compress your compressed data.

However, most people looking into file compression aren't looking at this specifically as they are looking into ways to make the general compression tools work better on different common file formats, so you are unlikely to find a practical tool to do this. Instead you should look at your compression tool's options and set it to use the maximum compression it supports instead to minimize the size of your data.


No, you can't.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .