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.

Does anyone know an effective method to ultra-compress files? You might have seen some PC games compressed to incredibly small sizes here and there (like GTA San Andreas which was compressed to 1mb file!). I tried many high-compression programs like 7zip, UHARC, KGB Archiver, but I can't get the same results on other types of files, like a music album for example. Why some files can't be compressed? I don't get why games can be reduced to 70% of their size, but a 60MB album, or a 5MB PDF are pretty much the same after compression.

share|improve this question
    
In order to understand how a file was compressed to 1MB one would need to know the uncompressed file size. Data files that GTA would use are textures, which likely means they are in a format without any compression, this allows for a great amount of compression within say an archive. As pointed out audio and video files depending on the encoding would already be compressed, here again in most cases, an uncompressed format is used. On pure binary data like an executable 60-78% isn't hard to reach. –  Ramhound Dec 11 '13 at 18:31

1 Answer 1

Not all files can be compressed. It depends on the binary layout of the file itself. Most modern forms of compression rely on mathematical analysis of the data, attempting to use rules of probability to try to reduce amount of data in the file in a way that it can be inferred later and re-inflated. As such, they will try several different algorithms and determine which if any was able to use math to reduce the number of bits while retaining the inferences needed to recreate the original.

In the case of audio and video files, they have already been compressed as part of their encoding, and it is unlikely that another compression algorithm will be able to compress them more.

PDFs also use internal compression so that they are more internet friendly and download with minimum bandwidth.

even different image types compress differently. you can save a lot of storage by compressing a .bmp file, but almost none with a jpeg, because jpegs are already data-compressed (the image data is compressed/minimized before its written into binary) and binary-compressed (math on the binary data), whereas bitmaps can only compress their data by dithering common colours, so by applying a binary compression algorithm to them, you can reduce the size dramatically.

Applications are usually compressible, because they are encoded for performance, not size reduction, and decompressing them will have a negative effect on their execution, so they usually ship uncompressed, and can thus be shrunk.

share|improve this answer

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.