[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[debian-knoppix] compressloop.c usage



Hello all,

For those who use the create_compressed_fs utility with a file from stdin,
maybe the following script is useful:

bailout() {
echo "$*" >&2
exit 1
}

cloopblocks=`mkisofs -quiet -print-size -R cloop`
cloopsize=$(( $cloopblocks * 2048 ))
trap "rm cd/KNOPPIX/KNOPPIX; bailout aborted." INT
mkisofs -quiet -R cloop | compressloop -i $cloopsize \
	 -c${compression} -v -b 65536 - cd/KNOPPIX/KNOPPIX ||
	{ rm cd/KNOPPIX/KNOPPIX; bailout "could not make compressed ISO-image."; }

This will test the size of the image first, then tells compressloop to use
this as input image size with the -i option.

Without the -i option, compressloop fixes the image size at max 2G, but will
waste some space if the input image size is less than 2Gb. When you use -i,
there's no waste of index space and the input image can be larger than 2Gb.
Thus, I would recommend using the commands above :)

As Klaus has pointed out, compressloop cannot (yet) output it's file to
stdout. This is due to the seek() commands. I'm (slowly) working on a fixed
version, but this may take some time.

V.
-- 
http://www.openoffice.nl/   Open Office - Linux Office Solutions
Valentijn Sessink  valentyn+sessink@nospam.openoffice.nl
_______________________________________________
debian-knoppix mailing list
debian-knoppix@linuxtag.org
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix


Reply to: