Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Most compression programs compress all files by default. But when archiving a folder containing already compressed files, there is no need to compress them a second time, such as archives, packed setup program, jpg, movies, mp3,....

Are there any compression programs that allow an arbitrary list of type of files to be stored while the others are still compressed ?

It looks like Winrar can't.

I expect this would be doable with tar+gz/bzip2 and some scripting in various ways.

Edit :

Winrar can

share|improve this question
    
One problem is that there are a number of different compression algorithms, some of which don't have a well-defined signature. In addition, you have things like zip and jar files where the data may be compressed internally but the overall file is not compressed. –  Daniel R Hicks Jan 14 '12 at 4:12
add comment

4 Answers

up vote 2 down vote accepted

WinRAR allows you to select files to store without compression, under the Files tab when you make a new archive. I don't believe it supports wildcarding, however - but the included Rar.exe cli tool should be easily scriptable to do this.

share|improve this answer
    
The doc says it can. I didn't watch closely enough. –  Gzorg Jan 6 '10 at 11:24
    
Ah, problem solved, then! :D If you hit the little green arrow next to my answer, it'll be marked as accepted for anybody else who comes along with the same question :) –  Phoshi Jan 6 '10 at 11:42
    
pretty much any compression tool offers archiving without compression. –  Molly7244 Jan 6 '10 at 11:43
1  
The question, though, was to avoid compressing only specific filetypes - as .jpg, .mp3, so on are already compressed, and so it's a waste of CPU cycles. –  Phoshi Jan 6 '10 at 11:46
add comment

obscure answer, but somewhat useful in some cases. http://ntfscompressor.sourceforge.net/ for folders you wish to compress using ntfs compression, it only uses compression when a file passes a certain threshold of compressibility. it also lets you exclude file extensions.

share|improve this answer
add comment

7zip supports LZMA2 algorithm which during compression checks if the resulting file will be actually smaller than input. If compression will result in a file of greater size, it will automatically just store the file without compression. This is part of normal operation an is independent from other compression settings, so there is no need for the user to take any additional steps in order to prevent negative results of compression of already compressed files.

share|improve this answer
add comment

Despite mp3 and jpg being compressed it's still possible (even likely) that their size will be reduced if you compress them with WinRAR/7Zip.

I tested on a collection of mp3s of various bitrates and they all went down in size.

share|improve this answer
    
That's true, but you don't get much and it takes very long. –  maaartinus Mar 14 '11 at 5:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.