Squashfs LZMA
make your squashfs filesystems smaller
using lzma compression algorithm
using lzma compression algorithm
News
SquashFS version 4.0 is included in Linux
Kernel 2.6.29. LZMA support is not there, but since squashfs made its
way to the kernel, LZMA compression algorithm will follow it sooner or
later. What does it mean for this project (squashfs-lzma.org)? There is
no longer any interest in developing separate patches against squashfs
4.0. If you need it, you'll most likely find it in official Kernel
2.6.30 or so. So don't worry, be happy :)
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?
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.27.6 is officially supported.
The info about the compilation is described in sqlzma.txt file in squashfs-lzma patches,
or you can find 'build.sample' script there too.
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.