GZip is not exactly the latest or greatest at compressing sparse data.
When working with big status lists (~1-2 MB), which have few bits flipped, GZip performance severely degrades compared to newer algorithms.
| Algorithm |
Bits flipped |
Uncompressed size |
Compressed size |
Compression ratio |
| GZip |
0bits |
1.1 MB |
1.4 KB |
~/790 |
| GZip |
60 bits |
1.3 MB |
1.8 KB |
~1/724 |
| GZip |
180 bits |
4.0 MB |
5.4 KB |
~/740 |
| Brotli |
0 bits |
1.1 MB |
20 B |
~1/55,000 |
| Brotli |
60 bits |
1.3 MB |
200 B |
~1/6,493 |
| Brotli |
180 bits |
4.0 MB |
532 B |
~1/7,520 |
Currently GZip is hardcoded into the standard, could it be possible to have a prefix or something that specifies which algorithm the data is compressed with?
GZip is not exactly the latest or greatest at compressing sparse data.
When working with big status lists (~1-2 MB), which have few bits flipped, GZip performance severely degrades compared to newer algorithms.
Currently GZip is hardcoded into the standard, could it be possible to have a prefix or something that specifies which algorithm the data is compressed with?