Subject: Re: Added compression handling to vnd driver
To: Hubert Feyrer <hubert@feyrer.de>
From: Florian Stoehr <netbsd@wolfnode.de>
List: tech-kern
Date: 03/30/2005 09:54:42
On Wed, 30 Mar 2005, Hubert Feyrer wrote:

> On Tue, 29 Mar 2005, Cliff Wright wrote:
>> It was pointed out that I did not include the man page change for
>> vnconfig. Here at least is an example of usage:
>> 
>> vnconfig -z vnd0 /cdrom/KNOPPIX/KNOPPIX
>> mount -t cd9660 /dev/vnd0a /mnt
>> 
>> The file /cdrom/KNOPPIX/KNOPPIX is the compressed file. Since the file
>> is not a gzip file, maybe -z is the wrong letter to use, as it generally
>> implies a gzip file.
>> Is their a better?
>
> No idea, do FreeBSD/OpenBSD/Linux/Solaris/whatever have anything similar, 
> then use the letter they have.
>
> How does one create the /cdrom/KNOPPIX/KNOPPIX above?
> "mkisofs -o x dir ; gzip x ; mv x.gz KNOPPIX"?
>

No that doesn't work since the fileformat is like

preamble
blocksize
number of blocks
blockoffsets
compressed data

The Linux folks have a program they pipe the mkisofs output through.
My approch was to have a program that is stand-alone and gets called like

clconfig -c fs-image compressed-image [blocksize]

which has the advantage that the image size is known, thus not
requiring that much RAM or temp file to compress/decompress.

I'll write to Cliff about how we can integrate his new vnd driver and my
work to get the cloop running soon.

-Florian