3 ms·
> I thought if you use compression, you'll always lose at least a small amount of data. Or is that a fundamental misunderstanding? Yeah, that is a misunderstan
by benhoyt 4y ago
> I thought if you use compression, you'll always lose at least a small amount of data. Or is that a fundamental misunderstanding?
Yeah, that is a misunderstanding. There's lossless compression and lossy compression. For images, the classic example of lossless is PNG and lossy is JPEG -- with JPEG you get more and more artifacts/noise the higher your compression is, but with PNG you can always recreate the exact pixels of the original, hence the OP's use of it as an archival format.
PNG is similar to how .zip and .tar.gz files work for executable files and other data -- those have to be lossless, because for text and executables and the like you need the exact 1s and 0s back out that you put in, otherwise the executable will crash or the text will be garbled.
- dontbenebby 4y ago>PNG is similar to how .zip and .tar.gz files work for executable files and other data Sounds like two things are being merged. (Like with tar.gz, tar is bundling the files together, gz is compressing them, versus an imaginary .targz which does both in one format.) Thanks for explaining, sorry I keep kind of... repeating things back at folks. It's how I'd speak verbally if trying to check my understanding, but it doesn't translate well to a comment thread. (I sincerely appreciate the clarification.)
- benhoyt 4y agoYou're not wrong, I should have just said .gz (though that really wasn't my point :-).