<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: How to serve HTML out of a compressed archive?</title>
	<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive/</link>
	<description>Comments on Ask MetaFilter post How to serve HTML out of a compressed archive?</description>
	<pubDate>Sat, 17 Nov 2007 09:45:35 -0800</pubDate>
	<lastBuildDate>Sat, 17 Nov 2007 09:45:35 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: How to serve HTML out of a compressed archive?</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive</link>	
		<description>I want to serve lots of different static HTML files out of a single compressed archive, to save disk space on the server.  Is there a quick and easy solution for this? &lt;br /&gt;&lt;br /&gt; So I got an iPod Touch recently, and could not restrain myself from running the jailbreak on it.  There are some nifty third party apps out there, but I&apos;m pretty sure the killer app for me is being able to browse a Wikipedia snapshot without requiring wifi.&lt;br&gt;
&lt;br&gt;
Due to the disk space limitations, I&apos;d like to serve the snapshot out of a compressed archive.  Compressing each html file individually would work, but it&apos;s relatively storage-inefficient, so I&apos;d rather have everything wrapped up in a big gzipped tarball or similar.&lt;br&gt;
&lt;br&gt;
Is there an Apache or lighthttpd module that would make this project easy?  Or is embedded OS X capable of mounting an archive through a VFS/loopback device?  The fallback solution is that I write a cgi script to do the decompression, but I&apos;m looking for something better.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.76489</guid>
		<pubDate>Sat, 17 Nov 2007 09:41:31 -0800</pubDate>
		<dc:creator>Galvatron</dc:creator>
		
			<category>ipodtouch</category>
		
			<category>iphone</category>
		
			<category>osx</category>
		
			<category>embedded</category>
		
			<category>wikipedia</category>
		
			<category>apache</category>
		
			<category>lighthttpd</category>
		
	</item> <item>
		<title>By: Nelson</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136555</link>	
		<description>I don&apos;t know about the module, but the archive format you want is Zip or something similar. Zip files allow random access to each file instantly; a gzipped tarball requires you scan the entire archive to find where the file you care about starts.&lt;br&gt;
&lt;br&gt;
Douwe Osinga did something similar in 2005 with a smartphone: he has &lt;a href=&quot;http://douweosinga.com/blog/0508/2005Aug31_1&quot;&gt;some notes online&lt;/a&gt;. Sounds like he used &lt;a href=&quot;http://www.tomeraider.com/index.php&quot;&gt;Tomeraider&lt;/a&gt;, an ebook reader. Just over a gig for &lt;a href=&quot;http://www.tomeraider.com/index.php#getBookDetails:616&quot;&gt;Wikipedia&lt;/a&gt; in their format.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136555</guid>
		<pubDate>Sat, 17 Nov 2007 09:45:35 -0800</pubDate>
		<dc:creator>Nelson</dc:creator>
	</item><item>
		<title>By: zsazsa</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136594</link>	
		<description>If the iPod touch can mount .dmg image files, those can be made as compressed. The files will just show up as normal, but will be compressed inside the .dmg.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136594</guid>
		<pubDate>Sat, 17 Nov 2007 10:16:20 -0800</pubDate>
		<dc:creator>zsazsa</dc:creator>
	</item><item>
		<title>By: cmiller</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136595</link>	
		<description>You could do it in not-a-lot of Python.&lt;br&gt;
&lt;br&gt;
import zipfile&lt;br&gt;
import BaseHTTPServer&lt;br&gt;
z = zipfile.ZipFile(&quot;wikipedia.zip&quot;, &quot;r&quot;)&lt;br&gt;
...  &lt;br&gt;
# listen for requests, for each,&lt;br&gt;
 page_source = z.read(&quot;path/PageName&quot;)&lt;br&gt;
 output.write(page_source)&lt;br&gt;
...&lt;br&gt;
z.close()&lt;br&gt;
&lt;br&gt;
... or something very close to that.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136595</guid>
		<pubDate>Sat, 17 Nov 2007 10:17:31 -0800</pubDate>
		<dc:creator>cmiller</dc:creator>
	</item><item>
		<title>By: Galvatron</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136603</link>	
		<description>Interesting thought, cmiller; I hadn&apos;t considered using Python&apos;s built in server.  That really would be not-a-lot of python.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136603</guid>
		<pubDate>Sat, 17 Nov 2007 10:25:49 -0800</pubDate>
		<dc:creator>Galvatron</dc:creator>
	</item><item>
		<title>By: a_green_man</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136666</link>	
		<description>It&apos;d be pretty cool if you tossed this up on Projects when your done. &lt;small&gt;I&apos;ll have one of those gizmos ~Jan.&lt;/small&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136666</guid>
		<pubDate>Sat, 17 Nov 2007 12:14:21 -0800</pubDate>
		<dc:creator>a_green_man</dc:creator>
	</item><item>
		<title>By: Galvatron</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136739</link>	
		<description>If the project turns out ok then I&apos;ll be sure to post a write-up, a_green_man.  I wrote a short Python script based on cmiller&apos;s suggestion, which pretty well resolves my original question... but now I have to deal with the logistics of decompressing and rearchiving Very Large Quantities of data, and possibly figuring out a strategy to prune it down to something more manageable.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136739</guid>
		<pubDate>Sat, 17 Nov 2007 13:45:57 -0800</pubDate>
		<dc:creator>Galvatron</dc:creator>
	</item><item>
		<title>By: Mwongozi</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136753</link>	
		<description>You could save space by only storing the &lt;a href=&quot;http://en.wikipedia.org/wiki/Wikipedia:Wikipedia_CD_Selection&quot;&gt;Wikipedia CD collection&lt;/a&gt;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136753</guid>
		<pubDate>Sat, 17 Nov 2007 14:08:17 -0800</pubDate>
		<dc:creator>Mwongozi</dc:creator>
	</item><item>
		<title>By: Galvatron</title>
		<link>http://ask.metafilter.com/76489/How-to-serve-HTML-out-of-a-compressed-archive#1136768</link>	
		<description>Mwongozi, I did see the CD collection, but I don&apos;t think such a limited set of articles would satisfy me.  I want to carry the Hitchhiker&apos;s Guide in my pocket.  Possibly bearing a wallpaper image that says &quot;Don&apos;t Panic&quot; in large, friendly letters...</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.76489-1136768</guid>
		<pubDate>Sat, 17 Nov 2007 14:30:04 -0800</pubDate>
		<dc:creator>Galvatron</dc:creator>
	</item>
	</channel>
</rss>
