Here is a free and open source idea for image compression. Using machine learning.
So the idea is to store a discriminator model that can Classify every sub image of the total image. That is. For every random looking input it can through iteration. Help improve the target image simply by calculating a class label number that the subimage belongs to the right class. The classes are numbers corresponding to each subimage. If the class number is 1 for some subimage then the calculated number could be at 0.6 and iterate all the way to 1.0. That is. For a small change in subimage calculation there is a corresponding change in the output score or label number.
That is. The target uncompressed image starts as complete random. It is iterated with random as input with another model_generator until all the classes in the right place is achieved. The generator model is then discarded. The previously learned model_discriminator is the compressed version.