View Full Version : How XBMC uncompresses rar on the fly
I am amazed how XBMC can uncompress rar and play the files in them on the fly. I was looking for a windows program that did the same but only found WinMount which is a $39 program the mounts a rar, zip, etc to a driver. This had me thinking "How does XBMC do it?". Does anyone know where I can look to mount a rar in windows or where to look to somehow port the program in XBMC the mounts rars into windows. Documentation could also be good I belive. Hope I put this in the right post and hope someone can help.
Loto_Bak
2007-03-29, 10:06
xbmc only played rar files using 'store' compression (no compression) on the fly.
anything using compression must be extracted then played (which is done before the file is played)
technically i could just as easily implemented it for compressed files. it would however be completely useless (try the zip for large files to see what i mean).
as for documentation, there is none. see the source.
Do I have this right? My XBMC can read a rar off of my read-only shared network drive. When it read the rar it converts only the amount of the avi within the rar it needs. This would mean it is converts only the part of the rar it need to play when it needs to play it. Sort of like a caching system where there are only 4 MB being used at any given time. Or is XBMC really uncompressing the rar then playing the avi inside. I am sure it is the first idea because there is no way yo uncompress a 170MB rar in a second, the speed it takes from when I hit "A" on my controller to the time the video is play. I do note that there is about a second longer delay starting a video file within a rar compared to an unrared video file. Hope someone can confirm what I am thinking.
jmarshall
2007-03-30, 05:56
Stored RARs are basically just the file inside the Rar file(s). spiff created a filesystem wrapper around this so that as far as the player is concerned, it sees an AVI file directly. Behind the scenes, it's seeking through the RAR to the right place, and reading from there. Because it's stored (ie it's NOT compressed) no decompression needs to occur, thus it's pretty quick.
Cheers,
Jonathan
This sounds similar to how .iso are mounted. An iso is not compressed just like rar. Would it be safe to say the XBMC mounts the rar file(s) to view what is within.
correct; no.
simplistically said; yes.