Anyone have experience with using Unity’s LZ4 build compression for games on Steam? So here’s the issue, when I don’t use LZ4 build compression and make a minor code change, the update for Steam users is very small, as you would expect. When I use LZ4 build compression though, it significantly reduces overall build size, but even the smallest code change results in an enormous update for Steam users.
For example, my game with LZ4 compression is about 1GB total. I make a 1 line code change and Steam users have to download about 600MB. I’m assuming it is much of the “data.unity3d” file which is 830MB.
So, anyone come up with a strategy for addressing this? This is for Windows x64 standalone using IL2CPP on 2018.2.21.
It is not a big deal when I’m making a big update, but it makes me not want to do small hot fixes.
Perhaps the LZ4 compression is less stable, eg, changing one pre-compression byte will affect a much larger number of output bytes, thus causing more delta for the differ.
Alternately it might be that with LZ4 compression the blobs of data are much larger and fewer, so any change requires more overall data transmission.
That’s how compression works, no much you can do about it. The only way to reduce your update size while still using compression is to split your game into many smaller asset bundles (which are individually compressed), so only the modified bundles are updated.
Hey thanks. Yeah I was thinking moving all assets over to Asset Bundles would get the code away from the assets, so would correct this issue. I was hoping there was some check box or common approach I had overlooked, but I guess not.
That’s nothing about it in the Unity docs, but over at Unreal they have a page detailed the ups and downs of compression and they specifically mention what you saw happen with Steam: using compression reduces installed size, but increases patch sizes.
Initial download size is not affected, however, since Steam compresses data during download already. So if your concern is download size (not install size), just disable compression and let Steam do its magic.
Thanks a lot. Install size was the main reason. My game will have an inordinately high number of large terrains, which seem to compress well with LZ. While right now without compression the build will take up close to 3GB, I estimate it will use 70+ GB by the time I’m done adding content. That’s a lot for a game without AAA graphics, so cutting that by more than half seemed a good idea at the time.