This is a bit of a weird situation to be in. I know that the *real solution* is to dive into open-source and fix the bug. But please humor me…

I am using the GELF standard to send log messages into `logstash` (version 5.0.0). Sadly, `logstash`'s GELF parser (Ruby gem `gelfd:0.2.0`) [can **only** parse compressed messages](https://groups.google.com/forum/#!topic/logstash-users/ObG6BnQxXkU).

The path of least resistance for me is to just *compress my every log message*. Even if it's a 100 byte message. There would be no meaningful size benefit (fits in a single UDP datagram either way, and its destination is localhost), and in fact the file [may become larger](https://www.quora.com/Could-a-compressed-file-be-bigger-than-its-original).

My worry is that my applications will be performing a lot of unnecessary compression — and my `logstash` server performing a lot of unnecessary decompression — just to work around this bug in `gelfd`.

The [compression algorithms supported by GELF](http://docs.graylog.org/en/2.1/pages/gelf.html#compression) are GZIP and ZLIB.

Using these algorithms: how significant is the computation cost of attempting to compress and then decompress a tiny file?

---

**Edit:** Sorry for submitting this question without having done any research of my own. As penance: I have now submitted my own benchmark results as an answer.