.RAR archive size question, compressed archive larger than uncompressed file

vbimport

#1

Hi! I don’t know if this is the right forum for a question like this, but I hope it fits under general software discussion…

How can a compressed RAR archive be larger than the files it contains? In other words, how can a compressed RAR archive be larger than the original, uncompressed files? I guess it could make sense if the archive was encrypted, but it’s not.

Example: I have a multi-part RAR archive that is 2,86 gigs in size. But when I extract the video files inside the archive, they are only 2,72 gigs in size, total. So the archive is 2,86 gigs, but the files inside it are only 2,72 gigs. How can this be? :confused:

Thanks for help :slight_smile:


#2

Uh, because the video is already as compressed as it can be. The .14 gig difference is the overhead of wrapping it in a .RAR container.


#3

[QUOTE=olyteddy;2509414]Uh, because the video is already as compressed as it can be. The .14 gig difference is the overhead of wrapping it in a .RAR container.[/QUOTE]

Thanks :slight_smile:

I guess that makes sense. But I wonder why it doesn’t happen with all large archives that contain video files, like AVI. Well maybe some video files are more compressed than others or something like that. This is interesting stuff to me since I use archives a lot but don’t really understand the math of them.


#4

Yeah, compression depends a lot on their being ‘patterns’ in the file. Text has lots of them. for example: ‘XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX’ can be expressed as ‘30(X)’ saving 25 characters. Program files and encoded media files have fewer such patterns to them, hence don’t compress as well, if at all.


#5

[QUOTE=CelesC;2509410]Hi! I don’t know if this is the right forum for a question like this, but I hope it fits under general software discussion…

How can a compressed RAR archive be larger than the files it contains? In other words, how can a compressed RAR archive be larger than the original, uncompressed files? I guess it could make sense if the archive was encrypted, but it’s not.

Example: [B]I have a multi-part RAR archive that is 2,86 gigs in size.[/B] But when I extract the video files inside the archive, they are only 2,72 gigs in size, total. So the archive is 2,86 gigs, but the files inside it are only 2,72 gigs. How can this be? :confused:

Thanks for help :)[/QUOTE]

Did you create that archive? Then you would have the answer.


#6

[QUOTE=chef;2509461]Did you create that archive? Then you would have the answer.[/QUOTE]

Unfortunately no, I didn’t create it.

But since I have the uncompressed files now, maybe I could try making an archive out of them and see if that archive gets bigger than the original files. I should learn more about compression anyway, the patterns in the file thing sounds very interesting.


#7

[QUOTE=CelesC;2509489]I should learn more about compression anyway[/QUOTE] Here is a good beginning for learning about data compression.


#8

[QUOTE=Mr. Belvedere;2509506]Here is a good beginning for learning about data compression.[/QUOTE]

Thanks, now I have some reading for this week :slight_smile:

I did an interesting little experiment: I used Winzip to compress the same 2,72 gigs of video files into a zip archive to see what happens. The zip archive that contains the videos is only 2,70 gigs, so there was a little compression. Strange that the rar archive was larger, when the zip archive is smaller than the videos it contains.


#9

When you open up the RAR archive with winrar etc and get info it should be stated if there is extra data involved to prevent data loss or not… :wink:


#10

[QUOTE=chef;2509787]When you open up the RAR archive with winrar etc and get info it should be stated if there is extra data involved to prevent data loss or not… ;)[/QUOTE]

Thanks for the advice! I tried this with Powerarchiver (that’s what I use for archives) but couldn’t find any info on whether there is extra data in the archive. I viewed archive properties, but couldn’t find the info there. I wonder if there’s any other way to find out if there is extra data to prevent data loss in the archive than using Winrar? I guess I could install Winrar but I wouldn’t like having to purchase another archiver when Powerarchiver worked pretty nicely so far.


#11

WinRAR allow to insert in the archive a certain amount (definited by the archive creator) of “Parity Data”. These allow to recover a damaged segment if needed.

I’m not sure that these features are available with other software, so I suggest to use WinRAR to manage RAR archives :slight_smile:





#12

In addition to Geno’s post: If you really really want to protect your RAR files, you could add another layer of protection with something called QuickPar. A tutorial on how to use it can be found here.


#13

Thank you, everyone, you were very helpful. :slight_smile: I was able to install WinRar and the .RAR archive in question does have a recovery record! That explains it. Interesting learning experience. :slight_smile:


#14

You’re welcome :bigsmile:


#15

@chef: Obviously, He doesn’t have the answer or he wouldn’t be asking.