tags 74154 reopen thanks On Tue, 3 Apr 2001 Wouter Verhelst <[EMAIL PROTECTED]> wrote:
> I've been thinking about this lately, but can't see a good way of doing > this. If compressing the files, I should at least postpend the filename > with ".gz" or something similar, but that would cause all links in the > Linux Gazette to break. Fixing that would need an ugly hack. > > If you disagree on this (and thus know a good way to handle this), let me > know. It Works For Me[tm] ... *when* using apache for access. Direct file access does involve broken links and problems with browser viewing. Perhaps an LG viewer wrapper might work for this case. Having just run into an out-of-space condition on my 3 GiB /usr partition, I experimented with compressing a number of files, including LG and RFCs (those which weren't already compressed). For *.html files, gzip compression: - Doesn't break links. Apparently apache is working this out without any tweakage. See below for some httpd.conf settings (these are AFAIR not modified from stock Debian by me). Doesn't even warrant a logfile mention, best I can tell, the request is transparently fulfilled. - Is accessible via Galeon, Mozilla, Konqueror, w3m, and lynx. Dillo and links break (attempt display of compressed file). Probably rates a bugreport on dillo/links. - Oggs (LG104) work via xmms. - Works via dwww, as it indexes .gz files directly, while Apache handles the .gz extensions added within page references. - Testing on images, also works: /usr/share/doc/lg/gx/2003/newlogo-blank-200-gold2.jpg - Saves considerable space (about 1-2% of total utilization for a full subscription), _excluding_ images. Images are another 80-90 MiB, though compression rates (particularly on jpgs) are low). - Only downside appears to be a momentary delay on loading images as they're decompressed (not sure if this is by server or client) prior to load. I've gone the further step of compressing all previously uncompressed files while composing this bugreport, and spot checks through the LG archive in the browsers listed above shows full functionality. Total compressed size as of LG 110 is 102 MiB. Uncompressed is ~158 MiB, for a net savings of 56 MiB. Not huge, but useful, particularly as free space drops to ~100 MiB ;-). Suggestion is that this be handled as a debconf setting, so long as a compatible web server is installed, allowing optional compression of LG articles on postinst, and not replacing compressed versions of files with uncompressed. E.g.: I'll have to periodically check that the /usr/share/doc/lg tree is compressed (/me is thinking of adding a cronjob for this). For file-only access, the situation's a bit more complicated. w3m handles .gz files sanely, Galeon doesn't, others not tested. Setting up an alternate access directory might make sense. Fancy stuff might included named pipes, sockets, or similar, though that gets away from essential simplicity. I'd be inclined to allow users who _want_ to compress the tree do so, and not get in their way. Apache config has the following matches on 'gz': $ grep gz /etc/apache/httpd.conf AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip #AddDescription "GZIP compressed document" .gz #AddDescription "GZIP compressed tar archive" .tgz AddEncoding x-gzip gz tgz AddType application/x-tar .tgz Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii lg-base 110-1 Shared files for the Linux Gazette. ii lg-all 110 Install all Linux Gazette-issues at once ii apache 1.3.33-4 versatile, high-performance HTTP server -- Karsten M. Self <kmself@ix.netcom.com> http://kmself.home.netcom.com/ What Part of "Gestalt" don't you understand? Free Software Primer -- concepts you need to understand http://twiki.iwethey.org/Main/FreeSoftwarePrimer
signature.asc
Description: Digital signature