Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2005 16:12:24 -0400
From:      Charles Swiger <cswiger@mac.com>
To:        Ulrich Spoerlein <q@galgenberg.net>
Cc:        "Mikhail T." <mi@aldan.algebra.com>, current@freebsd.org
Subject:   Re: using bzip2 to compress man-pages
Message-ID:  <CF4FBAB7-791D-41E0-B59B-9D78C6E4381F@mac.com>
In-Reply-To: <20050922182104.GC990@galgenberg.net>
References:  <200509220446.j8M4kBPA019823@blue.virtual-estates.net> <20050922182104.GC990@galgenberg.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 22, 2005, at 2:21 PM, Ulrich Spoerlein wrote:
> On Thu, 22.09.2005 at 00:46:11 -0400, Mikhail T. wrote:
>> Hello!
>>
>> How can I attract an interested comitter to my:
>>
>>     http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/79607
>
> Changing the default format for manpages has serious bikeshed  
> potential.
> While adding support for reading/writing bz2 compressed manpages is
> certainly useful, I doubt the benefit of switching to bzip2 compressed
> manpages.
>
> There are several points to consider:
>
> 1. I dont want to wait for my manpages to display, they have to be on
> screen instantanously.

Running "catman" first and saving the "neqn $* | tbl | nroff -man |  
col" output would probably make a lot more difference compared to the  
cost of running gzcat versus bzcat.  :-)

> 2. "Desktops" and "Servers" have several GBs of space. No need to
> further squeeze the manpages (heck, I'd even consider not compressing
> them at all, but slight compression should even be faster than no
> compression at all)

This is a more interesting point.  Unless compressing the manpage  
nroff sources or a preformatted cat page actually compresses well  
enough that the file uses fewer disk sectors, doing compression isn't  
useful.

Likewise, unless compressing the manpage with bzip2 rather than gzip  
saves enough data to gain a sector, the switchover would not be  
useful.  From what it looks like, the average manpage is about 2000  
bytes uncompressed, or about 1K compressed with gzip.

Consider the results of:

du -a /usr/share/man/man* | sort -n >! /tmp/manpage_sizes
for f in `fgrep .gz /tmp/manpage_sizes | awk '{print $2}'`
do
wc -c $f && gzcat $f | bzip2 --best | wc -c
done

My guess is that roughly 95% of the manpages aren't going to save a  
disk sector by switching.

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CF4FBAB7-791D-41E0-B59B-9D78C6E4381F>