![]() The files were chosen because their results on existing compression algorithms are “typical”, and so it is hoped this will also be true for new methods. To assess whether Brotli can also provide savings outside of the realm of web files, let’s take a look at the Canterbury Corpus, which is popular set of files for testing compression algorithms: As you can see in the graph above, even at middle quality level, Brotli compression ratio is higher than the optimal quality level of both gzip and Deflate. The first three columns show size reduction with Fastest, the next three with Optimal and the last one with a middle quality level for Brotli. ![]() We can also see that this pattern isn’t unique to this one sample by extending the set to also include some HTML and JavaScript samples: For our particular sample, we can see that Brotli compression ratio is better on Optimal and about the same on Fastest: Let’s start by looking at a typical file format that occurs in web development: CSS. To make numbers comparable, we use the extremes, which are Fastest, which means we let the algorithm compress as fast as possible, with Optimal, which means we let the algorithm spend as much time as it wants. NET, we expose this via the CompressionLevel enumeration. To judge how well Brotli does here, we’ll look at various different data sets.Ĭompression algorithms usually allow for tuning how much time the algorithm will spend to compress the data. So the higher the number, the better the algorithm is at compressing data. Compression RatioĬompression ratio indicates how much a compression algorithm can reduce the size and is computed as follows: Compression Ratio := Uncompressed Size / Compressed Size We’ll use these metrics to compare Brotli with the compression algorithms we already support, namely Deflate and gzip. Again, this can also impact server CPU load as servers are frequently clients in micro-service architectures.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |