It's exactly what ArchView Firefox addon was doing (preview of RAR, ZIP and ISO files with selective downloading feature) in 2008 :
http://archview.sourceforge.net/ - the only documentation left (after Mozilla anihilated traces of old extensions - what I don't know how to question, part of me is gone too) is the source code (clean and minimal javascript). Nice to have some reading for it.