LZO compression by default


I am trying to pursue the telegram upstream to enable LZO compression for their snap since the startup time is quite slow. It’s not quite clear yet as to why LZO compression is not enabled by default by snapcraft or did I miss something ?

1 Like

There’s a tradeoff between Snap size/startup speed. I believe this is the reason it is not enabled by default (yet). On embedded and IoT boxes, space tend to be more valuable then startup speed, for instance.


That’s precisely it. We probably won’t change the default compression format for a long time, perhaps not until we are able to dynamically recompress snaps to whatever the best format that a user’s machine supports, in which case the best format seems to be ZSTD. But until then, the default will remain xz.


xz is the default compression used in snaps.

We do a number of security checks on every snap, including inspecting the low-level squashfs in various ways. We need to be sure we can be as confident of the security when a new compression algorithm is used. At the moment, my understanding is that we are only doing LZO where we are closer to the publisher and have more reasons to be sure about their behaviour. Once we have fully automated all the tests we want on LZO, it could be a publisher choice.


LZO appears to be available to everybody who opts in at the moment, at least I’ve had no difficulties in submitting LZO compressed snaps and I’ve certainly no special relations

1 Like

Ah, looks like I am behind the times :slight_smile: thanks James

yep, just adding

compression: lzo

to the top level metadata of your snapcraft.yaml does it