I was looking through the PostgreSQL features recently, and noticed they use compression in a couple of places (large fields, and their Write-Ahead Log)

The code for this is here : https://doxygen.postgresql.org/pg__l...8c_source.html

It's a simple LZ compressor.

AIUI this is considered a "greedy" parser, and an alternate approach could likely yield better results.

I was wondering what easy improvements people here could think of that would improve compression ratio without too greatly degrading performance.

--
Curtis