This is an extension for libsqsh that adds support for the LZO compression.
libsqsh-lzo overwrites the sqsh__impl_lzo
symbol (that is marked as weak
within libsqsh). This allows to add support for LZO compression to existing binaries
without the need to recompile them, but also to link against libsqsh-lzo directly.
To inject libsqsh-lzo into an existing binary you need to set the LD_PRELOAD
environment variable to the path of the libsqsh-lzo.so library. For example:
LD_PRELOAD=/usr/local/lib/libsqsh-lzo.so sqsh-ls /path/to/archive.squashfs
If the archive uses LZO compression, you should be able to extract the archive.
To link against libsqsh-lzo you need to link against libsqsh and liblzo2. For example:
cd libsqsh
cc tools/ls.c tools/common.c -lsqsh-lzo -lsqsh -llzo2 -Lbuild/lib -L../libsqsh-lzo/build/lib -o sqsh-ls
libsqsh-lzo uses meson as build system. To build it you need to have meson and ninja installed. Then run:
meson setup build
ninja -C build
libsqsh-lzo is licensed under the GPLv2. See the LICENSE file for more details.
Keep in mind, that libsqsh itself is BSD licensed. The implications of this are kept as an exercise for the reader.