Jpeg-like encoder and decoder written in C/C++