Subject: Re: Creating MS-DOS filesystems
To: None <mparson@io.com>
From: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
List: current-users
Date: 01/21/1997 11:34:29
>> 		% dd if=/dev/fd0a | gzip | gzip > dos.gz.gz

>> [Amazingly, empty filesystems compress very well the second time..
>> from 1474560 bytes to 1995 to 641 bytes, for an empty MSDOS disk!]

> Youch, why not just
>  		% dd if=/dev/fd0a | gzip -9 > dos.gz
> The -9 option tells it to use maximum compression.

Because gzip, even with -9 (or --best) still can output data with a
relatively low entropy.

Try, sometime,

% dd if=/dev/zero bs=1048576 count=10 | gzip --best > some-file
% gzip --best < some-file > some-other-file

and then look at the sizes of some-file and some-other-file.  With the
version of gzip on the NetBSD/sparc machine I run, some-file came out
to 10208 bytes and some-other-file to 109 bytes.  some-file contained
two big runs of NULs, one of 8190 bytes and the other of 1969 bytes.
The second gzip compresses them (almost) completely away.

When compressing 100 megs of /dev/zero, I see similar behavior - the
first gzip --best outputs 101791 bytes, the second 364.  (A third gzip
--best brings this down to 326 bytes, but that's not much of a gain.)

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B