Microsoft has published results of a test into how Brotli compares to its rivals. Google’s open source compression language has been chosen as the algorithm of choice for the leading web browsers. Now, Microsoft has announced an alpha preview of .NET Framework and .NET Core applications supporting Brotli.
Google developed and released Brotli in 2015. Since then it has been adopted by browsers like Firefox, Opera, and of course, Google’s own Chrome. Microsoft embraced Brotli in December last year, bringing the algorithm as an HTTP content-encoding method to the Edge browser.
To test the compression algorithm, Microsoft created a test based on the following three factors:
- Compression ratio
- Compression time
- Decompression time
For the compression ratio, Microsoft compared Brotli with two rival algorithms, gzip and Deflate. The test sought to find both the fastest and the optimal algorithm. Each algorithm was given data sets to perform.
Microsoft also looked to Canterbury Corpus, popular files for testing compression algorithms. The company found Brotli offered massive gains over rivals when dealing with larger files. Google’s algorithm was also at least equal in terms of managing smaller files.
For compression time, Microsoft shows that Brotli is slower at Optimal configuration, but was considerably quicker in the Faster configuration.
Quality level is important in deciding the compression time. Brotli excels on a quality scale below 10:
Finally, Microsoft looked at decompression time. Brotli and gzip were almost equal in this test, both massively better than Deflate.
Microsoft found that gzip outperformed Deflate in most measures, so the company decided to add a new test to compare gzlip directly with Brotli. To do this test, Microsoft used the Weissman Score. This tests the compression ratio and time taken.
Using gzip as a baseline, a score of less than 1 would show that gzlip is the better algorithm. Any score about 1 would be in favor of Brotli. This test showed that Google’s algorithm was vastly superior (above).