Squashfs LZMA

make your squashfs filesystems smaller
using lzma compression algorithm
 
 

Why Squashfs LZMA?

LZMA is one of the best compression algorithms and Squashfs is one of the best compressed filesystems available nowadays. This project combines both to make something even better. LZMA can compress much better then gzip, which is used in squashfs now. Compressing to LZMA format is very slow, but this is not a problem as the squashfs filesystem needs to be compressed only once. Then it's only read million times; so what we care about is the speed of decompression. LZMA decompression is slower than gzip, but it's even very fast, about 10-20 MB/s on a 2GHz CPU.

Compression benchmarks

method block size Slax data size percent
uncompressed - 668 MB 100%
mksquashfs+gzip 64KB 227 MB 34%
mksquashfs+gzip 1024KB 222 MB 33%
mksquashfs+lzma 64KB 191 MB 28%
mksquashfs+lzma 128KB 184 MB 27%
mksquashfs+lzma 512KB 172 MB 26%
mksquashfs+lzma 1024KB 167 MB 25%

Why the patches?

Squashfs' author can't support LZMA directly in squashfs source code. He would like to have the code included in official Linux Kernel, but Linux Kernel doesn't support LZMA yet, so adding LZMA to squashfs would decrease the chance for its (squashfs's) inclusion. This is the reason we have to maintain LZMA support as a separate patch.

Who are the authors?

  • Author of sqlzma patches is Junjiro Okajima
  • Author of SquashFS is Phillip Lougher
  • Author of LZMA compression is Igor Pavlov
  • Author of Slax (the sponsor of this code) is Toms M, see www.slax.org
  • How to build squashfs with LZMA support?

    Download all the sources from this website, using the download links at the right side. Make sure to use a supported Linux Kernel, as only version 2.6.24.3 is supported. The info about the compilation is described in sqlzma.txt file in squashfs-lzma patches. Optionally apply Squashfs CVS fixes (link at the left) AFTER you applied sqlzma patches. Finally, make sure you have CONFIG_SQUASHFS*=n in your kernel config, because squashfs will be compiled separately as module. You may use precompiled Linux Kernel with Squashfs-LZMA as a module.