Normally, an uncompressed photo file defines each pixel (dot) as colour, brightness,etc. In a big photo, this takes Mbytes of data to define each pixel.
So a compressed file such as jpeg defines it as eg. The next 8 pixels are all blue, and bright.
The next 13 pixels are all greeny blue and medium brightness, etc.
Obviously using number codes rather than words.
This can save Mbytes of code because most photos have large areas all the same colour and brightness. I think they also ignore white or black and just add it back in at the other end.
A zip file is any other sort of file such as word document or spreadsheet,etc compressed in some similar way.
For photos they may use the same algorithm (formula) to compress and decompress at the other end.
I think that's right. If not, I'm happy to be corrected cos I don't want to spread misinformation.
Rob
![happy :)](https://chat.allotment-garden.org/Smileys/green/smile.gif)