a simple c japeg decoder