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

[debian-knoppix] New create_compressed_fs utility



Hello folks,

I did a total rewrite of create_compressed_fs. Find it at 
http://projects.openoffice.nl/downloads/compressloop/

Usage: ./compressloop [options] infile outfile
Options:
        -b blocksize            set block size (multiple of 512 bytes)
        -c compression          set compression (0-9, 0 is fastest, 9 is best)
        -i imagesize            set image size if it cannot be determined
        -I forced-imagesize     force image size, even if determined
	-v			verbose (the more v's, the more verbosity)

compressloop does not use malloc() calls, but writes directly to the output
file. This saves memory and is much faster (up to almost 50%) if you have a
computer that does *not* have 650M memory lying around...

You can now specify compression level as well, so it's possible to specify a
larger but faster image if you want so.

Please note that due to the lseek() calls, it is no longer possible to use
stdout as output file. Those who want to use images to pipe them to a CD
burner will still need the old create_compressed_fs utility. This is due to
the fact that IMHO the image is not a stream - create_compressed_fs builds
an image, then streams the image to stdout. But that doesn't make it a
stream.

You can use stdin as input, but please note that compressloop needs the
correct input size to build an image. Explanation is that a compressed loop
file system is built as follows:

[header][index of blocks][blocks...............................]

The index is not known until the blocks have all been compressed. Also, the
*size* of the image is not known until the number of blocks is known.

compressloop works around this by making up an image size if it cannot
determine one. It specifies 2,000,000 bytes for this - the index size will
be ( 2,000,000 / blocksize * 4 ) bytes large. If there are less blocks,
that's not a problem, the index will simply end prematurely.

However, the index fills up valuable space, so whenever you know the correct
input size - or have a rough estimate - then use the "-i" option to specify
the block size.

You may even force the input image size with -I.

If the number you specify is too low, compressloop will quit.

EXAMPLE
compressloop -v -c 0 -b 65536 uncompressedinput.iso compressedoutput.iso

A better method for all of the indexing hassle would probably be a rewrite
of cloop where:

- a version number is included in the header
- the index is at the end of the file, followed by
- a number that indicates the exact position of the start of the index.

That would make a really "streamable" cloop.o. Oh, how nice the far future
will be ;-)

Good luck with compressloop. Questions? Praise? Money?
valentyn+knoppix <at> nospam.openoffice.nl

Best regards,

Valentijn
-- 
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: