Anyone know of a golang implementation of brotli?
Isn't this by Google? Don't you think they did that? And are able to
collect a far more representative sample and far more data than most
people or organisations?
I asked because all other languages have an implementation ;)
Reason I actually am interested is because it sounded like LZMA
compression at LZO speed from the blog. I am actively working on some
code that needs compression and speed hence it caught my eye.
Glad to hear you are somewhat excited about it. Love your zip stuff.
Damian
The decoder is pure C and looks much simpler to translate than the compressor.
Damian
Reason I actually am interested is because it sounded like LZMA compression at LZO speed from the blog. I am actively working on some code that needs compression and speed hence it caught my eye.
I found this nice interactive benchmark: https://quixdb.github.io/squash-benchmark/
In general, brotli is an ok replacement for gzip for text content. Compression time is about the same as deflate, but with an improved compression ratio.
Interesting suite of benchmarks. I'm actually surprised to see that DEFLATE (or zlib) is pretty close to the Pareto frontier since I thought I had read in the past somewhere that DEFLATE was now far from it. Personally, I have always felt that DEFLATE did strike a surprisingly good balance between speed and ratio for generic input datasets for a format designed in the early 1990s.
Some random thoughts about using Brotli:
- It may or may not be worth implementing in pure Go just yet since the RFC is still a draft and things are still changing. A CGo/SWIG wrapper may be the better idea for the time being.
- I am a little concerned about the use of a static dictionary. Languages change over time and formats die and are born, which may reduce the effectiveness of this dictionary.
- The 122Ki static dictionary obviously needs to be compiled into the binary. This may be expensive for embedded systems.
- (not-big-deal) The current Go compiler is currently relatively inefficient about compiling large static byte slices. A Go file with just the dictionary alone takes 1s to compile on my machine.
Hi!On Friday, 9 October 2015 16:38:27 UTC+2, Marco Peereboom wrote:Anyone know of a golang implementation of brotli?Considering it has just been released, I wouldn't expect so. Maybe someone has wrapped the C-code.
<snip>