The first image was converted to base64 using http://www.fourmilab.ch/webtools/base64/. It was then compressed using the C# port of the Financial Times Labs tool. Read more about that process at http://www.codeproject.com/Tips/665467/Porting-the-Financial-Times-JavaScript-String-Comp.
The second image is the decompressed string re-injected as base64.
Both images use http://en.wikipedia.org/wiki/Data_URI_scheme to display the image.
A Pen by Morgan Estes on CodePen.