6 ms·
This is a bit strange: this seems to come from Google, who already invented another general-purpose compression scheme called Snappy[1], which is also usable in
by jzwinck 12y ago
This is a bit strange: this seems to come from Google, who already invented another general-purpose compression scheme called Snappy[1], which is also usable in streaming. TFA mentions gzip and deflate but not Snappy. Brotli seems to aim for better compression whereas Snappy aims for more speed, but they're both based on LZ77.
Brotli has something else in common with Snappy: a lack of a specified framing mechanism. When Snappy first came out it did not have one, so if you wanted to write Snappy-compressed data to a file, you might invent your own header to frame the compressed data. They later added this to Snappy, but by then it was too late: implementations had already come up with their own, mutually-incompatible framing. The same mistake seems to be being made again with Brotli.
[1] https://code.google.com/p/snappy/ https://code.google.com/p/snappy/
- robryk 12y agoYou're right about the aims of snappy and brotli: snappy has compression ratios worse than deflate, because it's only LZ77: there is no entropy encoding (eg. Huffman) afterwards. Brotli is similar to deflate in that it does LZ77 first and then compresses its output stream by an entropy code.