Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Please allow tweaking the SquashFS compression #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
l3u opened this issue Apr 27, 2025 · 0 comments
Open

Please allow tweaking the SquashFS compression #313

l3u opened this issue Apr 27, 2025 · 0 comments

Comments

@l3u
Copy link

l3u commented Apr 27, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant