-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Hi devs,
first of all thanks a lot for this fine piece of software, which seems to be the only viable successor of linuxdeploy-qt :-)
I searched for ways to generate the smallest possible AppImage for a Qt application. I use a static build, which greatly reduces the size, but leaving out features doesn't help much anymore.
So I examined if the compression method used to create the AppImage itself could be tweaked. Zstd is used to compress the data. SquashFS seems to not only support zstd, but also other compression algorithms – above all LZMA.
However, linuxdeploy uses an embedded version of mksquashfs
, which only supports zstd. I found out that one could pass other compression algorithms to be used via the LDAI_COMP
env variable – but as the packaged mksquashfs
only supports zstd, that is not really meaningful.
I did a simple test to check out if LZMA was worth it. I mounted a test AppImage and tared the contents. The uncompressed tarball is 17.0M. Compressing it with zstd results in 7.3M, almost the size of the AppImage itself (7.5M). However, compressing it using xz, the tarball only takes 5.7M – that is almost 1/4 less!
While xz takes way longer to compress the data compared to zstd (5.6s vs. 0.1s), decompression is way faster. Admittedly, it's still slower for xz compared with zstd (0.2s vs. less than 0.1s), but considering the significant smaller AppImage, it seems to be worth it – as least as an option.
So – it would be really nice if one could choose to either use LZMA or zstd when creating an AppImage, preferably with the possibility to tweak the compression settings to be able to create smaller AppImages.
Cheers, Tobias