Image Classification with Compression and Prediction