I feel deeply guilty now, not knowing half of this and just using resize/crop despite always putting it in a png setting.
* Tiruin scurries away to search up what lossless, compression, and other digital art media terms mean!
I've always been under the impression that compression makes it worse (though I've always had the setting to 9 [out of 10] while GIMPing)
In short there's basically two different types of compression, "lossless" (like .png files) and "lossy" (like .jpg files). Lossless compression only costs you time as you increase the compression level (mostly on the front end), while lossy costs you quality (in return for the ability to compress things much father than lossless can go). For a basic, extremely simplified example, consider the following string:
"aaaaaaaaaaaaaaaaaaabbbbbbaaaaaaabbb"
A basic example of "lossless" compression would be something like "Whenever you have a repeated character, write the character and then the number of times it's repeated, up to 9 characters in a row". With such encoding we could potentially write the previous string like this:
"a9a9a1b6a7b3"
If we store our numbers in a separate file we could even then run it through the same rules again!
"aaabab","991673" -> "abab", "3111", "99167"
Now run it backwards through the steps and we can replace the numbers back with the duplicates to get right back to what we started with
"a3b1a1b1", "991673" -> "a9a9a1b6a7b3" -> "aaaaaaaaaaaaaaaaaaabbbbbbaaaaaaabbb"
"aaaaaaaaaaaaaaaaaaabbbbbbaaaaaaabbb" - old
"aaaaaaaaaaaaaaaaaaabbbbbbaaaaaaabbb" - new (same!
)
However this method is definitely time consuming, since we've got to go through the string (possibly multiple times), each time asking what we can decompress one character at a time.
On the other hand a "lossy" compression rule would be something like "For every 7 characters just write it down as whichever one is the most common in that group". If we performed that we would get this:
"aaaaaaa|aaaaaaa|aaaaabb|bbbbaaa|aaaabbb" -> "aaaba"
It's definitely smaller than the best we could get with our "lossless" compression method, but if we try to convert it back...
"aaaba" -> "aaaaaaaaaaaaaaaaaaaaabbbbbbbaaaaaaa"
Which is not the same as what we started with.
"aaaaaaaaaaaaaaaaaaabbbbbbaaaaaaabbb" - old
"aaaaaaaaaaaaaaaaaaaaabbbbbbbaaaaaaa" - new (Not the same!
)
But replacing definitely goes faster, just plop down 7 of whatever was in the file the first time and you're good to go!
And there you have it!