From: David Masover Date: 2008-07-13T22:50:21+09:00 Subject: Re: [rubyzip + open-uri] reading zipfiles from a url? On Wednesday 02 July 2008 06:49:26 Janus Bor wrote: > url = "http://www.cibiv.at/%7Ephuong/vien/8a375.zip" > zip_file = Zip::ZipFile.open(url) Maybe there is a right way to do this... I'm going to argue that it would be difficult at best. Zip files store metadata, such as compressed file location, at the end of the file. After that, you'd want to seek somewhere in the middle. Since open-uri is probably meant to issue a single, straightforward HTTP request (that is, ask for the whole file, from beginning to end), I'm not sure this would work well. But that's just an educated guess. Depending on how portable you need this to be, you might consider the FUSE-based HTTPFS: http://httpfs.sourceforge.net/ When I last tried this, performance was pretty terrible -- no caching, and it would fetch the file in blocks, so _many_ separate HTTP requests. But it would probably do what you want.