Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Differences between the new Compression Methods (In Build Window)

Discussion in '2017.2 Beta' started by Prodigga, Aug 10, 2017.

  1. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    What are the differences between them? Advantages and disadvantages of each?

    I did my own testing, I built our APK with all 3 settings and have confusing results:

    None: 51.83 mb
    LZ4: 68.23 mb
    LZ4HC: 56.48 mb

    'None' appears to be the best?

    Also seems to be missing from the documentation :)
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    hopetolive and DreamGameBD like this.
  3. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    Hi!

    We are updating documentation.
    This option represents BuildOptions.None,BuildOptions.CompressWithLz4 andBuildOptions.CompressWithLz4HC of BuildPipeline.BuildPlayer API

    Some info here:

    Compression applied to Player data (scenes and resources).
    None - no or default platform compression.
    LZ4 - fast compression suitable for Development Builds.
    LZ4HC - higher compression rate variance of LZ4, causes longer build times. Works best for Release Builds.


    On Android default compression is ZIP. It compresses generally slightly better than LZ4HC, but has slower decompression speed.
    I would recommend to use LZ4HC for release build to have better loading performance. And LZ4 during development as it generally compresses build faster.