Did you know you can read the contents of a zip file inside Firefox without uncompressing? Some of you will shrug and say "that's so 2007", but I'm speaking to the rest of you.
Let's say you've just downloaded the entire documentation for a major database application. The zip file turns out to be nearly half a gigabyte. The contents are mostly html, which can be compressed easily. You could unzip the big bundle, but it'll take half an hour and more than a gigabyte of space. Bleh.
Firefox lets you run Java Archive (JAR) protocol from the URL line. This protocol can parse a variety of compressed files and treat the contents as normal files. The high-level syntax is:
Remember that Windows uses blackslashes for subdirectories and colons to separate drive mount points, whereas web pages use forward slashes and domain name resolution for the equivalent material. I can tell Firefox that I have a local Windows file by using the prefix "file:///" (note the three slashes) instead of "http://" (just two). Thus a normal local file may be:
Okay, why is this so great? Because you can bookmark a web page inside a Zip file and never have to waste the time and hard drive space. Then you can grab giant bundles of stuff with only the wait time of downloading, then toss them if they're not the stuff you wanted. You can also keep entire knowledge bases worth of material in a third to half of the space.
There's your work-friendly tip for the day. Now I have to get back to scrutinizing SQL commands and installing software.
Let's say you've just downloaded the entire documentation for a major database application. The zip file turns out to be nearly half a gigabyte. The contents are mostly html, which can be compressed easily. You could unzip the big bundle, but it'll take half an hour and more than a gigabyte of space. Bleh.
Firefox lets you run Java Archive (JAR) protocol from the URL line. This protocol can parse a variety of compressed files and treat the contents as normal files. The high-level syntax is:
jar:[url to archive]![path to file]That exclamation point is important, by the way. That syntax is still a bit obscure, so let me give you an example with a Zip file on a Windows machine.
Remember that Windows uses blackslashes for subdirectories and colons to separate drive mount points, whereas web pages use forward slashes and domain name resolution for the equivalent material. I can tell Firefox that I have a local Windows file by using the prefix "file:///" (note the three slashes) instead of "http://" (just two). Thus a normal local file may be:
file:///C:/accumulant/learning/index.htmSince we really want to look inside a Zip file for its compressed contents, we need the JAR protocol to wrap around the Zip file. Thus we would tell Firefox:
jar:file:///C:/accumulant/zip/bunchastuff.zip!Now we can search around as if we were in WinZip or the Windows Zip utility. However I want to read an HTML page inside a subfolder of the 'bunchastuff' Zip file. I just add the subdirectories after the exclamation point as if I were requesting a normal local file:
jar:file:///C:/accumulant/zip/bunchastuff.zip!/something/index.htmThe links within the file will now resolve as expected.
Okay, why is this so great? Because you can bookmark a web page inside a Zip file and never have to waste the time and hard drive space. Then you can grab giant bundles of stuff with only the wait time of downloading, then toss them if they're not the stuff you wanted. You can also keep entire knowledge bases worth of material in a third to half of the space.
There's your work-friendly tip for the day. Now I have to get back to scrutinizing SQL commands and installing software.