How about using LZMA compression for SquashFS v3?
LZMA is the compression used in 7-zip (http://www.7-zip.org) and compresses really great (even better than RAR and ACE) while being LGPL and having very fast decompression. Not quite as fast as gzip but still very fast compared to bzip2, RAR, ACE and most others.. Compression is slow, but that doesn't matter on a read-only FS..
The LZMA SDK also contains a small pure ANSI-C implementation of the decompression algorithm.
The LZMA SDK can be downloaded at http://www.7-zip.org/sdk.html
Here are some tests I did (decompression was done from a ramdisk):
test.tar = 198830080 bytes
# gzip -9c test.tar >test.tar.gz
test.tar.gz = 44020506 bytes
# bzip2 -9c test.tar >test.tar.bz2
test.tar.bz2 = 35164492 bytes
# lzma e test.tar test.tar.lzma
test.tar.lzma = 29236224 bytes
# mksquashfs test.tar test.tar.sqsh
test.tar.sqsh = 46735360 bytes
# gzcat test.tar.gz >/dev/null
# bzcat test.tar.bz2 >/dev/null
# lzma d test.tar.lzma -so >/dev/null
kernel guys say that they dont wanna inlude lzma decompressor in kernel, so even if v3 will be w/ lzma support, it won't be included into _official_ kernel :-(
Why not? Do you have more information?
dam I need to learn how to write kernel modules I have all these wonderful ideas rolling around in my head.
patches to use squashfs with lzma are readily available. Basically the patches add the lzma decompression code, and change some squashfs initialisation code and the call to uncompress a block. This means only one type of compress method is supported and has to be selected at compile time.
It would be much nicer if the compression type of a squashfs filesystem could be detected and hence the proper uncompres code can be used. If it is using zlib compression use the kernels internal unomcpress routines, and when it is lzma used the uncompress code inside the squashfs module (as long as lzma is not natively supported by the kernel.)
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.