Ages ago I worked in medical imaging field, and was forced to write fast loseless JPEG codecs. Back then hardware was expensive, and student developers cheap so I wrote crucial piece in assembly language (for SPARC and MIPS) - and I got realtime compression on 170 MHz SS5
I found this sitting on long forgotten backup while spring cleaning. While this is not usefull anymore, this is still cool piece of code and has hystorical value.
Use it for whatever purpose you see fit, and do not forget to give credit just in case