Re: using bzip2 to compress man-pages

From: Mikhail Teterin <mi+mx_at_aldan.algebra.com>
Date: Thu, 22 Sep 2005 16:52:53 -0400
Ulrich Spoerlein wrote:
> 1. I dont want to wait for my manpages to display, they have to be on
> screen instantanously.

A human being can not distinguish between a millisecond and a microsecond. The 
difference between gzcat and bzcat is far less dramatic.

The space-saving potential can substantial, however -- see below. Being able 
to stick us useful root filesystem (with /usr) onto a USB key can be useful 
for some applications.

It just makes sense -- and the CPUs are advancing faster than storage devices.

Charles Swiger wrote:
> My guess is that roughly 95% of the manpages aren't going to save a š
> disk sector by switching.

One does not need to save the entire sector-size. Only the (size % 
sector_size), which currently pushes the file into an additional sector.

The following command line assumes, the sector size of 512 bytes and the bzip2 
vs. gzip saving of only 10%. Notice, it takes care to look once at every 
manual page even if it is has more than one alias (eliminating pages with the 
same inode). Try this on your system:

% find /usr/share/man/ -name \*.gz -ls | sort -k 1 | awk '$1 == inode { next } 
{ inode=$1; total++; if ($7 % 512 < $7*0.10) savings++ } END {print savings " 
out of " total}'
1200 out of 2694

1200 files out 2694... That's a little more than 5%...

The other advantage is the stride towards freer-licensed software.

	-mi
Received on Thu Sep 22 2005 - 18:53:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:44 UTC