This is a reimplementation of Zopfli in C#. It's a straightforward port from C, without relying on many C# specific features.
Mainly because I wanted to teach myself C#. Other reason was because of the old blog posts from Raymon Chen and Rico Mariani where the first implemented a dictionary in C++ and the latter reimplemented it in C#. What may be suprising, the C# version turned out to be not much slower than highly optimized C++ impementation. I wanted to perform similar experiment and zopfli is good candidate, because it's quite CPU heavy.
My version is 1.6 slower than zopfli compiled with Microsoft C/C++ compiler. Not bad in my opinion.
Maybe. I think it can be trivially parallelised. Additionally there is at least one optimization left, but my current knowledge of C# isn't good enough to do it. Maybe I manage it in the future.
No. Use original compiled with good compiler. It's still noticeably quicker.