Unity WebGL Gzip vs Brotli Compression

 Gzip and Brotli are the two data compression programs that you can use when building Unity WebGL. If you don't know how to convert your project to unity WebGL then, feel free to follow my Unity WebGL conversion guide tutorial.

In unity, you have two options in WebGL to choose a specific compression format. Remember there is also an option to disable WebGL compression besides Gzip and Bortli compression. By disabling the compression in the Unity3d WebGL setting, you save build processing (faster build development) time but it will increase the size of the WebGL build.



 Therefore currently unity WebGL provides you two options for build compression. In this unity tutorial, I will explain both differences.

Gzip vs Brotli Comparision Table

Gzip Brotli
Build files are bigger Build Files size is smaller
Faster Build time Slow build time
Natively support on all browsers using HTTP/HTTPS Natively support on Firefox & Chrome only with HTTPS

You can check your chosen compression format compatibility on caniuse website. Make sure the target browser supports your build compression format. Also, you may get "Unable to parse Build/HTML5.framework.js.gz!". This happens due to some configuration files missing on the server. Here is the solution.


Read More: Unity WebGL technical Breakdown. 

Unity WebGL Issues list and Solution

Post a Comment

0 Comments