I'd like to create a squashfs image of a directory, but it's a huge one and even minimal compression would be a big win. Is there a way to do something like
Yes. Probably best is:
mksquashfs s o u r c e s outfile -comp lz4
...which I find typically manages output volumes something like 10% to 20% larger than the default gzip compressor, but also does so at least twice as fast and the online file access is also much faster still. Vanilla Linux kernels versions 3.18 and up support lz4 compression and so these archives can be mounted with up-to-date kernels.
You can also add the
-Xhc option which will get much closer to a typical
gzip archive's size in something like the same amount of time to compress, but the access time remains far faster online.